Index

Instructions for 64-bit
Instructions for 32-bit

Linux Cisco VPN Client on Intel for amd64 kernel 2.6.31

Introduction

I've upgraded my laptop to Ubuntu Karmic and noticed my Cisco VPN client didn't work with the new (2.6.31) kernel. The guys in the tuxx-home.at support forum have a working solution, but the supplied patches don't apply very cleanly. Here are the instructions one by one (, mainly meant for my collegues running on the same hardware as I do). All credits go to the guys in the tuxx-home.at support forum!

Please note: this is only for amd64 people, running on an Intel processor!

Instructions

Handy script (i.e. $HOME/bin/vpn)

#!/bin/bash
#
# Cool to put in your $HOME/.profile or $HOME/.bashrc or whatever ...
#  'complete -W 'connect disconnect' vpn'
#

PROFILE=your-profile-name

if [ $1 == "connect" ]; then
	# See http://forum.tuxx-home.at/viewtopic.php?f=15&t=457&st=0&sk=t&sd=a&start=15
	# Optional: disable one CPU when you experience freezes
	# sudo sh -c 'echo 0 > /sys/devices/system/cpu/cpu1/online'
	sudo /etc/init.d/vpnclient_init start
	vpnclient $1 $PROFILE 
elif [ $1 == "disconnect" ]; then
	vpnclient $1 
	# Optional: reenable CPU
	# sudo sh -c 'echo 1 > /sys/devices/system/cpu/cpu1/online'
	sudo /etc/init.d/vpnclient_init stop
else 
	echo "Unknown option $1";
fi

Linux Cisco VPN Client on Intel for x86 kernel 2.6.31

Introduction

For several reasons I switched my Ubuntu Karmic, which uses the 2.6.31-kernel, back from 64bit to 32bit. After migration, I noticed that for some reason, applications I was using in the VPN timed out after several minutes. A 'sudo tcpdump -i eth0 -n arp' showed my that my system didn't respond to the ARP-queries sent by my router. The reason for this is that my local lan access is disabled when I connect to my VPN server. Fortunatly I've found a fix at ilap and in the tuxx-home.at support forum!

Thanks guys! Please note: this is only for x86 people

Instructions

Handy script (i.e. $HOME/bin/vpn)

#!/bin/bash
#
# Cool to put in your $HOME/.profile or $HOME/.bashrc or whatever ...
# 'complete -W 'connect disconnect' vpn'

if [ ! $1 ]; then
	echo "Usage: $(basename $0) <connect|disconnect>";
	exit 1;
fi;

PROFILE=your-profile-name
PRIVATEVLAN=192.168.1.0/24
PRIVATEINT=eth0

if [ $1 == "connect" ]; then
	# See http://forum.tuxx-home.at/viewtopic.php?f=15&t=457&st=0&sk=t&sd=a&start=15
	# Optional: disable one CPU when you experience freezes
	# sudo sh -c 'echo 0 > /sys/devices/system/cpu/cpu1/online'
	sudo /etc/init.d/vpnclient_init start
	(sleep 30 && sudo /sbin/route add -net $PRIVATEVLAN dev $PRIVATEINT)&
	vpnclient $1 $PROFILE 
elif [ $1 == "disconnect" ]; then
	vpnclient $1
	# Optional: reenable CPU again
	# sudo sh -c 'echo 1 > /sys/devices/system/cpu/cpu1/online'
	sudo /etc/init.d/vpnclient_init stop
else
	echo "Unknown option $1";
fi