Tuesday, July 3, 2007

VPNC replace Cisco VPNClient

Cisco VPNClient needs to be patched when installed in Ubuntu Feisty Fawn.

If you don't want to run patched software, you could use VPNC :

sudo apt-get install vpnc resolvconf network-manager-vpnc resolvconf

then create the configuration file inside /etc/vpnc , for example /etc/vpnc/abc.conf . Below is the example of abc.conf (ask your VPN server administrator for XXXXXX/YYYYYY below) :

IPSec gateway abc.company.com
IPSec ID XXXXXX
IPSec secret YYYYYY
Xauth username thartono
NAT Traversal Mode cisco-udp
Cisco UDP Encapsulation Port 10000

To connect to abc you just type "sudo vpnc abc"

UPDATE
Thanks for Februaris input, using VPNC we could specify which destination network should be reached using the tunnel interface. Below is the modified vpnc configuration file :

IPSec gateway abc.company.com
IPSec ID XXXXXX
IPSec secret YYYYYY
Xauth username thartono
NAT Traversal Mode cisco-udp
Cisco UDP Encapsulation Port 10000
target networks 171.70.0.0/16 171.71.0.0/16

The last line specifies that any packet destined to 171.70.x.x or 171.71.x.x should be sent via tunnel. Otherwise use different interface, as shown with "route" command below :

thartono@thartono-linux:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
dns-xx.xxxxx.co * 255.255.255.255 UH 0 0 0 tun0
dns-xxx.xxxxx.c * 255.255.255.255 UH 0 0 0 tun0
xxx-vpn-cluster jkr-vlan300-hsr 255.255.255.255 UGH 0 0 0 eth1
64.104.68.0 * 255.255.255.0 U 0 0 0 eth1
192.168.184.0 * 255.255.255.0 U 0 0 0 vmnet1
192.168.207.0 * 255.255.255.0 U 0 0 0 vmnet8
171.71.0.0 * 255.255.0.0 U 0 0 0 tun0
171.70.0.0 * 255.255.0.0 U 0 0 0 tun0
link-local * 255.255.0.0 U 1000 0 0 eth1
default xxx-vlan300-hsr 0.0.0.0 UG 0 0 0 eth1

1 comment:

FebZ said...

To enable split-sunneling, we can add static route instead of default route replacement on vpnc connection. On configuration script, add additional static route. Example :

Target networks 172.16.0.0/16 192.168.0.0/16

This config-line is not intended for vpnc configuration, but it will be used by vpnc to add static route when it is connected.
Tested on vpnc version 0.3.3

Febru