Skip to content

Instantly share code, notes, and snippets.

@bluebycode
Last active May 3, 2016 17:22
Show Gist options
  • Save bluebycode/249491175fec305fe17ecbc619e1f75b to your computer and use it in GitHub Desktop.
Save bluebycode/249491175fec305fe17ecbc619e1f75b to your computer and use it in GitHub Desktop.
IPTABLES Adding allowing addresses and reject rest them #iptables #portfiltering
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