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 “” without keeping “”.

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

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:

To disconnect type in following command.

divyen@divyen-laptop:~$ sudo vpnc-disconnect

Terminating vpnc daemon (pid: 7894)
Advertisements

2 thoughts on “Connecting Cisco VPN using vpnc on latest ubuntu 9.04

  1. 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.

  2. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s