Connecting Cisco VPN using vpnc on latest ubuntu 9.04
Install vpnc package with following command.
divyen@divyen-laptop:~$ sudo apt-get install vpnc
Create a file default.conf at /etc/vpnc/ with following lines and
fill in the required parameters replacing strings enclosed within “<” and “>” without keeping “<" and ">”.
divyen@divyen-laptop:~$ sudo vi /etc/vpnc/default.conf
IPSec gateway <gateway>
IPSec ID <group-id>
IPSec secret <group-pass-key>
Xauth username <user-name>
NAT Traversal Mode cisco-udp
IPSec ID <group-id>
IPSec secret <group-pass-key>
Xauth username <user-name>
NAT Traversal Mode cisco-udp
Note: Make sure you don’t append extra space at the end of parameter value.
Connect using “vpnc-connect” command.
divyen@divyen-laptop:~$ sudo vpnc-connect
[sudo] password for divyen:
Enter password for user-name@company-vpn-gateway:
[sudo] password for divyen:
Enter password for user-name@company-vpn-gateway:
To disconnect type in following command.
divyen@divyen-laptop:~$ sudo vpnc-disconnect
Terminating vpnc daemon (pid: 7894)
Terminating vpnc daemon (pid: 7894)
Categories: Ubuntu
if you see this error.
Error: /etc/resolv.conf must be a symlink
Here is the fix
$ cd /etc
$ sudo rm -rf /etc/resolv.conf
$/etc$ sudo ln -s /etc/resolvconf/run/resolv.conf
reboot the machine and try connecting again.
You can also use vpnc plugin for network manager which has GUI
$ sudo apt-get install networkmanager-vpnc
After that you can create right click network manager icon in your panel and configure the needed information for your VPN. In the GUI you can create several profile if you connect via several vpn gateways.
The GUI method somehow doesn’t complain about resolv.conf not being a symlink and can add necessary nameserver into /etc/resolv.conf
If somehow you cannot browse after successfully connecting to the VPN, make sure that you choose the correct NAT transversal mode. The default for GUI is Cisco-UDP, but the default in commandline is NAT-T.