How to route my traffic through the VPN

David Woodhouse dwmw2 at infradead.org
Thu Aug 28 06:58:50 PDT 2014


On Thu, 2014-08-28 at 17:54 +0400, manmad dvb12er wrote:
> Thanks a lot for your quick replay.
> Regards the script, I forgot to mention that I used it from the
> command line.
> Anyway, the "Use this connection only for resources on its network" is
> not set.
> How can I change the default route?
> I tried:
> sudo route add -net 0.0.0.0  vpn0
> But it didn't worked: I had no internet access. Am I doing something
> wrong?

The problem here is that your VPN server isn't giving you the network
configuration that you want. I assume you aren't able to fix that?

The simplest way to override it is to use a vpnc-script of your own
which just unsets CISCO_SPLIT_INC and then runs the original
vpnc-script.

That way, it's 'deleting' the explicit routes that the VPN server gives
you, and that means vpnc-script will set up the default route instead.

#!/bin/sh

unset CISCO_SPLIT_INC
exec /etc/vpnc/vpnc-script


-- 
dwmw2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140828/bbf9ea91/attachment.bin>


More information about the openconnect-devel mailing list