Connection Wireguard => LAN => VPN => WAN not working

I ran into the same problem see: Policy-Based-Routing (pbr) package discussion - #478 by egc

The PBR interface let you add your own file with rules to execute and I just made a file and added:
ip rule add sport 52180 table pbr_wan
Which is then executed when PBR is active.

Not a true expert but starting with Kernel 4.19 ip rule is very versatile and can be used for a lot of routing decisions without the need for iptables (ipset being an exception, I think) so maybe it can be used instead of iptables?

2 Likes