table ip wg0 { chain preraw { type filter hook prerouting priority raw; policy accept; iifname != "wg0" ip daddr 10.55.127.342 fib saddr type != local drop; } chain premangle { type filter hook prerouting priority mangle; policy accept; meta l4proto udp meta mark set ct mark; } chain postmangle { type filter hook postrouting priority mangle; policy accept; meta l4proto udp meta mark 0xa22a61a9 ct mark set meta mark; } } table ip6 wg0 { chain preraw { type filter hook prerouting priority raw; policy accept; iifname != "wg0" ip6 daddr ab00:aaaa:aaa:aa02::5:abcd fib saddr type != local drop; } chain premangle { type filter hook prerouting priority mangle; policy accept; meta l4proto udp meta mark set ct mark; } chain postmangle { type filter hook postrouting priority mangle; policy accept; meta l4proto udp meta mark 0xa22a61a9 ct mark set meta mark; } }