Core Coding®

Clear iptables

  Clear iptables
Clears all (or at least most) ip tables rules
iptables -F
iptables -X
#iptables -t nat -F
#iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t raw -F
iptables -t raw -X

Note - the above nat commands are commented out because even when clearing nat, nf_conntrack will be loaded
which can cause issues.
See these links for more info:
http://www.pc-freak.net/blog/resolving-nf_conntrack-table-full-dropping-packet-flood-message-in-dmesg-linux-kernel-log/
http://antmeetspenguin.blogspot.com/2011/01/high-performance-linux-router.html
Go back to resources
Home Mail GitHub