[SOLVED] Routing all traffic on the client through the tunnel

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
Axon
Posts: 2
Joined: Wed Aug 30, 2023 3:10 pm

[SOLVED] Routing all traffic on the client through the tunnel

Post by Axon » Wed Aug 30, 2023 3:14 pm

I'm trying to setup a SoftEther VPN server for circumventing the government censorship. Currently I have a working server with SecureNAT enabled, the tunnel is established, and the server's internal IP can be reached from the client. So far, so good. However, the routing table on the client currently looks like this:

Code: Select all

default via 192.168.1.1 dev enp6s0 proto dhcp src 192.168.1.100 metric 100  # Hove router network
default via 192.168.30.1 dev vpn_liberty proto dhcp src 192.168.30.100 metric 1008  # VPN network
10.0.0.0/24 dev wg0 proto static scope link metric 50 
192.168.1.0/24 dev enp6s0 proto kernel scope link src 192.168.1.100 metric 100 
192.168.30.0/24 dev vpn_liberty proto dhcp scope link src 192.168.30.100 metric 1008
As such, the traffic is still routed through the default gw 192.168.1.1. If I set the second default route's metric lower than the first, then the tunnel can no longer be reached, and the traffic goes nowhere. How do I correctly setup the client or server for my use case?
Last edited by Axon on Fri Sep 01, 2023 12:32 pm, edited 1 time in total.

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

Re: Routing all traffic on the client through the tunnel

Post by solo » Wed Aug 30, 2023 11:08 pm

Simply add route to your server and delete default for "router network". Linux clients need to script the routing. Windows clients manage it automatically.

Axon
Posts: 2
Joined: Wed Aug 30, 2023 3:10 pm

Re: Routing all traffic on the client through the tunnel

Post by Axon » Fri Sep 01, 2023 12:32 pm

Thank you so much! That was it, everything works as intended now.

Post Reply