How to install Cisco VPN client on Ubuntu Jaunty Jackalope and Karmic Koala 64 bit

 

Update 2011-05-09: There is a new patch that works (I still recommend the vpnc client instead of Cisco client). I’ve mirrored the patch to my server: fixes-2.6.38.patch. Please note that you should apply the patch against a vanilla vpnclient setup directory (no other patch applied).

cd vpnclient/setup/directory/
wget http://www.lamnk.com/download/fixes-2.6.38.patch
patch < ./fixes-2.6.38.patch
sudo ./vpn_install

Again, from the awesome tuxx-home.at forum.
Update 2011-05-08: Doesn't work for Natty Narwhal 11.04. There is currently no fix for this. You should use vpnc instead. It should be compatible with your VNP server, you just have to install vpnc using Synatics/apt-get and use pcf2vpnc convert your .pcf profile from Cisco client to vpnc .conf profile. Or install network-manager-vpnc-gnome package for a GUI client (doesn't have all capabilities of vpnc on command line).
Update 2010-10-31: Work for Maverick Meerkat 10.10 too
Update 2010-08-26: You can now install with this cisco vpn patch applied. It's all the old patches combined.

cd vpnclient/setup/directory/
wget http://www.lamnk.com/download/fixes.patch
patch < ./fixes.patch
sudo ./vpn_install

This patch is tested on Ubuntu Lucid Lynx 10.04 LTS on 32bit and 64bit.

Old post:
Cisco module again doesn't let us compile against the new kernel in Ubuntu 9.04 and 9.10 beta:

/home/lamnk/vpnclient/interceptor.c: In function ‘interceptor_init’:
/home/lamnk/vpnclient/interceptor.c:132: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/lamnk/vpnclient/interceptor.c:133: error: ‘struct net_device’ has no member named ‘get_stats’
/home/lamnk/vpnclient/interceptor.c:134: error: ‘struct net_device’ has no member named ‘do_ioctl’
/home/lamnk/vpnclient/interceptor.c: In function ‘add_netdev’:
/home/lamnk/vpnclient/interceptor.c:271: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/lamnk/vpnclient/interceptor.c:272: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/lamnk/vpnclient/interceptor.c: In function ‘remove_netdev’:
/home/lamnk/vpnclient/interceptor.c:294: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
make[2]: *** [/home/lamnk/vpnclient/interceptor.o] Error 1
make[1]: *** [_module_/home/lamnk/vpnclient] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-1-generic'
make: *** [default] Error 2
Failed to make module "cisco_ipsec.ko".

Before installtion I assume that you have the latest version 4.8.02.0030 and the required packages for compiling ie gcc, libstdc++6 ... The kernel version should be from 2.6.30 to 2.6.32

  • Download the client and extract it
  • Go to vpnclient folder:
    cd vpnclient

  • Download patch file for 64 bit and apply it (users on 32bit systems can skip this step):

    wget http://lamnk.com/download/vpnclient-linux-4.8.02-64bit.patch

    patch < ./vpnclient-linux-4.8.02-64bit.patch

    sed -i 's/^CFLAGS/EXTRA_CFLAGS/' Makefile

  • Download patch file for newer kernel (2.6.30+) and apply it:

    wget http://lamnk.com/download/vpnclient-linux-2.6.31-final.diff

    patch < ./vpnclient-linux-2.6.31-final.diff

  • Next we must edit a kernel source file

    sudo sed -i 's/const\ struct\ net_device_ops\ \*netdev_ops;/struct\ net_device_ops\ \*netdev_ops;/' `find /usr/src -name netdevice.h`

    Yes, it is a one liner, you should copy & paste that command instead of typing ;) The command's translation into English: find the string const struct net_device_ops *netdev_ops; and change it to struct net_device_ops *netdev_ops; in the file locates at

    find /usr/src -name netdevice.h

  • And finally, install Cisco VPN Client:

    sudo ./vpn_install

The patch files are not from me. All credit goes to the people at tuxx-home.at forum

If you can't install or have a problem please leave a comment

Related posts:

  • Vladimir Minakov

    You wrote that the kernel version should be from 2.6.30 to 2.6.32. But I have 2.6.34 kernel installed. And making fails… :( Please? help me!

    ancient@vminakov ~/setup/vpnclient $ uname -a
    Linux vminakov 2.6.34-gentoo-r1 #1 SMP Tue Jul 27 10:06:42 EEST 2010 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux

  • http://twitter.com/patrocinio patrocinio

    Thank you. It worked like a charm!

  • Roland Mai

    Awesome! Thanks. Worked on lucid for me as well. Kernel 2.6.32-24-generic

  • tmunro55

    running Ubuntu 10.04 LTS (Lucid Lynx)
    Everything worked except the build:

    Making module
    make -C /lib/modules/2.6.32-24-generic/build SUBDIRS=/home/tim/vpnclient modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.32-24-generic'
    CC [M] /home/tim/vpnclient/linuxcniapi.o
    CC [M] /home/tim/vpnclient/frag.o
    CC [M] /home/tim/vpnclient/IPSecDrvOS_linux.o
    CC [M] /home/tim/vpnclient/interceptor.o
    /home/tim/vpnclient/interceptor.c: In function ‘interceptor_init’:
    /home/tim/vpnclient/interceptor.c:132: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    /home/tim/vpnclient/interceptor.c:133: error: ‘struct net_device’ has no member named ‘get_stats’
    /home/tim/vpnclient/interceptor.c:134: error: ‘struct net_device’ has no member named ‘do_ioctl’
    /home/tim/vpnclient/interceptor.c: In function ‘add_netdev’:
    /home/tim/vpnclient/interceptor.c:271: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    /home/tim/vpnclient/interceptor.c:272: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    /home/tim/vpnclient/interceptor.c: In function ‘remove_netdev’:
    /home/tim/vpnclient/interceptor.c:294: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    make[2]: *** [/home/tim/vpnclient/interceptor.o] Error 1
    make[1]: *** [_module_/home/tim/vpnclient] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-24-generic'
    make: *** [default] Error 2
    Failed to make module “cisco_ipsec.ko”.

  • tmunro55

    Sorry here's uname -a info:

    Linux aragorn 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux

  • wang lihua

    Thank you very much, my vpn client is running now~~

  • Pingback: How to install Cisco vpn client on Fedora Core 13 « Adventures of Little Mishi

  • Pingback: vpn , وی پی ان , وی پی ان رایگان , اکانت وی پی ان , اکانت vpn , vpn رایگان , وی پی ان مجانی , vpn مجانی , خرید vpn , خرید وی پی ان | وی پی ان

  • Pingback: How to install Cisco VPN client on Ubuntu Hardy Heron 8.04 64 bit | L.A.M.N.K

  • Pingback: installing cisco vpn client on any 64 bit linux « C S Shyam Sundar's Thoughtpad

  • Pingback: Tommy's Blog » Fedora 上安装支持 IPSec 的 VPN 客户端