wiki:linux/Network/iptables

Mail, Mail/Mutt, Mail/mbsync, iptables, nmap, ntpdate, route, ssh, ssh/scp, ssh/sshfs, wlan


Script to remove all iptables entries:

#!/bin/sh

if [ $USER != "root" ]; then
    echo "Must run as root! Script canceled!"
    exit 1
fi

echo "Stopping firewall and allowing everyone..."
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
echo "Done."
exit 0
Last modified 4 years ago Last modified on Dec 5, 2014, 8:25:20 AM