1

I'm trying to connect to a VPN network using openconnect with the following command:

sudo openconnect -s /etc/vpnc/vpnc-script SERVER

I manage to connect to the VPN, so that I can connect to PCs in the remote network, but the internet traffic is not routed through the VPN. Is this the default behavior? How can I route all the traffic?

I've tried with:

sudo route add default dev tun0

but at that point I cannot even ping google.

My system is Manjaro linux, with openconnect v7.06

1
0

At least the VPN gateway address should use the regular default gateway, otherwise the tunnel endpoint can not be reached anymore causing the tunnel to fail and you end up with nothing.

It depends on the VPN gateway which networks are negotiated/configured to go through the tunnel but you might be able to add some routing rules for other networks as well. If they will work depend on the other side of the tunnel, if those networks are allowed to travel through the tunnel.

Some companies require that all traffic goes through the tunnel, others will only configure the networks they want to travel through the tunnel, leaving everything else untouched.

1
  • In the answer linked by @MariusMatutiae they suggest to override the variable CISCO_SPLIT_INC= but doing so, again, there is no internet at all and seems that also the tunnel cannot reach the internet gateway, The problem is that I don't know the VPN gateway. All the tun0 route entry have 0.0.0.0 as gateway. Example routing entry: 10.13.24.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0 Apr 16 '16 at 13:29
0

I solved my similar issue with:

sudo /sbin/modprobe tun

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.