Skip to content

Instantly share code, notes, and snippets.

@fredeerock
Last active March 19, 2019 20:16
Show Gist options
  • Save fredeerock/3b19cfb6c2f7ab6b8ae534ec80e14c1d to your computer and use it in GitHub Desktop.
Save fredeerock/3b19cfb6c2f7ab6b8ae534ec80e14c1d to your computer and use it in GitHub Desktop.
remove all iptables rules
# List rules.
sudo iptables -L
# Set default policies to accept.
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
# Flush and delete tables and chains.
sudo iptables -t nat -F
sudo iptables -t mangle -F
sudo iptables -F
sudo iptables -X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment