Default route and it relation to Policy based routing

I'd like to understand something instead of being handed the solution to a specific problem.

In a PBR scenario for inbound and outbound vpn, am I supposed to set the default route in the policy table myself by defining a at the bottom that points to my mullvad interface (and remove the "add route" in all peer tab's) ?
Or should I define the default route on the peer tab of my mullvad "interface" and only use the policy table for the inbound vpn (after having remove "add route" in its peer tab.)

Both my tunnels work .. but not in unison. I have multiple vlan's and successfully figured out how to selectively do "intervlan" between them.
But the vpn routing stuff just eludes me.


If you don't want to use pbr package, then a set of rules/routes for the vpn connection is needed.
For a piece of advice, filter out the default gateway from the vpn client, so that you only have the default route from the ISP on the main routing table.
Then create a route for the default via the vpn gateway in a new routing table. Finally make a rule to match the traffic that will use the new routing table, that is to use the vpn.

1 Like

With Both tunnels you mean you have two WireGuard tunnels to Mullvad?

If so do not Enable route allowed IP's but do use for allowed IPs
If done so there is no default route and you can use pbr to make routing decisions and your main routing table is using your ISP.

You might have a DNS leak if that is a problem see: