Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created November 10, 2014 15:16
Show Gist options
  • Save ccapndave/d3590ee5a867da0dd6a2 to your computer and use it in GitHub Desktop.
Save ccapndave/d3590ee5a867da0dd6a2 to your computer and use it in GitHub Desktop.
$ sudo iptables-save -c
# Generated by iptables-save v1.4.21 on Mon Nov 10 15:16:42 2014
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [260765:59574483]
[4:336] -A INPUT -p icmp -m comment --comment "000 accept all icmp" -j ACCEPT
[172564:38267798] -A INPUT -i lo -m comment --comment "001 accept all to lo interface" -j ACCEPT
[92654:43710172] -A INPUT -m comment --comment "002 accept related established rules" -m state --state RELATED,ESTABLISHED -j ACCEPT
[5:240] -A INPUT -p tcp -m multiport --ports 22 -m comment --comment "100 tcp/22" -j ACCEPT
[1:40] -A INPUT -p tcp -m multiport --ports 443 -m comment --comment "100 tcp/443" -j ACCEPT
[353:22592] -A INPUT -p tcp -m multiport --ports 80 -m comment --comment "100 tcp/80" -j ACCEPT
[1131:90053] -A INPUT -m comment --comment "999 drop all" -j DROP
COMMIT
# Completed on Mon Nov 10 15:16:42 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment