Difference between revisions of "Iptables"

From WA2IAC Wiki
Jump to: navigation, search
(Notes on using iptables (might be useful for more advanced users))
 
m (= Red Hattish)
Line 2: Line 2:
 
These are my notes about iptables. I find them to be helpful. YMMV :)
 
These are my notes about iptables. I find them to be helpful. YMMV :)
  
=== Red Hattish ==
+
== Red Hattish ==
  
 
* To check iptables installation, ''rpm -q iptables''
 
* To check iptables installation, ''rpm -q iptables''
  
==== Disable iptables filtering ====
+
=== Disable iptables filtering ===
 
Stop IP tables. In hattish distros:
 
Stop IP tables. In hattish distros:
 
<pre>service iptables stop</pre>
 
<pre>service iptables stop</pre>
Line 16: Line 16:
 
... assuming eth0 is the right device :)
 
... assuming eth0 is the right device :)
  
==== Saving Iptables (after manual changes) ====
+
=== Saving Iptables (after manual changes) ===
 
<pre>
 
<pre>
 
# /sbin/service iptables save
 
# /sbin/service iptables save
 
</pre>
 
</pre>
 
This executes the iptables init script, which runs ''/sbin/iptables-save'' and writes the current iptables configuration to ''/etc/sysconfig/iptables''. Upon reboot, the iptables init script reapplies the rules saved in ''/etc/sysconfig/iptables'' by using the ''/sbin/iptables-restore'' command.
 
This executes the iptables init script, which runs ''/sbin/iptables-save'' and writes the current iptables configuration to ''/etc/sysconfig/iptables''. Upon reboot, the iptables init script reapplies the rules saved in ''/etc/sysconfig/iptables'' by using the ''/sbin/iptables-restore'' command.

Revision as of 21:50, 8 May 2013