Created
November 2, 2017 12:59
-
-
Save tavy315/1ea18a0f86b4379edfd0b92c04effd95 to your computer and use it in GitHub Desktop.
Allow specific IP to access port 22 and block access for everyone else
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
iptables -F | |
iptables -A INPUT -p tcp --dport 22 -s 192.168.0.1 -j ACCEPT -m comment --comment "office.i2ct.com" | |
iptables -A INPUT -p tcp --dport 22 -j DROP | |
iptables -L -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment