IT Services

VPN connection on Linux (command line)

VPN connection on Linux using command line for the University network

What is needed for the VPN conection

Procedure for the staff role of VPN:n (rpm package etc must be installed).

Step by step guide

[root@trinity tmp]# rpm -qi vpnc
Name        : vpnc                         Relocations: (not relocatable)
Version     : 0.3.3                             Vendor: Fedora Project
Release     : 7.3                           Build Date: Tue 12 Sep 2006 07:22:35 PM EEST
Install Date: Sat 16 Sep 2006 01:07:22 PM EEST      Build Host: hammer2.fedora.phx.redhat.com
Group       : Applications/Internet         Source RPM: vpnc-0.3.3-7.3.src.rpm
Size        : 94189                            License: GPL
Signature   : DSA/SHA1, Fri 15 Sep 2006 03:19:07 AM EEST, Key ID 82ed95041ac70ce6
Packager    : Fedora Project 
URL         : http://www.unix-ag.uni-kl.de/~massar/vpnc/
Summary     : IPSec VPN client compatible with Cisco equipment
Description :
A VPN client compatible with Cisco's EasyVPN equipment.

Supports IPSec (ESP) with Mode Configuration and Xauth. Supports only shared-secret IPSec authentication, 3DES, MD5, and IP tunneling.

Configuration file (file: /etc/vpnc/staff.conf):

IPSec gateway vpn.jyu.fi
IPSec ID staff
IPSec secret staff
# your username goes here:
Xauth username your_username!staff
# if you want to test rekeying specify nonzero seconds here:
#Rekeying interval 0

Connection:

[root@atomium tmp]# vpnc staff.conf
Enter password for your_username!staff@vpn.jyu.fi:
VPNC started in background (pid: 23037)...
[root@trinity tmp]#

Tunnel interface when the VPN connection is working:

root@atomium tmp]# ifconfig
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:130.234.243.7  P-t-P:130.234.243.7  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1412  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:441 (441.0 b)  TX bytes:1455 (1.4 KiB)

[root@atomium tmp]#