Skip to content

Instantly share code, notes, and snippets.

@alexandrinos
Created December 27, 2015 00:38
Show Gist options
  • Save alexandrinos/bf7c14dce2f4a71f1113 to your computer and use it in GitHub Desktop.
Save alexandrinos/bf7c14dce2f4a71f1113 to your computer and use it in GitHub Desktop.
Firewal Linux aka iptables
#show all rules in a table ; you can use alternatively -L
sudo iptables -S
#show rule number in each of the 3 possible cases: INPUT OUTPUT FORWARD
sudo iptables -L --line-numbers
#delete a rule with a number; syntax: iptables -D <OUTPUT|INPUT|FORWARD> <line_number>
sudo iptables -D OUTPUT 3
#delete all rules in a chain ;chain= INPUT, OUTPUT or FORWARD
sudo iptables -F INPUT
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment