Connect to Cisco Nortel Contivity VPN from Ubuntu

I finally figured out how to get Ubuntu to connect to a Nortel Contivity VPN. It took quite a while to find the right app and configuration, but after a lot of search, I’ve found a package called vpnc (vpn client for cisco3000 VPN Concentrator). The project homepage is found here and it is supposed to work with:

* Cisco VPN concentrator 3000 Series
* Cisco IOS routers
* Cisco PIX / ASA Zecurity Appliances
* Juniper/Netscreen

and it supports the following:

Authentications: Hybrid, Pre-Shared-Key + XAUTH, Pre-Shared-Key
IKE DH-Groups: dh1 dh2 dh5
Hash Algo (IKE/IPSEC): md5 sha1
Encryptions (IKE/IPSEC): (null) (1des) 3des aes128 aes192 aes256
Perfect Forward Secrecy: nopfs dh1 dh2 dh5

However, the version we need to work with the Nortel Contivity group authentication is found in the svn repos.
Before we get there, we need to install some dependencies:

1. Install dependencies

sudo apt-get install libcrypt*
sudo apt-get install gnutls-bin
sudo apt-get install libgnutls-devsudo 
sudo apt-get install resolvconf

You will find there are different branches of vpnc client, you need the one from the vpnc-nortel branch as I mentioned above. The branches you’ll find are:
There is also a package called vpnc-0.5.3.tar.gz, DON’T get this one either.

The reason you need the vpnc-nortel branch is because it supports these 2 options, which are crucial for this to work:
–auth-mode gpassword –vendor nortel

2. Go to a directory where you’d like to download the app and download the latest vpnc-nortel client from here via svn. The version I currently installed is revision 457. Once the command below is ran, a new folder is created called vpnc-nortel

svn checkout

3. Install the vpn client:

cd vpnc-nortel
sudo make install

4. Run the app. There are 2 ways you can start the vpn:
4.1 Method 1 (Command line):

sudo vpnc --gateway --id yourgroupid --username yourusername --natt-mode nortel-udp --pfs dh5 --dh dh5 --debug 1 --auth-mode gpassword --vendor nortel

sudo route add default gw
sudo route del -net netmask dev tun0
sudo route del -net default netmask dev tun0
sudo route add -net netmask dev tun0

4.2 Method 2 (Config file):

Create the vpn config file called whatevername.conf (obviously you can name the conf file whatever you’d like) in /etc/vpnc/ so you don’t have to type all the above. Also create the file contivity-ip-split-script (also can be called anything you’d like) to configure the network and route, in the same folder /etc/vpnc/.

#### whatevername.conf begins here

IPSec gateway
IPSec ID yourgroupid
IPSec secret yourgrouppassword
Xauth username yourusername
Xauth password yourpassword
#### This is specific to  Nortel Contivity Server Config 
NAT Traversal Mode nortel-udp
Vendor nortel
Perfect Forward Secrecy dh5
IKE DH Group dh5
IKE Authmode gpassword
Debug 1 

Script /etc/vpnc/contivity-ip-split-script

#### end whatevername.conf

Now we create the script that’ll handle the route. Script is called
/etc/vpnc/contivity-ip-split-script. Remember to change the settings in this file to match your needs.


# ===== /etc/vpnc/contivity-ip-split-script

add_ip ()
        export CISCO_SPLIT_INC=$(($CISCO_SPLIT_INC + 1))
add_Csubnet ()
        export CISCO_SPLIT_INC=$(($CISCO_SPLIT_INC + 1))
add_Bsubnet ()
        export CISCO_SPLIT_INC=$(($CISCO_SPLIT_INC + 1))
add_Asubnet ()
        export CISCO_SPLIT_INC=$(($CISCO_SPLIT_INC + 1))

# Initialize empty split tunnel list

# Delete DNS info provided by VPN server to use internet DNS
# Comment following line to use DNS beyond VPN tunnel

# List of IPs beyond VPN tunnel
# These should be listed in /etc/hosts also...

### Substitute YYY, AAA, BBB ... for meaningful values i.e
add_ip  #someserver name 
#add_ip 10.YYY.YYY.YYY # www server
#add_ip 10.AAA.BBB.CCC # your workstation
#add_ip 10.ZZZ.ZZZ.ZZZ # some other server
# add_Asubnet     # full private class A subnet
# add_Bsubnet   # eg class B subnet
# add_Csubnet # eg class C subnet

# Execute default script
. /etc/vpnc/vpnc-script

# End of script

5. Now chmod both scripts:

sudo chmod 600 /etc/vpnc/whatevername.conf
sudo chmod 700 /etc/vpnc/contivity-ip-split-script

6. Start up the vpn (obviously only run this if using the config file method, otherwise you’d already have started the vpn in step 4.1. Since we named the config file whatevername.conf, we start the vpn as such:

sudo vpnc whatevername

6. You should be connected now, to disconect the vpn just do:

sudo vpnc-disconnect 

7. If you can’t reach hosts inside the vpn it might be because you haven’t added them to /etc/hosts, so go ahead and do that and you should be good to go. Congratulations, you’re done.

Without the posts below I would not have been able to get this working:
Nortel Group Authentication
vpnc-nortel with group password authentication
vpnc with Nortel Contivity VPN using group auth

Hopefully this tutorial helped you. Thank you for stopping by and please share with others, after all, code should be | because code should be free

7 thoughts on “Connect to Cisco Nortel Contivity VPN from Ubuntu

  1. Hello There. I found your blog using msn. This is an extremely well written article.
    I will make sure to bookmark it and come back to read more of your useful information.

    Thanks for the post. I’ll definitely comeback.

  2. I’m very pleased to find this site. I need to to thank you for ones time for this particularly wonderful read!! I definitely appreciated every part of it and i also have you saved as a favorite to check out new information on your web site.

  3. Excellent post. I was checking continuously this blog and I’m impressed! Extremely useful information specially the last part gcadddagbcde

  4. Thank you a lot for sharing this with all people you actually realize what
    you are talking approximately! Bookmarked. Please additionally talk over with my web site =).
    We may have a link trade agreement among us

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>