Tuesday, August 10, 2010

How to use vpn in Ubuntu 10.04

As a student, using vpn at home has several advantages:
(1) The connection is more secure.
(2) After connecting to the vpn server of the university, we can directly download paper etc., without being prompted for password or payment.

Take the University of Minnesota (UMN) vpn server for example, we can configure Ubuntu 10.04 to use UMN vpn server in the following steps:
(1) Download the UMN vpn profile "uofmvpn.pcf" from http://www.oit.umn.edu/vpn/download-vpn/index.htm. The file is located at the bottom of the page. You need to enter you x500 username and password to download the file.

(2) Decipher the group password.
(2.1)First download the file cisco-decrypt.c
wget http://www.unix-ag.uni-kl.de/~massar/soft/cisco-decrypt.c
(2.2)Next compile it
gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config --libs --cflags)
(2.3)Finally, decipher the password. Write down on a paper the output, which is the group password.
grep enc_GroupPwd uofmvpn.pcf | awk -F= '{print $2 }' | xargs ./cisco-decrypt

(3) Install vpn
sudo apt-get install network-manager-vpnc vpnc

(4) Configure vpn
sudo bash
cd /etc/vpn
cp example.conf umn.conf
gedit umn.conf
Change it to be like this
IPSec gateway [The entry "Host" in uofmvpn.pcf]
IPSec ID [The entry "GroupName" in uofmvpn.pcf]
IPSec secret [The group password you got from step (2)]

After these steps, to connect to the vpn server, simply enter "sudo vpnc-connect umn" in a terminal, and you'll be prompted for your x500 username and password.

Instead of step (4), you can also configure it from the wireless icon in the upper right corner. Right-click->Edit connections->VPN->Add, then enter the corresponding information.

No comments:

Visitors