Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save birchestx/5541b7e1e0ddb43b5873bed078b6c7c2 to your computer and use it in GitHub Desktop.
Save birchestx/5541b7e1e0ddb43b5873bed078b6c7c2 to your computer and use it in GitHub Desktop.
Useful ip table commands
list ip tables
sudo iptables -S
list nat ip tables
sudo iptables -L -vt nat
Delete nat ip tables
for i in $( iptables -t nat --line-numbers -L | grep ^[0-9] | awk '{ print $1 }' | tac ); do iptables -t nat -D PREROUTING $i; done
http://lubos.rendek.org/remove-all-iptables-prerouting-nat-rules/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment