How to route my traffic through the VPN

manmad dvb12er dvb12er at yandex.com
Thu Aug 28 07:11:09 PDT 2014


Can't change the server config right now.
When I write exec /etc/vpnc/vpnc-script the terminal closes immediately. 
I add "unset CISCO_SPLIT_INC" to /etc/vpnc/vpnc-script (first line), executed open connect from the command line, and my routing table is the same but tun0 is used instead vpn0:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.138      0.0.0.0         UG    0      0        0 wlan0
10.0.0.0        0.0.0.0         255.0.0.0       U     9      0        0 wlan0
10.100.100.0    0.0.0.0         255.255.255.0   U     0      0        0 tun0
xx.yy.zz.cc   10.0.0.138      255.255.255.255 UGH   0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 tun0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 tun0

I'm really confused...

28.08.2014, 17:58, "David Woodhouse" <dwmw2 at infradead.org>:
> 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



More information about the openconnect-devel mailing list