Created
December 8, 2016 15:19
-
-
Save skorotkiewicz/5bb7c5796062622166ccd12f20ea5fd1 to your computer and use it in GitHub Desktop.
Block all SSH Access except one IP
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
#create access for specific IP: | |
iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED --source x.x.x.x -p tcp --dport 22 -j ACCEPT | |
#block all others | |
iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -p tcp --dport 22 -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment