Skip to content

Instantly share code, notes, and snippets.

@ericsaboia
Created October 6, 2014 23:13
Show Gist options
  • Save ericsaboia/f9a0d3aef59a61b95961 to your computer and use it in GitHub Desktop.
Save ericsaboia/f9a0d3aef59a61b95961 to your computer and use it in GitHub Desktop.
Iptables basic rule
sudo iptables -F # flush rules
sudo iptables -A INPUT -i eth0 -p tcp --dport 50000 -j ACCEPT # allow ssh
sudo iptables -A INPUT -i eth1 -j ACCEPT # allow everything on local network
sudo iptables -A INPUT -j DROP # drop everything else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment