Routing Traffic through normal wan whIle VPN is active

perhaps someone can tell me how to route traffic from and to br-lan ( local lan ) while the default gateway is a vpn server. In the logs i saw an incoming connection while the vpn is active so i guess my default wan interface is listen anyways, i used a ddns service which is updated with my "normal" public ip, but the answer is routed through the vpn i think so no communication can established.
Is there a chance to tell openwrt to answer on a specified port over the normal wan interface while the rest is routed through the default gateway of the vpn ?

Not sure if this works but you can bind the DDNS service to a specific interface on the Advanced tab of DDNS.
Bind it to the WAN, maybe this works.

If not you can use Policy Based Routing
PBR User guide


hmh not sure but like i said the ddns updater already puts the right public ip from my provider ( not that from the vpn ) to the domain i tested to connect to while the wireguard ( NordVPN ) Interface is active. i get an incoming connection but i think no answer to the client outside of the network so the connection fail.

sorry for my bad english !

OK, I think you mean you are using a VPN client e.g. to a commercial provider and also want to use a VPN server?

If so you need Policy based routing see the links in my earlier post.

The problem with this setup is that traffic for the VPN server enters the WAN but the default route is out via the VPN client and that is a no go.

With PBR you can either free the WAN or make a route to route traffic with a source of the VPN server (e.g. port 1194 for OpenVPN ) routed via the WAN.

This is described in the guide linked in my earlier post see also an other example (this one is for WireGuard but it works the same for OpenVPN)


What is type of 'vpn'?

thank you very much thats what i meant. lets see if i get it working ...

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.