Also, as a point of reference, here's how to flush ALL the current iptables rules:
#!/bin/sh
echo "Stopping firewall and allowing everyone..."
iptables=/sbin/iptables
$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
shareimprove this answer
answered Jan 21 '13 at 17:41
Steve Dibb
811
3
There are actually more tables than that. At least -t raw and -t security. Instead of hard coding, use /proc/net/ip_tables_names
|