Need full config please, if I am to be of assistance.
/export hide-sensitive file=anynameyouwish ( minus router serial number and any public WANIP information )
Then, you can route an IP list connection via VPN routing table with dst-address-type is not local
/ip firewall mangle
add action=mark-routing chain=prerouting src-address-list=ListA dst-address-list=ListB dst-address-type=!local new-routing-mark=VPN_routing_table passthrough=no
I got it to work by adding a new routing table with the wireguard as the default gateway, and creating a routing rule to use this table for the specific clients that I want to go through vpn.
Is that basically what this mangle rule is doing?
That is the better way yes, you can do an entire subnet or 3 individual users. All good.
By the way if they need also to access a different subnet on the lan, just put another routing rule BEFORE the wg ones, so that they can access local devices aka like a printer.
add dst-address=IPofPrinter action=lookup-only-in-table table=main
I’m promoting this post as I have a very similar situation described. Let me know if I need to open a new post.
See below my network diagram:
My problem is, when I access my local network via Wireguard - Road Warrior from outside (laptop with IP 192.168.50.2), I have access to my router and all LAN devices (I added Wireguard interface to LAN interface list), except access to the Raspberry Pi which is routed to Surfshark VPN (via Wireguard), since I need all traffic from this device to go out via VPN.
My question is, how can I keep this Raspberry routed to Surfshark VPN, and at the same time be able to access it from outside my local network?
/routing rule add action=lookup-only-in-table dst-address=192.168.50.2 table=main { has to be first rule }
add action=lookup-only-in-table comment=“Orange Pi” src-address=192.168.87.241/32 table=Surfshark { note dont need bridge interface in there }
Added in first position the rule you said. As I have several devices going through Wireguard, I specified whole range of IPs (192.168.50.0/24), I guess it’s OK?