Skip to content

Instantly share code, notes, and snippets.

@lolzballs
Last active June 8, 2019 00:42
Show Gist options
  • Save lolzballs/978304852d653d36d9c50b6a4a04b1d6 to your computer and use it in GitHub Desktop.
Save lolzballs/978304852d653d36d9c50b6a4a04b1d6 to your computer and use it in GitHub Desktop.
iptables
*filter
:INPUT DROP
:FORWARD DROP
:OUTPUT ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp --dport 5353 -j ACCEPT
-A INPUT -p icmp -j REJECT
-A INPUT -p tcp -j REJECT --reject-with tcp-reset
-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -j REJECT --reject-with icmp-proto-unreachable
COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment