Created
October 6, 2014 23:13
-
-
Save ericsaboia/f9a0d3aef59a61b95961 to your computer and use it in GitHub Desktop.
Iptables basic rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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