ruleset: dispatch ct states using verdict map
[project/firewall4.git] / tests / 03_rules / 05_mangle
index 79ae8ec5698026a987d0d8a0b58430469d1e6ae6..e1d27e31cce51e8de8f11e69569748a49b4bfc9b 100644 (file)
@@ -151,17 +151,16 @@ table inet fw4
 flush table inet fw4
 
 table inet fw4 {
-       #
-       # Set definitions
-       #
-
-
        #
        # Defines
        #
 
        define lan_devices = { "eth0", "eth1" }
+       define lan_subnets = {  }
+
        define wan_devices = { "eth2", "eth3" }
+       define wan_subnets = {  }
+
 
        #
        # User includes
@@ -179,7 +178,7 @@ 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"
                iifname { "eth0", "eth1" } jump input_lan comment "!fw4: Handle lan IPv4/IPv6 input traffic"
                iifname { "eth2", "eth3" } jump input_wan comment "!fw4: Handle wan IPv4/IPv6 input traffic"
        }
@@ -187,7 +186,7 @@ table inet fw4 {
        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"
                iifname { "eth0", "eth1" } jump forward_lan comment "!fw4: Handle lan IPv4/IPv6 forward traffic"
                iifname { "eth2", "eth3" } jump forward_wan comment "!fw4: Handle wan IPv4/IPv6 forward traffic"
        }
@@ -197,15 +196,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"
                oifname { "eth0", "eth1" } jump output_lan comment "!fw4: Handle lan IPv4/IPv6 output traffic"
                oifname { "eth2", "eth3" } jump output_wan comment "!fw4: Handle wan IPv4/IPv6 output traffic"
        }
 
        chain prerouting {
                type filter hook prerouting priority filter; policy accept;
-               iifname { "eth0", "eth1" } jump helper_lan comment "!fw4: lan IPv4/IPv6 CT helper assignment"
-               iifname { "eth2", "eth3" } jump helper_wan comment "!fw4: wan IPv4/IPv6 CT helper assignment"
+               iifname { "eth0", "eth1" } jump helper_lan comment "!fw4: Handle lan IPv4/IPv6 helper assignment"
+               iifname { "eth2", "eth3" } jump helper_wan comment "!fw4: Handle wan IPv4/IPv6 helper assignment"
        }
 
        chain handle_reject {