Skip to content

Instantly share code, notes, and snippets.

@cawa87
Created January 11, 2015 14:29
Show Gist options
  • Save cawa87/6d7a20fc31fd0402fff0 to your computer and use it in GitHub Desktop.
Save cawa87/6d7a20fc31fd0402fff0 to your computer and use it in GitHub Desktop.
Reset iptables firewall rules
#!/bin/sh
echo "Flushing iptables rules..."
sleep 1
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment