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

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)


Comments:

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.

Posted by Divyen Patel on May 09, 2009 at 05:09 AM PDT #

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.

Posted by Adrianus Kurnadi on August 27, 2009 at 04:01 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Divyen Patel

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today