Routing through Wireguard VPN and "regular" Internet

Hi Guys,

I’ve already tried a lot of things, but unfortunately I can’t get the following configuration to work:

I have a Teltonika RUTX50 Router.
The Router has an active Wireguard VPN Connection to my home (Endpoint: Unifi UDMPro).
→ The WG Tunnel works, i can connect from the Teltonika Network to the Unifi Network.

The RUTX50 has a WLAN on the Network: 192.168.1.0 (Teltonika IP: 192.168.1.1/24)
The RUTX50 Tunnel IP is: 192.168.55.2 (The Unifi Tunnelserver has 192.168.55.1/24)

I want a specific client (192.168.1.10) to send all of its traffic through the Wireguard VPN tunnel (to the internet).
All other clients in the Teltonika WLAN should access the internet “locally” via any available WAN (sim or other WLAN) as normal.

What is important here is that my normal internet access is usually set up via the SIM card. However, it should also be possible to use a different WLAN for internet traffic if necessary.

How can i archive this? i’m completely free with my config (e.g. extra WLAN Network, etc.)
Unfortunately, I’m not that technically savvy and would like to keep the configuration as simple as possible.

Is there anyone, who can help me with a (step-by-step) guidance for the Network/Routing/Firewall and DNS config?

Thank you very much for your support and best regards
Benedikt

Hello,

In Wireguard → Edit peer → Advanced settings, you can set a custom routing table, i.e. table 244.

Also, you can create additional routing tables and rules in Network → Routing → Policy Based Routing (PBR). For example, create a new Table ID 244, and add a static route 0.0.0.0/0 via the Wireguard interface. Then, on the same PBR page, create a new Routing Rule. There, for example, specify the source subnet as 192.168.10.10/32 and set the lookup table to your newly created table 244.

This way, the traffic coming from 192.168.10.10 will be routed via Table 244 which has the Wireguard interface as the default route.

Kind Regards,

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.