Skip to content

Instantly share code, notes, and snippets.

@idontwatchtv
Created October 28, 2020 07:26
Show Gist options
  • Save idontwatchtv/4b1524034d0ca22de1e10279e4f1ba8e to your computer and use it in GitHub Desktop.
Save idontwatchtv/4b1524034d0ca22de1e10279e4f1ba8e to your computer and use it in GitHub Desktop.
Flush IPTables rules
#!/bin/sh
echo "Flushing firewall rules..."
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