I have tried to implement policy based routing having created an nftable, created a set, populated the table and added some output and prerouting rules:
nft add chain inet myfilter output { type route hook output priority filter; policy accept; }
nft add rule inet myfilter output ip daddr @ip_exclude counter ct mark set 0x2 meta mark set ct mark
nft add chain inet myfilter prerouting { type filter hook prerouting priority mangle; policy accept; }
nft add rule inet myfilter prerouting ip daddr @ip_exclude counter ct mark set 0x2 meta mark set ct mark
ip rule add fwmark 0x2 table 100
ip route add default via 192.168.28.1 dev wg0 table 100
When attempting to connect to the site through the new interface I get the error:
This site can't be reached.
What is causing the issue?