Cisco VPN on OSX

This has happened to me far many times, so thought I might as well document it somewhere instead of having to search for the solution. So here’s the problem, you are on VPN and then you put the laptop to sleep, you wake it up later and try to make it connect to the VPN again and it complains there are no interfaces available to hookup to.
The exact error message is this:

Could not attach to driver. Is kernel module loaded?
The application was unable to communicate with the VPN sub-system.

The solution to this is the following set of commands:

# Shut down the FireWire network interface
sudo ifconfig fw0 down
# Restart the cisco vpn subsystem and verify that it works
sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart &&  \
sudo /usr/local/bin/vpnclient autoinit

and then fire your vpnclient again, this time it works fine and asks you for your username and password.

About rp

Architect for large, highly scalable LAMP applications and Technical Manager with special focus on metrics based continuous improvement of teams and products. Rajat has close to a decade of experience of a very wide range of skills related to infrastructure, middleware, app servers all the way to front-end technologies and software development methodologies including agile, iterative waterfall, waterfall as well as ah-hoc startup using the right approach in the right context to reduce time to market.