add iptables rules example
This commit is contained in:
parent
0278f24eef
commit
78f70f3b4d
2 changed files with 49 additions and 0 deletions
26
ip6tables.rules.example
Normal file
26
ip6tables.rules.example
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
*filter
|
||||
:INPUT DROP [0:0]
|
||||
:FORWARD DROP [0:0]
|
||||
:OUTPUT ACCEPT [0:0]
|
||||
:TCP - [0:0]
|
||||
:UDP - [0:0]
|
||||
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
-A INPUT -i lo -j ACCEPT
|
||||
-A INPUT -m conntrack --ctstate INVALID -j DROP
|
||||
|
||||
# for ICMPv6 Neighbor Discovery Protocol
|
||||
# (note: need a corresponding line for each directly attached subnet)
|
||||
-A INPUT -p ipv6-icmp --icmpv6-type 128 -m conntrack --ctstate NEW -j ACCEPT
|
||||
-A INPUT -s fe80::/10 -p ipv6-icmp -j ACCEPT
|
||||
|
||||
-A INPUT -p udp -m conntrack --ctstate NEW -j UDP
|
||||
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j TCP
|
||||
-A INPUT -p udp -j REJECT --reject-with icmp6-port-unreachable
|
||||
-A INPUT -p tcp -j REJECT --reject-with tcp-reset
|
||||
-A INPUT -j REJECT
|
||||
|
||||
# accept incoming connections on UDP port 546, to enable DHCPv6
|
||||
-A UDP -p udp --sport 547 --dport 546 -j ACCEPT
|
||||
|
||||
|
||||
COMMIT
|
||||
Loading…
Add table
Add a link
Reference in a new issue