Last active
May 3, 2016 17:22
-
-
Save bluebycode/249491175fec305fe17ecbc619e1f75b to your computer and use it in GitHub Desktop.
IPTABLES Adding allowing addresses and reject rest them #iptables #portfiltering
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 --flush | |
sudo iptables -A INPUT -p tcp -s X.X.X.X --dport 22 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport=22 -j DROP | |
sudo iptables-save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment