How to install Cisco VPN client on Ubuntu Hardy Heron 8.04 64 bit

 

UPDATE: A new client for linux (4.8.02.0030) is out. You no longer need the patch for 2.6.24+ kernel (vpnclient-linux-2.6.24-final.diff). However the patch for 64 bit systems is still required and the CFLAGS variable in Makefile still need to be changed to EXTRA_CFLAGS.

June 26 2009: This post also applies to Ubuntu Jaunty Jackalope 9.04 (more than one year later and it’s still not fixed)

I assume that you have the latest version 4.8.01.0640 and the required packages for compiling.

If you install the original Cisco VPN client on Hardy you will receive the following error:

make -C /lib/modules/2.6.24-16-generic/build SUBDIRS=/home/lamnk/src/vpn/vpnclient modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic’
scripts/Makefile.build:46: *** CFLAGS was changed in “/home/lamnk/src/vpn/vpnclient/Makefile”. Fix it to use EXTRA_CFLAGS. Stop.
make[1]: *** [_module_/home/lamnk/src/vpn/vpnclient] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic’
make: *** [default] Error 2

As those lines point out, you need to edit the Makefile file in the vpnclient folder and change CFLAGS to EXTRA_CFLAGS: Change the following line in Makefile

CFLAGS += -mcmodel=kernel -mno-red-zone

to

EXTRA_CFLAGS += -mcmodel=kernel -mno-red-zone

then apply the 2 patches for kernel 2.6.24 and for 64 bit:

vpnclient_folder$ wget lamnk.com/download/vpnclient-linux-2.6.24-final.diff

vpnclient_folder$ wget lamnk.com/download/cisco_skbuff_offset.patch

vpnclient_folder$ patch < ./vpnclient-linux-2.6.24-final.diff

vpnclient_folder$ patch < ./cisco_skbuff_offset.patch

vpnclient_folder$ ./vpn_install

If your system is 32 bit then you only need to patch the vpnclient-linux-2.6.24-final.diff file.

The patch for 64 bit system is from Stephen Frost and the patch for kernel 2.6.24 is from Alexander Griesser. Seriously Cisco should pay those guys some money … If these patches help you then please consider donate them.

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • StumbleUpon
  • Ma.gnolia
  • Reddit

Related posts:

Comments 14

  1. Androide 23 wrote:

    Thank you for this. The installation for me worked fine with your patches. However, when I try to run the vpnclient, I get this message:

    sudo vpnclient connect LinuxUsers
    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.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008 x86_64
    Config file directory: /etc/opt/cisco-vpnclient

    Initializing the VPN connection.
    Secure VPN Connection terminated locally by the Client
    Reason: Failed to establish a VPN connection.
    There are no new notification messages at this time.

    Do you have any idea of what I am doing wrong?
    Thank you!

    Posted 21 May 2008 at 12:06 am
  2. Androide 23 wrote:

    It worked now. My problem was the wireless connection. Vpn worked fine with your patches, after I fixed the wireless.
    Thank you!

    Posted 21 May 2008 at 9:49 pm
  3. Bravo wrote:

    Thanks for these instructions, worked perfectly for me!

    Posted 03 Sep 2008 at 6:39 pm
  4. cesar_spain wrote:

    Script for VPN client installation in Ubuntu 8. Hope it helps.

    http://ubuntuforums.org/showthread.php?p=5725544&posted=1#post5725544

    Posted 04 Sep 2008 at 5:10 pm
  5. steven wrote:

    thanks a lot… it is working for me now…

    [root@lin1 vpnclient]# cp -p Makefile Makefile.back
    *******************************************
    [root@lin1 vpnclient]# vi Makefile
    ########
    replace
    CFLAGS += -mcmodel=kernel -mno-red-zone
    with
    EXTRA_CFLAGS += -mcmodel=kernel -mno-red-zone
    #######
    ********************************************
    [root@lin1 vpnclient]# wget lamnk.com/vpnclient-linux-2.6.24-final.diff
    –2008-09-11 22:28:52– http://lamnk.com/vpnclient-linux-2.6.24-final.diff
    Resolving lamnk.com… 69.73.155.56
    Connecting to lamnk.com|69.73.155.56|:80… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 3989 (3.9K) [text/plain]
    Saving to: `vpnclient-linux-2.6.24-final.diff’

    100%[======================================>] 3,989 –.-K/s in 0.04s

    2008-09-11 22:28:52 (95.4 KB/s) – `vpnclient-linux-2.6.24-final.diff’ saved [3989/3989]

    [root@lin1 vpnclient]# wget lamnk.com/cisco_skbuff_offset.patch
    –2008-09-11 22:28:58– http://lamnk.com/cisco_skbuff_offset.patch
    Resolving lamnk.com… 69.73.155.56
    Connecting to lamnk.com|69.73.155.56|:80… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 4586 (4.5K) [text/plain]
    Saving to: `cisco_skbuff_offset.patch’

    100%[======================================>] 4,586 –.-K/s in 0.04s

    2008-09-11 22:28:58 (107 KB/s) – `cisco_skbuff_offset.patch’ saved [4586/4586]

    [root@lin1 vpnclient]# patch < ./vpnclient-linux-2.6.24-final.diff
    patching file GenDefs.h
    patching file interceptor.c
    [root@lin1 vpnclient]# patch < ./cisco_skbuff_offset.patch
    (Stripping trailing CRs from patch.)
    patching file frag.c
    (Stripping trailing CRs from patch.)
    patching file interceptor.c
    Hunk #1 succeeded at 646 (offset 16 lines).
    Hunk #3 succeeded at 807 (offset 16 lines).
    (Stripping trailing CRs from patch.)
    patching file linuxcniapi.c
    (Stripping trailing CRs from patch.)
    patching file linuxkernelapi.c
    [root@lin1 vpnclient]# ./vpn_install
    Cisco Systems VPN Client Version 4.8.01 (0640) 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]

    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.25.4-30.fc9.x86_64/build]

    * Binaries will be installed in “/usr/local/bin”.
    * Modules will be installed in “/lib/modules/2.6.25.4-30.fc9.x86_64/CiscoVPN”.
    * The VPN service will be started AUTOMATICALLY at boot time.
    * Kernel source from “/lib/modules/2.6.25.4-30.fc9.x86_64/build” will be used to build the module.

    Is the above correct [y]

    Making module
    make -C /lib/modules/2.6.25.4-30.fc9.x86_64/build SUBDIRS=/root/Desktop/vpnclient/vpnclient/vpnclient modules
    make[1]: Entering directory `/usr/src/kernels/2.6.25.4-30.fc9.x86_64′
    CC [M] /root/Desktop/vpnclient/vpnclient/vpnclient/linuxcniapi.o
    CC [M] /root/Desktop/vpnclient/vpnclient/vpnclient/frag.o
    CC [M] /root/Desktop/vpnclient/vpnclient/vpnclient/IPSecDrvOS_linux.o
    CC [M] /root/Desktop/vpnclient/vpnclient/vpnclient/interceptor.o
    CC [M] /root/Desktop/vpnclient/vpnclient/vpnclient/linuxkernelapi.o
    LD [M] /root/Desktop/vpnclient/vpnclient/vpnclient/cisco_ipsec.o
    Building modules, stage 2.
    MODPOST 1 modules
    WARNING: could not find /root/Desktop/vpnclient/vpnclient/vpnclient/.libdriver64.so.cmd for /root/Desktop/vpnclient/vpnclient/vpnclient/libdriver64.so
    CC /root/Desktop/vpnclient/vpnclient/vpnclient/cisco_ipsec.mod.o
    LD [M] /root/Desktop/vpnclient/vpnclient/vpnclient/cisco_ipsec.ko
    make[1]: Leaving directory `/usr/src/kernels/2.6.25.4-30.fc9.x86_64′
    Copying module to directory “/lib/modules/2.6.25.4-30.fc9.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.

    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/”:
    * Replaced 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 (permissions not changed)
    * 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@lin1 vpnclient]# /etc/init.d/vpnclient_init start
    Starting /opt/cisco-vpnclient/bin/vpnclient: Done

    Posted 12 Sep 2008 at 3:37 am
  6. Göran wrote:

    Thanks man, the flag and the 64bit patch made it work on my fedora 9 installation :)

    Posted 05 Nov 2008 at 11:12 am
  7. Pedro Fonseca wrote:

    Thanks Ngo, after so many attempts & failure your recipe worked like a charm.
    I will definitely recommend your site to others!

    pfonseca

    Posted 03 Apr 2009 at 12:33 am
  8. Mike wrote:

    I installed on Ubuntu 9.04 (64) and cannot start Cisco VPN.

    Linux mike-laptop 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 22:12:12 UTC 2009 x86_64 GNU/Linux

    Error:
    root@mike-laptop:/home/mike# /etc/init.d/vpnclient_init start
    Starting /opt/cisco-vpnclient/bin/vpnclient: insmod: error inserting ‘/lib/modules/2.6.28-13-generic/CiscoVPN/cisco_ipsec.ko’: -1 Unknown symbol in module
    Failed (insmod)

    Any ideas why?

    Posted 22 Jul 2009 at 12:14 pm
  9. Lamnk wrote:

    Hi Mike,

    I haven’t ever seen that error. My guess is that the client’s module is not compiled correctly. Try the following: go into the install directory of Cisco vpn and run “sudo ./vpn_uninstall && make clean && make”. See if make throws any error then fix it.

    Posted 27 Jul 2009 at 4:37 pm
  10. David Monniaux wrote:

    For some reason, vpnclient 4.8.02.0030 insists on opening the (personal) certificates files read/write after it has lessened its privileges from ‘root’ to ‘nobody’. Of course, this fails and prevents connection.

    This is most probably an oversight, since vpnclient does not seem to write to the files – they should be opened read-only.

    Workaround:
    chown nobody /etc/CiscoSystemsVPNClient/Certificates/*

    Posted 13 Aug 2009 at 12:35 am
  11. Pekka Lehtikoski wrote:

    Thanks,
    Worked great, I just needed to run
    sudo apt-get install lib32gcc1

    Best regards,
    Pekka Lehtikoski

    Posted 13 Aug 2009 at 12:58 pm
  12. saleem wrote:

    I have ubuntu 8.042 LTS installed. No fire starter installed
    Use BSNL always on broadband. In the gernal tab of network, Automatic dhcp selected.
    Enable roaming mode not selected.
    Installed cisco vpn client successively and able to log onto the server.
    However
    1. I am unable to connect to any website in the browser (Firefox / opers)
    2.When i try to ftp
    ftp aa.aa.com
    the response is name or service unknown

    Perhaps dns is not available
    can anybody help?

    Posted 24 Aug 2009 at 7:45 am
  13. guest101 wrote:

    Hello,
    Any idea on how to install the client on 2.6.32-22-generic? I get the following error messages:
    /home/xx/vpnclient/interceptor.c:132: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    /home/xx/vpnclient/interceptor.c:133: error: ‘struct net_device’ has no member named ‘get_stats’
    /home/xx/vpnclient/interceptor.c:134: error: ‘struct net_device’ has no member named ‘do_ioctl’
    /home/xx/vpnclient/interceptor.c: In function ‘add_netdev’:
    /home/xx/vpnclient/interceptor.c:271: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    /home/xx/vpnclient/interceptor.c:272: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    /home/xx/vpnclient/interceptor.c: In function ‘remove_netdev’:
    /home/xx/interceptor.c:294: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    make[2]: *** [/home/xx/vpnclient/interceptor.o] Error 1
    make[1]: *** [_module_/home/xx/vpnclient] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-22-generic'
    make: *** [default] Error 2
    Failed to make module “cisco_ipsec.ko”.

    Posted 31 May 2010 at 7:30 pm
  14. luckyluke wrote:

    check this out too.
    http://ubuntuforums.org/showthread.php?t=769273

    Posted 03 Jun 2010 at 6:51 pm

Trackbacks & Pingbacks 5

  1. From With kernel 2.6.24 you will need a patch to install Cisco VPN Client | L.A.M.N.K on 20 May 2008 at 10:19 pm

    [...] UPDATE: 64 bit systems are a bit more complicated, please see how to install Cisco VPN on Hardy Heron 8.04 64 bit [...]

  2. From Welcome To The Mind » Linux on the laptop - Ubuntu Hardy 64-bit on a Dell M1530 (continued) on 22 Jun 2008 at 3:47 am

    [...] like Stephen Frost and Alexander Griesser, the job was fairly simple. I followed the brief howto at lamnk.com to accomplish the task, and was up and running in no time. Fixing the eject button Unlike the rest [...]

  3. From www.bitbucketblog.com » Blog Archive » Running the Cisco VPN client 4.8 on 64-bit FC9 on 14 Apr 2009 at 4:40 pm

    [...] googling around, I found a blog created by Lamnk that corrected the errors.  Basically, you need to download 2 patches and edit the Makefile.  [...]

  4. From Cisco VPN Client auf 64Bit Linux « Brians Blog on 12 Oct 2009 at 9:36 am

    [...] Netz habe ich eine Lösung für Ubuntu 8.04 64Bit gefunden, die angeblich auch auf 9.04 laufen sollte. Bei mir hat es nicht funktioniert, weil ein [...]

  5. From Cisco vpnclient 4.8.01.x on Fedora 12 « mhwong.jjdesignsbyhand.com on 24 Mar 2010 at 11:53 pm

    [...] http://www.lamnk.com/blog/domain/how-to-install-cisco-vpn-client-on-ubuntu-hardy-heron-804 [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

blog comments powered by Disqus