Penguin
Diff: FirewallNotes
EditPageHistoryDiffInfoLikePages

Differences between version 13 and predecessor to the previous major change of FirewallNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 13 Last edited on Sunday, April 13, 2003 10:53:43 pm by RobDawson Revert
Older page: version 12 Last edited on Sunday, January 5, 2003 12:13:55 pm by CraigBox Revert
@@ -22,8 +22,35 @@
  
  iptables -L --line-numbers 
  
 Then you can just use iptables -D FORWARD 1 to remove it. 
+  
+!Deleting all rules  
+  
+ iptables [[-t <table>] -F [[chain]  
+  
+This removes all rules from the specified table and chain, or all the chains in the table if none is specified.  
+  
+Hint: It won't delete any user-defined chains, although it will remove the rules within them, nor will it set the default policy for the table. This, tho, should.  
+  
+ iptables -t filter -F  
+ iptables -t filter -X  
+ iptables -t nat -F  
+ iptables -t nat -X  
+ iptables -t mangle -F  
+ iptables -t mangle -X  
+ iptables -t filter -P INPUT ACCEPT  
+ iptables -t filter -P FORWARD ACCEPT  
+ iptables -t filter -P OUTPUT ACCEPT  
+ iptables -t nat -P PREROUTING ACCEPT  
+ iptables -t nat -P OUTPUT ACCEPT  
+ iptables -t nat -P POSTROUTING ACCEPT  
+ iptables -t mangle -P PREROUTING ACCEPT  
+ iptables -t mangle -P INPUT ACCEPT  
+ iptables -t mangle -P FORWARD ACCEPT  
+ iptables -t mangle -P OUTPUT ACCEPT  
+ iptables -t mangle -P POSTROUTING ACCEPT  
+  
  
 !Hints, tips and traps 
 * Having a default DENY or REJECT policy is a good idea 
 * But don't start with that rule if you're working remotely