Skip to content

Instantly share code, notes, and snippets.

@shoaibi
Created June 25, 2015 15:34
Show Gist options
  • Save shoaibi/d7ce8963d1f780475d52 to your computer and use it in GitHub Desktop.
Save shoaibi/d7ce8963d1f780475d52 to your computer and use it in GitHub Desktop.
Sweep iptables rules
#!/bin/sh
# Must run as root.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment