Skip to content

Instantly share code, notes, and snippets.

/iptables Secret

Created September 22, 2016 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e8ab0fdf3318ee69c9a59b9edb73cca6 to your computer and use it in GitHub Desktop.
Save anonymous/e8ab0fdf3318ee69c9a59b9edb73cca6 to your computer and use it in GitHub Desktop.
vagrant@utilities:/etc/iptables$ cat rules.v4
# Generated by iptables-save v1.4.21 on Thu Sep 22 05:11:48 2016
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -s 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -p icmp -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Thu Sep 22 05:11:48 2016
vagrant@utilities:/etc/iptables$ cat rules.v6
# Generated by ip6tables-save v1.4.21 on Thu Sep 22 05:11:48 2016
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -s ::1/128 ! -i lo -j REJECT --reject-with icmp6-port-unreachable
-A INPUT -p ipv6-icmp -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Thu Sep 22 05:11:48 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment