Wireguard server tie to specific wan interface

I would like to set up a wireguard server on my wrt1900acs router to take advantage of adblocking and to access local resources when I am traveling.
On my router, I have a map-e interface set as default route because it is faster compare to the pppoe interface. But the down side is I can't setup vpn server on it due to the map-e interface being a ipv4 through ipv6 tunnel.
I tried the wg server guide but can't get a handshake and "Receive invalid response message from "map-e ip" on my iphone. unable to get it working all the wg interface and firewall rule are deleted.
On my x86 base openwrt, I have a LXC as a wireguard server and using VPN routing policy to point the LXC to wan. But I would like to repurpose the x86 box and move everything to the wrt1900acs if possible.
I was wondering is there a way to have a wg server interface use wan(pppoe) as the default route?

lan > map-e (ipv4 over ipv6 tunnel) default route
wireguard server > wan (pppoe ipv4)

Thank you.

Wireguard doesn't bind to any particular interface. It's a Kernel module. Therefore, it would simply be the same as system's route configuration. Hope this helps.


In theory, you can customize routing policies for outgoing traffic to use a specific routing table like this:

ip rule add iif lo sport 51820 lookup 100

VPN-PBR can also affect the forward/output routing decision to certain extent.

1 Like

Thank you for the advises. I still couldn't get a wireguard server functioning. I think the map-e tunnel added to the level of difficulty which is over my head at this point. So i will abandon this idea and get a raspberry pi to use with vpn-pbr. Again thank you and sorry for the trouble.