flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
+ define lan_devices = { }
+ define lan_subnets = { }
+
#
# User includes
iifname "lo" accept comment "!fw4: Accept traffic from loopback"
- ct state established,related accept comment "!fw4: Allow inbound established and related flows"
+ ct state vmap { established : accept, related : accept } comment "!fw4: Handle inbound flows"
}
chain forward {
type filter hook forward priority filter; policy drop;
- ct state established,related accept comment "!fw4: Allow forwarded established and related flows"
+ ct state vmap { established : accept, related : accept } comment "!fw4: Handle forwarded flows"
}
chain output {
oifname "lo" accept comment "!fw4: Accept traffic towards loopback"
- ct state established,related accept comment "!fw4: Allow outbound established and related flows"
+ ct state vmap { established : accept, related : accept } comment "!fw4: Handle outbound flows"
meta nfproto ipv4 ip dscp 0x0 counter comment "!fw4: DSCP match rule #1"
meta nfproto ipv6 ip6 dscp 0x0 counter comment "!fw4: DSCP match rule #1"
}
+ chain prerouting {
+ type filter hook prerouting priority filter; policy accept;
+ }
+
chain handle_reject {
meta l4proto tcp reject with tcp reset comment "!fw4: Reject TCP traffic"
reject with icmpx type port-unreachable comment "!fw4: Reject any other traffic"
jump drop_to_lan
}
+ chain helper_lan {
+ }
+
chain drop_from_lan {
}
#
- # Raw rules (notrack & helper)
+ # Raw rules (notrack)
#
chain raw_prerouting {
type filter hook output priority raw; policy accept;
}
- chain helper_lan {
- }
-
#
# Mangle rules