Skip to content

Instantly share code, notes, and snippets.

@mmalmeida
Last active December 23, 2015 06:59
Show Gist options
  • Select an option

  • Save mmalmeida/6597566 to your computer and use it in GitHub Desktop.

Select an option

Save mmalmeida/6597566 to your computer and use it in GitHub Desktop.
iptables
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -s 1.2.3.4/32 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8000 -j DROP
# Generated by iptables-save v1.4.4 on Tue Sep 17 18:24:47 2013
*filter
:INPUT ACCEPT [1087:102455]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1083:157095]
-A INPUT -s 1.2.3.4/32 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8000 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment