Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save micheledurante/ca1e8c7b999fd4e8e29aacb77a97a3b0 to your computer and use it in GitHub Desktop.
Save micheledurante/ca1e8c7b999fd4e8e29aacb77a97a3b0 to your computer and use it in GitHub Desktop.
Update iptable and ip6tables rules

Show rules with line numbers sudo iptables -L --line-numbers

Insert rule at line Z sudo iptables -I INPUT Z -p tcp --dport 22 -j ACCEPT

Delete rule at line Z sudo iptables -D INPUT Z

Save changes sudo dpkg-reconfigure iptables-persistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment