Do not route local network traffic to VPN

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
qwerty21
Posts: 2
Joined: Wed Sep 15, 2021 5:06 pm

Do not route local network traffic to VPN

Post by qwerty21 » Fri Oct 22, 2021 5:12 pm

Hello,

I'm confused with configuring that the local network traffic is not routed via VPN. I want to use the VPN at home (local ip: 10.0.0.2, gateway: 10.0.0.255, subnet: 255.0.0.0) and in other public networks.

To access my services in my local network at home, the VPN should not route traffic which is going to 10.0.0.0/18 to my VPN server which is hosted on a VPS (let's say my VPN server has following public ip: 165.25.82.1, subnet 255.255.255.0 and gateway 165.25.82.254)

When I am not at home (when at my friend's house or at work), traffic going to local networks with ip 192.168.0.0/18 should generally not be routed to VPN. All other traffic (to external websites/networks) should go via VPN, to browse securely.

Examples, what should happen when ...
- accessing: 10.0.0.3 (webserver at home) -> using local ip 10.0.0.2 (does not go to VPN)
- accessing: 192.168.0.3 (server at work) -> using local ip at work (does not go to VPN)
- accessing: external servers like 8.8.8.8 (google) -> using public ip of my VPS 165.25.82.1 (all traffic does go to VPN)

Currently, all traffic is routed via VPN and I have to disable my VPN if I want to access services in my local network.

How can I establish this without changing routes on my clients? I found several other posts, but they all cover cases that at the VPN server side there is a network). Thanks for your help.

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Do not route local network traffic to VPN

Post by solo » Fri Oct 22, 2021 10:11 pm

On your SE client virtual adapter increase the interface metric above everything else.

golosinas
Posts: 3
Joined: Wed Dec 23, 2020 6:16 am

Re: Do not route local network traffic to VPN

Post by golosinas » Wed Nov 03, 2021 7:47 pm

I confirm.
Didint work once with internet by 4g modem. Setting "No adjustments of routing table" in connection's advanced settings worked.

Post Reply