Clear all iptable rules and allow everything

From Urandom
Jump to: navigation, search

This is useful when you want to clear all the IP table rules.

#!/bin/sh
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
Personal tools