Created
December 18, 2012 18:28
-
-
Save amalc/4330596 to your computer and use it in GitHub Desktop.
iptables - only ssh.
This file contains 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 | |
sudo iptables -I INPUT 1 -i lo -j ACCEPT | |
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT | |
sudo iptables -A INPUT -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment