Revert "ruleset: dispatch ct states using verdict map"
[project/firewall4.git] / tests / 03_rules / 05_mangle
index 4f60557173ba57736d54d0da3bd5424b7e946529..57444ded8b77ab00a8314a18152537a466ca81e4 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
@@ -202,6 +201,12 @@ table inet fw4 {
                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: Handle lan IPv4/IPv6 helper assignment"
+               iifname { "eth2", "eth3" } jump helper_wan comment "!fw4: Handle wan IPv4/IPv6 helper assignment"
+       }
+
        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"
@@ -219,6 +224,9 @@ table inet fw4 {
                jump drop_to_lan
        }
 
+       chain helper_lan {
+       }
+
        chain drop_from_lan {
                iifname { "eth0", "eth1" } counter drop comment "!fw4: drop lan IPv4/IPv6 traffic"
        }
@@ -239,6 +247,9 @@ table inet fw4 {
                jump drop_to_wan
        }
 
+       chain helper_wan {
+       }
+
        chain drop_from_wan {
                iifname { "eth2", "eth3" } counter drop comment "!fw4: drop wan IPv4/IPv6 traffic"
        }
@@ -262,25 +273,17 @@ table inet fw4 {
 
 
        #
-       # Raw rules (notrack & helper)
+       # Raw rules (notrack)
        #
 
        chain raw_prerouting {
                type filter hook prerouting priority raw; 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"
        }
 
        chain raw_output {
                type filter hook output priority raw; policy accept;
        }
 
-       chain helper_lan {
-       }
-
-       chain helper_wan {
-       }
-
 
        #
        # Mangle rules
@@ -327,7 +330,7 @@ table inet fw4 {
        }
 
        chain mangle_output {
-               type filter hook output priority mangle; policy accept;
+               type route hook output priority mangle; policy accept;
                meta nfproto ipv4 meta l4proto tcp counter ip dscp set 0x1 comment "!fw4: Mangle rule #7"
                meta nfproto ipv6 meta l4proto tcp counter ip6 dscp set 0x1 comment "!fw4: Mangle rule #7"
                meta nfproto ipv4 meta l4proto udp counter ip dscp set 0x1 comment "!fw4: Mangle rule #7"