VPN CLIENT INSTALLATION on Linux

Learn | Teach Open Source Technologies

VPN CLIENT INSTALLATION on Linux

VPN INSTALLATION on Linux

[root@app-01 ~]# uname -a
 Linux app-01 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@app-01 /]# mkdir download
 [root@app-01 /]# cd download/
 [root@app-01 download]# ll
 total 0
 [root@app-01 download]# mkdir vpn
 [root@app-01 download]# cd vpn/
 [root@app-01 vpn]# ll
 total 0

 [root@app-01 vpn]# wget http://projects.tuxx-home.at/ciscovpn/clients/linux/4.8.02/vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
[root@app-01 vpn]# ll
 total 2008
 -rw-r--r-- 1 root root 2050813 May 20 2009 vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
 [root@app-01 vpn]# tar xvzf vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
 [root@app-01 vpn]# wget http://www.fseitz.de/download/vpnclient.patch-2.6.38
 --2014-05-21 03:58:05-- http://www.fseitz.de/download/vpnclient.patch-2.6.38
 Resolving www.fseitz.de... 85.214.148.166
 Connecting to www.fseitz.de|85.214.148.166|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 8602 (8.4K) [text/plain]
 Saving to: “vpnclient.patch-2.6.38”
100%[============================================================================================>] 8,602 --.-K/s in 0.1s
2014-05-21 03:58:06 (75.2 KB/s) - “vpnclient.patch-2.6.38” saved [8602/8602]
[root@app-01 vpn]# ll
 total 2024
 drwxr-xr-x 2 1000 1000 4096 May 20 2009 vpnclient
 -rw-r--r-- 1 root root 2050813 May 20 2009 vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
 -rw-r--r-- 1 root root 8602 Apr 27 2011 vpnclient.patch-2.6.38
 [root@app-01 vpn]# cd vpnclient
 [root@app-01 vpnclient]# patch <../vpnclient.patch-2.6.38
 patching file frag.c
 patching file interceptor.c
 patching file IPSecDrvOS_linux.c
 patching file linuxcniapi.c
 patching file linuxcniapi.h
 patching file linuxkernelapi.c
 patching file Makefile
 [root@app-01 vpnclient]# make
 make -C /lib/modules/2.6.32-431.11.2.el6.x86_64/build SUBDIRS=/download/vpn/vpnclient modules
 make[1]: Entering directory `/usr/src/kernels/2.6.32-431.11.2.el6.x86_64'
 CC [M] /download/vpn/vpnclient/linuxcniapi.o
 CC [M] /download/vpn/vpnclient/frag.o
 CC [M] /download/vpn/vpnclient/IPSecDrvOS_linux.o
 CC [M] /download/vpn/vpnclient/interceptor.o
 CC [M] /download/vpn/vpnclient/linuxkernelapi.o
 LD [M] /download/vpn/vpnclient/cisco_ipsec.o
 Building modules, stage 2.
 MODPOST 1 modules
 WARNING: could not find /download/vpn/vpnclient/.libdriver64.so.cmd for /download/vpn/vpnclient/libdriver64.so
 CC /download/vpn/vpnclient/cisco_ipsec.mod.o
 LD [M] /download/vpn/vpnclient/cisco_ipsec.ko.unsigned
 NO SIGN [M] /download/vpn/vpnclient/cisco_ipsec.ko
 make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.11.2.el6.x86_64'
 [root@app-01 vpnclient]# ./vpn_install
 Cisco Systems VPN Client Version 4.8.02 (0030) Linux Installer
 Copyright (C) 1998-2006 Cisco Systems, Inc. All Rights Reserved.
By installing this product you agree that you have read the
 license.txt file (The VPN Client license) and will comply with
 its terms.
 Directory where binaries will be installed [/usr/local/bin]
Automatically start the VPN service at boot time [yes]yes
In order to build the VPN kernel module, you must have the
 kernel headers for the version of the kernel you are running.
 Directory containing linux kernel source code [/lib/modules/2.6.32-431.11.2.el6.x86_64/build]
* Binaries will be installed in "/usr/local/bin".
 * Modules will be installed in "/lib/modules/2.6.32-431.11.2.el6.x86_64/CiscoVPN".
 * The VPN service will be started AUTOMATICALLY at boot time.
 * Kernel source from "/lib/modules/2.6.32-431.11.2.el6.x86_64/build" will be used to build the module.
Is the above correct [y]y
Making module
 make -C /lib/modules/2.6.32-431.11.2.el6.x86_64/build SUBDIRS=/download/vpn/vpnclient modules
 make[1]: Entering directory `/usr/src/kernels/2.6.32-431.11.2.el6.x86_64'
 Building modules, stage 2.
 MODPOST 1 modules
 WARNING: could not find /download/vpn/vpnclient/.libdriver64.so.cmd for /download/vpn/vpnclient/libdriver64.so
 make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.11.2.el6.x86_64'
 Create module directory "/lib/modules/2.6.32-431.11.2.el6.x86_64/CiscoVPN".
 Copying module to directory "/lib/modules/2.6.32-431.11.2.el6.x86_64/CiscoVPN".
 Already have group 'bin'
Creating start/stop script "/etc/init.d/vpnclient_init".
 /etc/init.d/vpnclient_init
 Enabling start/stop script for run level 3,4 and 5.
 Creating global config /etc/opt/cisco-vpnclient
Installing license.txt (VPN Client license) in "/opt/cisco-vpnclient/":
 /opt/cisco-vpnclient/license.txt
Installing bundled user profiles in "/etc/opt/cisco-vpnclient/Profiles/":
 * New Profiles : sample
Copying binaries to directory "/opt/cisco-vpnclient/bin".
 Adding symlinks to "/usr/local/bin".
 /opt/cisco-vpnclient/bin/vpnclient
 /opt/cisco-vpnclient/bin/cisco_cert_mgr
 /opt/cisco-vpnclient/bin/ipseclog
 Copying setuid binaries to directory "/opt/cisco-vpnclient/bin".
 /opt/cisco-vpnclient/bin/cvpnd
 Copying libraries to directory "/opt/cisco-vpnclient/lib".
 /opt/cisco-vpnclient/lib/libvpnapi.so
 Copying header files to directory "/opt/cisco-vpnclient/include".
 /opt/cisco-vpnclient/include/vpnapi.h
Setting permissions.
 /opt/cisco-vpnclient/bin/cvpnd (setuid root)
 /opt/cisco-vpnclient (group bin readable)
 /etc/opt/cisco-vpnclient (group bin readable)
 /etc/opt/cisco-vpnclient/Profiles (group bin readable)
 /etc/opt/cisco-vpnclient/Certificates (group bin readable)
 * You may wish to change these permissions to restrict access to root.
 * You must run "/etc/init.d/vpnclient_init start" before using the client.
 * This script will be run AUTOMATICALLY every time you reboot your computer.
[root@app-01 vpnclient]# /etc/init.d/vpnclient_init start
 Starting /opt/cisco-vpnclient/bin/vpnclient: Done
 [root@app-01 vpnclient]# /etc/init.d/vpnclient_init status
 Module Size Used by
 cisco_ipsec 594172 0
cipsec0 Link encap:Ethernet HWaddr 00:0B:FC:F8:01:8F
 NOARP MTU:1356 Metric:1
 RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@app-01 vpnclient]# /etc/init.d/vpnclient_init stop
 Shutting down /opt/cisco-vpnclient/bin/vpnclient: Done

Troubleshooting Steps!
—————————————————————————————-
When iam Trying to Connect VPN client i was getting these error, Then Solve this Problem

 

[root@app-01 vpnclient]# ./vpnclient connect jboss.pcf
 -bash: ./vpnclient: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[root@app-01 vpnclient]# vpnclient connect jboss.pcf
-bash: /usr/local/bin/vpnclient: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[root@app-01 vpnclient]# yum install glibc.i686
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base | 3.7 kB 00:00
epel | 4.2 kB 00:00
Not using downloaded repomd.xml because it is older than what we have:
Current : Tue May 13 09:10:59 2014
Downloaded: Thu Mar 6 13:35:37 2014
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.1 MB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package glibc.i686 0:2.12-1.132.el6_5.1 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6_5.1 for package: glibc-2.12-1.132.el6_5.1.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.132.el6_5.1.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.132.el6_5.1.i686
--> Running transaction check
---> Package glibc-common.x86_64 0:2.12-1.132.el6 will be updated
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.x86_64
---> Package glibc-common.x86_64 0:2.12-1.132.el6_5.1 will be an update
---> Package nss-softokn-freebl.x86_64 0:3.14.3-9.el6 will be updated
---> Package nss-softokn-freebl.i686 0:3.14.3-10.el6_5 will be installed
---> Package nss-softokn-freebl.x86_64 0:3.14.3-10.el6_5 will be an update
--> Running transaction check
---> Package glibc.x86_64 0:2.12-1.132.el6 will be updated
--> Processing Dependency: glibc = 2.12-1.132.el6 for package: glibc-devel-2.12-1.132.el6.x86_64
--> Processing Dependency: glibc = 2.12-1.132.el6 for package: glibc-headers-2.12-1.132.el6.x86_64
---> Package glibc.x86_64 0:2.12-1.132.el6_5.1 will be an update
--> Running transaction check
---> Package glibc-devel.x86_64 0:2.12-1.132.el6 will be updated
---> Package glibc-devel.x86_64 0:2.12-1.132.el6_5.1 will be an update
---> Package glibc-headers.x86_64 0:2.12-1.132.el6 will be updated
---> Package glibc-headers.x86_64 0:2.12-1.132.el6_5.1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================
 Package Arch Version Repository Size
 ======================================================================================================================================
 Installing:
 glibc i686 2.12-1.132.el6_5.1 updates 4.3 M
 Installing for dependencies:
 nss-softokn-freebl i686 3.14.3-10.el6_5 updates 147 k
 Updating for dependencies:
 glibc x86_64 2.12-1.132.el6_5.1 updates 3.8 M
 glibc-common x86_64 2.12-1.132.el6_5.1 updates 14 M
 glibc-devel x86_64 2.12-1.132.el6_5.1 updates 978 k
 glibc-headers x86_64 2.12-1.132.el6_5.1 updates 608 k
 nss-softokn-freebl x86_64 3.14.3-10.el6_5 updates 157 k
Transaction Summary
 ======================================================================================================================================
 Install 2 Package(s)
 Upgrade 5 Package(s)
Total download size: 24 M
 Is this ok [y/N]: y
 Downloading Packages:
 (1/7): glibc-2.12-1.132.el6_5.1.i686.rpm | 4.3 MB 00:00
 (2/7): glibc-2.12-1.132.el6_5.1.x86_64.rpm | 3.8 MB 00:00
 (3/7): glibc-common-2.12-1.132.el6_5.1.x86_64.rpm | 14 MB 00:00
 (4/7): glibc-devel-2.12-1.132.el6_5.1.x86_64.rpm | 978 kB 00:00
 (5/7): glibc-headers-2.12-1.132.el6_5.1.x86_64.rpm | 608 kB 00:00
 (6/7): nss-softokn-freebl-3.14.3-10.el6_5.i686.rpm | 147 kB 00:00
 (7/7): nss-softokn-freebl-3.14.3-10.el6_5.x86_64.rpm | 157 kB 00:00
 --------------------------------------------------------------------------------------------------------------------------------------
 Total 29 MB/s | 24 MB 00:00
 Running rpm_check_debug
 Running Transaction Test
 Transaction Test Succeeded
 Running Transaction
 Updating : glibc-common-2.12-1.132.el6_5.1.x86_64 1/12
 Updating : nss-softokn-freebl-3.14.3-10.el6_5.x86_64 2/12
 Updating : glibc-2.12-1.132.el6_5.1.x86_64 3/12
 Updating : glibc-headers-2.12-1.132.el6_5.1.x86_64 4/12
 Installing : nss-softokn-freebl-3.14.3-10.el6_5.i686 5/12
 Installing : glibc-2.12-1.132.el6_5.1.i686 6/12
 Updating : glibc-devel-2.12-1.132.el6_5.1.x86_64 7/12
 Cleanup : glibc-devel-2.12-1.132.el6.x86_64 8/12
 Cleanup : glibc-headers-2.12-1.132.el6.x86_64 9/12
 Cleanup : glibc-common-2.12-1.132.el6.x86_64 10/12
 Cleanup : nss-softokn-freebl-3.14.3-9.el6.x86_64 11/12
 Cleanup : glibc-2.12-1.132.el6.x86_64 12/12
 Verifying : glibc-2.12-1.132.el6_5.1.x86_64 1/12
 Verifying : glibc-2.12-1.132.el6_5.1.i686 2/12
 Verifying : nss-softokn-freebl-3.14.3-10.el6_5.i686 3/12
 Verifying : glibc-headers-2.12-1.132.el6_5.1.x86_64 4/12
 Verifying : glibc-devel-2.12-1.132.el6_5.1.x86_64 5/12
 Verifying : glibc-common-2.12-1.132.el6_5.1.x86_64 6/12
 Verifying : nss-softokn-freebl-3.14.3-10.el6_5.x86_64 7/12
 Verifying : nss-softokn-freebl-3.14.3-9.el6.x86_64 8/12
 Verifying : glibc-2.12-1.132.el6.x86_64 9/12
 Verifying : glibc-devel-2.12-1.132.el6.x86_64 10/12
 Verifying : glibc-common-2.12-1.132.el6.x86_64 11/12
 Verifying : glibc-headers-2.12-1.132.el6.x86_64 12/12
Installed:
 glibc.i686 0:2.12-1.132.el6_5.1
Dependency Installed:
 nss-softokn-freebl.i686 0:3.14.3-10.el6_5
Dependency Updated:
 glibc.x86_64 0:2.12-1.132.el6_5.1 glibc-common.x86_64 0:2.12-1.132.el6_5.1 glibc-devel.x86_64 0:2.12-1.132.el6_5.1
 glibc-headers.x86_64 0:2.12-1.132.el6_5.1 nss-softokn-freebl.x86_64 0:3.14.3-10.el6_5
Complete!
 [root@app-01 vpnclient]# vpnclient connect jboss.pcf
 Cisco Systems VPN Client Version 4.8.01 (0640)
 Copyright (C) 1998-2007 Cisco Systems, Inc. All Rights Reserved.
 Client Type(s): Linux
 Running on: Linux 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64
 Config file directory: /etc/opt/cisco-vpnclient