ruleset: dispatch ct states using verdict map
[project/firewall4.git] / tests / 03_rules / 03_constraints
index f92ef27b6405f30fc0fbd013387cefbd8daa9fe6..eb3272fb41d7d2039ac5fccf868a737c41d3afa7 100644 (file)
@@ -83,15 +83,13 @@ table inet fw4
 flush table inet fw4
 
 table inet fw4 {
-       #
-       # Set definitions
-       #
-
-
        #
        # Defines
        #
 
+       define lan_devices = {  }
+       define lan_subnets = {  }
+
 
        #
        # User includes
@@ -109,13 +107,13 @@ table inet fw4 {
 
                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 {
@@ -123,11 +121,15 @@ table inet fw4 {
 
                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"
@@ -145,6 +147,9 @@ table inet fw4 {
                jump drop_to_lan
        }
 
+       chain helper_lan {
+       }
+
        chain drop_from_lan {
        }
 
@@ -166,7 +171,7 @@ table inet fw4 {
 
 
        #
-       # Raw rules (notrack & helper)
+       # Raw rules (notrack)
        #
 
        chain raw_prerouting {
@@ -177,9 +182,6 @@ table inet fw4 {
                type filter hook output priority raw; policy accept;
        }
 
-       chain helper_lan {
-       }
-
 
        #
        # Mangle rules