2023-10-26 21:13:17 +00:00
|
|
|
*filter
|
2023-10-27 09:03:55 +00:00
|
|
|
:INPUT DROP [0:0]
|
|
|
|
:FORWARD DROP [0:0]
|
|
|
|
:OUTPUT ACCEPT [0:0]
|
2023-10-26 21:13:17 +00:00
|
|
|
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
|
|
|
-A INPUT -p icmp -m state --state NEW -j ACCEPT
|
|
|
|
-A INPUT ! -i {{ lan_iface }} -m state --state NEW -j ACCEPT
|
|
|
|
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
|
|
|
|
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
|
|
|
|
-A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
|
|
|
|
-A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p udp -m state --state NEW -m udp --dport 67 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p udp -m state --state NEW -m udp --dport 69 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT
|
2023-10-27 10:34:26 +00:00
|
|
|
-A INPUT -i {{ lan_iface }} -p udp -m state --state NEW -m udp --dport 123 -j ACCEPT
|
2023-10-26 21:13:17 +00:00
|
|
|
-A INPUT -i {{ lan_iface }} -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p udp -m state --state NEW -m udp --dport 2049 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p udp -m state --state NEW -m udp --dport 4047 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p tcp -m state --state NEW -m tcp --dport 4047 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p tcp -m state --state NEW -m tcp --dport 4048 -j ACCEPT
|
|
|
|
-A INPUT -i {{ lan_iface }} -p udp -m state --state NEW -m udp --dport 4048 -j ACCEPT
|
|
|
|
-A FORWARD -i {{ lan_iface }} -o {{ lan_iface }} -j REJECT --reject-with icmp-port-unreachable
|
2023-10-27 09:03:55 +00:00
|
|
|
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
|
|
|
-A FORWARD -i {{ lan_iface }} -o {{ lan_iface }} -j REJECT --reject-with icmp-port-unreachable
|
|
|
|
-A FORWARD -i {{ lan_iface }} -j ACCEPT
|
2023-10-26 21:13:17 +00:00
|
|
|
COMMIT
|
|
|
|
*nat
|
2023-10-27 09:03:55 +00:00
|
|
|
:PREROUTING ACCEPT [0:0]
|
|
|
|
:INPUT ACCEPT [0:0]
|
|
|
|
:OUTPUT ACCEPT [0:0]
|
|
|
|
:POSTROUTING ACCEPT [0:0]
|
2023-10-26 21:13:17 +00:00
|
|
|
-A POSTROUTING -o {{ wan_iface }} -j MASQUERADE
|
|
|
|
COMMIT
|