Route all traffic through WireGuard VPN provider but keep LAN access between subnets?

Hi,

I am currently running my wireless devices through Nord Lynx and have so far:

  • Created a routing table
    Added IP routes for 0.0.0.0/0 to my WireGuard gateway for said routing table
    Added necessary firewall rules
    Added a routing rule to take 192.168.5.0/24 through only the WireGuard lookup table.

All works fine however I obviously lose access to my other subnets unless I manually create a route for each subnet in the WireGuard table.

I was considering specifying 192.168.0.0/16 as a routing rule instead to throw all of my traffic through the tunnel, but before I do so, I just wanted to check whether there was a better way to allow LAN traffic back without specifying each subnet / gateway in the WireGuard routing table? Mostly so I don’t forget to maintain the table if I add further subnets.

I’m not sure if I’m missing anything obvious as I’m new to networking.

Not quite!!
Simply place an additional routing rule PRIOR to the existing rule… (order counts)

add dst-address=local subnet (.0/24) action=lookup-only-in-table table=main
add src-address=192.168.5.0/24 action=lookup table=use-wireguard.


https://forum.mikrotik.com/viewtopic.php?t=182340

Ahhh! OK, so I don’t have to define these rules separately in each routing table, I could just create a 192.168.0.0/16 routing rule to only look-up in the main table and that would cover it centrally?

I never use 16, only 24, I never make any claims of being bigger than /24 :wink: