1

The problem lays on my side. The ip address im trying to resolve is 192.168.4.201 which routes through 192.168.1.1 (my local area network) instead of routing through VPN (10.10.X.X). How do i force 192.168.4.201 to always route through vpn 10.10.x.x ??

I have Ubuntu and I'm using StrongSwan 4.6.4.

mtak
  • 17,262

1 Answers1

1

You should add a route to your routing table.

sudo route add -net 192.168.4.0/24 gw 10.10.x.1 dev vtun0

(change the values where needed. The 10.10.x.1 should be the address of the gateway of the VPN and the device should be the virtual NIC created by the VPN software)

Possibly you can also have the VPN server do this for you. For example in OpenVPN you can add the following statement:

push "route 192.168.4.0 255.255.255.0"
mtak
  • 17,262