Skip to content

Instantly share code, notes, and snippets.

@gargolito
Created July 27, 2020 13:56
Show Gist options
  • Save gargolito/fa5514ecf790dc53c8c66632f78c6f34 to your computer and use it in GitHub Desktop.
Save gargolito/fa5514ecf790dc53c8c66632f78c6f34 to your computer and use it in GitHub Desktop.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -s 192.168.1.2/32 -p tcp -m multiport --dports 22 -j ACCEPT
-A INPUT -s 172.16.1.3/32 -p tcp -m multiport --dports 22 -j ACCEPT
-A INPUT -p tcp --dport ssh -j DROP
COMMIT
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment