Anders Brownworth

Technology and Disruption

Cisco VPN - Fix for Error 51: Unable to communicate with the VPN subsystem

EDIT: You can use the native VPN client in Mac OS X instead of the CiscoVPN software. Here's a guide that tells you how to convert from CiscoVPN to the native OS X client.

If you are running Cisco's VPNClient on Mac OSX, you might be familiar with (or tormented by) "Error 51: Unable to communicate with the VPN subsystem". The simple fix is to quit VPNClient, open a Terminal window, (Applications -> Utilities -> Terminal) and type one of the following:

(for older versions)
sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart

(for newer versions)
sudo kextload /System/Library/Extensions/CiscoVPN.kext

and give your password when it asks. This will stop and start the "VPN Subsystem", or in other words restart the CiscoVPN.kext extension. Cisco seems to have problems when network adapters disappear and reappear, something that happens commonly in Wireless or Dial-up scenerios. Sometimes putting a system to sleep, disconnecting an Ethernet cable or simply reconnecting your wireless will cause CiscoVPN to loose track of the network adapters on the system. Considering that CiscoVPN is typically used by telecommuters, this is an astonishing oversight on Cisco's part. The above hack should side-step all of these issues by causing the CiscoVPN to re-initialize. It makes one ask, why couldn't Cisco have just put the restart into their client? Or a better idea would be to not reinvent the wheel and use the existing IPSec VPN support in OSX! Am I missing something?

EDIT: The MacWorld guys came up with a simpler way to do the same thing:

sudo SystemStarter restart CiscoVPN

Comments (268)

Jeff from Chicago

Thanks for the tip - this worked like a charm.

todd from boston

you the man - thanks!

Tony from Carmel from Carmel

Didn't work but rebooted my computer and the problem went away.

Steve from Minneapolis

Nice - works to correct the same issue when running Windows on a Mac (restart the Cisco VPN Service).

Jason McCarty from Canada

This did not work for me. I've gotten this error ever since I installed the VPN from cisco. I have the 4.9 version as well. What else might I need to do?

Anders from RTP

Yep, a friend of mine pointed that out and I have since confirmed it. Apple's new security update kills CiscoVPN when using dialup adapters. I don't yet have a work-around though I hear it is an issue with Apple, not Cisco. (I have nothing to back that up) I wish Cisco would just give up and use the standard IPSec VPN that comes with OSX. It would make life much easier. I'll do a blog post when I have something on this.

Cacasodo from

Didn't work for me unfortunately, using a wired or wireless connection. Even rebooted for good measure.

'sodo

http://www.techanswerguy.com/

Anders from RTP

A separate issue with the Cisco VPN software and OSX is fixed with the latest Apple Software Update. Apparently a software update around March of 2007 broke the Cisco VPN software's ability to connect though it wouldn't show the "Error 51" that this page talks about. Connections would be attempted and a password was requested but after submitting, the connection would never be established and eventually the Cisco VPN app would time out and go back to the "not connected" state. As of May 2007, Apple has released an update that fixes this issue between Cisco VPN and OSX so now things work again as expected.

This does not cover the "Error 51" issue from this page but did cause the Cisco VPN software not to connect. If you are having this issue, try running Software Update and make sure you have the latest release and see if that helps.

Anthony from

This caused a kernel panic when I ran it for whatever reason.

Sweet!

rutger from holland

how do i solve this issue in windows? reinstalling doesnt work

Anders from RTP

Rutger: This is the first time I'm hearing about this error in Windows. Sorry, I don't have a suggestion for you outside of reinstalling the Cisco VPN software.

greg from wellington NZ

i'm working in wellington unforturneatly this hasn't worked anymore ideas

Anders from RTP

Greg: Are you sure you have the latest OS updates and have tried reinstalling the Cisco VPN software as well?

Adrian Smith from Sydney, NSW, Australia

Error 51 has just cropped up for me as well (4.9.01 (0030))... it was working fine for a while, then error 51 started and I got around it by disabling airport, but just now it is coming up with error 51 everytime :(

Have tried reinstalling but to no avail.

It just started immediately after I installed Missing Sync 6 for Palm OS...

Adrian Smith from Sydney, NSW, Australia

Interesting... a second reinstall and restart has got it working again. Hmmm...

Mika from

Worked Perfectly. Thanks.

OS X 10.4.10, Cisco VPN Client 4.9.01 (0030) and VMWare Fusion Version 1.0 (51348)

John from davis/ca/usa

I had the same issue. Tried everything above to no avail - including a post from another forum recommending to turn off web sharing. I had another mac on the network with an older version of cisco's vpn client and even though it wasn't on, it seemed to interfere when starting this version. So, after installing the client again I went through these steps.
1. turned off the other mac
2. did a command line restart of the vpn client
3. started it up and it worked great!

John from davis/ca/usa

Oh yeah, and for good measure I turned off bluetooth. This may have been the issue, I don't know.

Alberto Molina from New York USA

I lived with this error for a couple of weeks and resorted, ridiculously, to submitting work to the server via ftp.

It finally occurred to me maybe I should try repairing file permissions. Read, Write and execute permissions often get fouled up for some reason on the Mac OSX when new programs are installed. I've been told many times to repair them regularly using Apple's Disk Utility, which makes this a snap. But I always forget and of course hadn't run it in some time - frankly in several months. The last time I ran it was after having headaches due to unexpected behavior in some application or other.

So finally I put together the concept of unexplaiened behavior with Cisco VPN and file permissions. It took me about 45 seconds to open Disk Utility and hit repair and wait for it to complete. I then rebooted the computer and voila - Cisco VPN loaded like it always had before, no Error 51!

massmind.com

Craig from Colorado Springs

Hmmm... VPN over dialup still doesn't work me. I use a Treo700p with MobilStreams USB Modem to connect to the internet when away from a hotspot. My problem is while VPN works fine with my wired and wireless (802.11g) networks it won't connect when I use a dialup connection.

The client starts fine and I can click connect but it thinks for a few seconds and then goes back to disconnected (I never get the password challenge popup)

Does anyone know if the VPN with Dialup issue outlined above was fixed by the update that was mentioned (I wasn't sure if it fixed the error 51 issue or the VPN with Dialup issue)

Thanks for any help

John Thurow from Laramie, WY, USA

I just upgraded to Leopard 10.5 and it started happening. Any thoughts or ideas?

Pascal Drew from France

I have also just upgraded to Leopard 10.5 and it has started happening to me too, tried earlier ideas but to no avail! Please let us know where we go from here ?

Anders from RTP

John / Pascal: I am hearing reports that OS X 10.5 Leopard is working with Cisco VPN 4.9.01 if you do a clean install of CiscoVPN. I have Loepard on my desktop but not my laptop yet and my desktop is at work so I can't test the VPN. Anybody else have experience one way or another on this?

By the way, CiscoVPN keeps config files in /etc/opt/cisco-vpn/ so to keep all your configurations, back that directory up and restore it after you re-install CiscoVPN.

Joe from Mpls, MN

Thanks

Steve from VA

Thanks, saved me some headaches here.

George Coller from Austin, TX

Cool, glad I found this!

Steve Larimore from Lexington

Go to run and type services.msc .. Start the VPN service ..

Patrick from Los Angeles, CA

I was having that error on Mac OS X 10.5.1 but we got the VPN Client version 4.9.01 (0080) and it works great.

Neeraj from austin

been trying it .. still no dice :( .. keep getting error 51.. tried reinstalling and everything.. both builds 90 and 80.. any other tips from anyone????

Anders from RTP

Are you using OS X 10.5 Leopard?

Neeraj from Austin

sorry.. yes , i am using Leopard..

Kevin McMurtrie from Silicon Valley

VPN Client worked in 10.5.1 after I disabled all vlans.

Neeraj from austin

is there a shortcut to disabling all vlans?

Stefano from Italy

I've had the same problem as all you
I've solved with

sudo ifconfig fw0 down


found at
http://www.cb1inc.com/2007/06/11/fixing-cisco-vpn-client-4.9-with-parallels-desktop-3.0-on-mac-os-x

Neeraj from austin

i tried the ifconfig thing as well, even that doesn't work.. i just am cursed i think :)

ike from australia

chmod'ing file permissions fixed it for me:

sudo chmod 777 /etc/opt/cisco-vpnclient/Profiles/

bcgrafx from Greenville/SC/USA

I was able to upgrade to Leopard 10.5 from 10.4.11, install Cisco VPN 4.9.011 (0090) which worked. I then did an update to 10.5.1 and allowed the system to reboot. Cisco VPN is still working fine. I am using it now via a wireless connection to write this. Hope this helps any late adopters of Leopard like me.

ronzoni from new york/ NY /USA

I guess I'm having a different problem.
I can connect to my vpn ok, but then I lose access to the internet.

I see this in the terminal:
Encryption: 168-bit 3-DES
Authentication: HMAC-MD5
IP Compression: None
NAT passthrough is active on port UDP 4500
Local LAN Access is disabled

In the client, and in the profile LocalAccessEnabled is true, though.

Anyone have any suggestions?

I'm on 10.5.1 and cisco vpn 4.9.01 (0080)

Thanks!

Roger Mc Murtrie from Canberra/ACT/Australia

VPNClient.app Version 4.6.04 (0061)
on Intel Mac-mini
Same problem but can't fix.
It did work fine with 10.5.1 originally then started producing Error 51. Tried removing and reinstalling and repair permissions to no avail.

sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart
produces:
Stopping Cisco Systems VPN Driver
kextunload: unload kext /System/Library/Extensions/CiscoVPN.kext failed
Starting Cisco Systems VPN Driver
extension /System/Library/Extensions/CiscoVPN.kext does not contain code for this architecture

which seems ridiculous as it worked with Tiger with occasional Error 51s then originally worked with Leopard 10.5.1

I'll see if I can get my administrator to provide the latest version of VPNClient.

Erik van der Neut from Cambridge, Massachusetts, USA

Brilliant! Made a fixvpn alias for this, and it worked like a charm on Leopard 10.5.1 :-) Thanks so much!

- Erik

Balrob from A Kiwi in Utah

To Roger McMurtrie,

your VPN client is very old - and I'm surprised it ran on 10.5.

You can pull down the 4.9.01 build from MacUpdate.com

cheers

Ben from CA

Thank You! This was exactly what i needed to do!

Tela from Washington DC

The above solutions have not worked for me but I found another fix that does work. I get this error all the time and this fix always works for me.

Access terminal and execute:

$ ifconfig -a

Enter password if prompted. Then execute:

$ sudo ifconfig fw0 down

You may have to execute the command twice. Not sure why. Launch VPN client again. It should work.

There is, apparently, a more permanent fix, but I'm a bit nervous to try it. I'm posting it for those of you that are more brave than I. Let me know if it works.

If you would like to have fw0 disabled on boot, do the following below:

$ sudo pico /System/Library/StartupItems/CiscoVPN/CiscoVPN

Then change the StartService() function to the following:


StartService ()
{
#disable fw0
/sbin/ifconfig fw0 down

if [ -d $CISCO_VPN_DIR ]; then
ConsoleMessage "Starting Cisco Systems VPN Driver"
kextload $CISCO_VPN_DIR
fi
}

Evan McClure from Sunnyvale, CA

This only occurred for me after I ran a software update yesterday. I'm running 10.5.1.

I fixed my issue with a combination of both of the most used methods above: verifying the permissions in the disk utility, and then reloading the driver.

I'm sure that a verify permissions, followed by a reload would do the same thing.

Andre from

Cisco really needs to get their act together. Restarting my computer is not something I want to spend my time doing, since I usually put my computer to sleep. Also, it would seem that Cisco is unable to respect conventions of not putting startup items /System/Library/StartupItems. It should be in /Library/StartupItems.

johnny0 from

I'd also like to see the icon change if I'm connected, but this is probably past the capabilities of the Cisco VPN group. If it weren't based on the Unix build we'd probably not even have a client for the Mac...

Jim Reardon from Madison, WI

Have been getting "Error 51" since upgrading to 10.4. None of the above fixes worked. Trying to run 4.9.01.0080 on a 1.33 GHz PowerPC G4 with 10.4.6, connected to the internet via AirPort. Hmmm--maybe it's the AirPort...

Jack from Palo Alto, CA

Thanks for the tip! It worked perfectly for me! :-)

Miguel Miranda from

Worked like a charm! thanks mate!

Hal from Washington hghts, NY, NY

It worked! You Rock!

Alfonso Mateos from Madrid / Spain / Europe

Thanks a lot, that sudo command worked for me :-)
Anyway, I'm surprised that in January 2008 this issue remains the same... Cisco should really take care of this.

Vince from Chile

Thanks Tela, it worked for me!

Luke from

Thank you very much!!

bob from sf ca

./CiscoVPN restart

worked for me too!

Casey Woods from Calgary, AB

Thanks! Resolved my issue on 10.5.2 using 4.9.01.0100

Jeff from Champaign IL

i had the same problem and was able to get around it by disabling the Firewire port in the network preferences.

mpeg2tom from LA

Yep, it worked for Cisco 4.9.01 on OS X 10.5.2 MacBook Intel

Michael from Horsham PA

We've been on tech support with Cisco for weeks on this. They provided the sudo ifconfig fw0 down command and that is the only thing that fixed this issue. We have the latest VPN client and are running 10.5.2

Strangely this problem pretty much is non-existent if I am on wireless, just wired.

Paul from Mesa Arizona

Thanks! Worked great! The Cisco VPN is crappy software. Why would I want to route all of my network traffic through work anyway? How stupid is this?

Does anyone have instructions on how to use Mac's embedded VPN to talk with a site that uses Cisco VPN and SecureID tokens?

rlmorel from MA

Hi Everyone,
The infamous Error 51 has reared it's head on my laptop running Leopard multiple times. It has ALWAYS been fixed by going into Internet Sharing and making sure that ALL ports are UNCHECKED! Then, once they are all unchecked, disable Internet Sharing and you are good to go.

There are three things to know:
1.) You need to ENABLE Internet Sharing to uncheck the ports. Then you can then DISABLE it again.

2.) For some reason, after upgrades or for no reason whatsoever, my Firewire port will get rechecked. Don't know why. It makes no difference if you have Internet Sharing enabled or disabled, if anything is checked, Cisco VPN simply will not work and will give you the "Error 51:Unable to Connect with the VPN Subsystem..."

3.) Even if you disable the blasted ports...they seem to switch right back on sometimes. You can check before exiting the preferences by simply highlighting some other sharing option then re-highlighting the Internet Sharing option. Last night I got an email from a user with this Error problem, so in the process of making some screenshots, I encountered this "sticky" setting. Just wow...what are the odds? I would uncheck it, exit preferences, then go back in and some danged port would be re-checked again. I rebuild disk permissions and rebooted, the problem went away and I was able to uncheck the Internet Sharing over Firewire port option and everything worked fine.

Eduardo Penedos from Lisbon

HI Guys,
The best advice is to download the last version of the software in macupdate if you really want to work with 10.5 (Leopard).
I had that problem that tried most of the advises posted here. None of them worked at all. I got the last version and imported the .pcf file and .. Voila it's working.

Eduardo

P.J. Hinton from Indianapolis/IN/USA

Found this page while trying to search for solutions to error message addressed in this post. It worked as described. Thanks for posting this!

--
P.J.

Craig from Sterling/VA/USA

Worked great for me. Thanks for the tip!

Jeremy Ricketts from Pasadena, CA USA

Just found this page. Worked great. THANK YOU!

MN from Cville from Cville

Awesome little hack...solved this annoying problem in a cinch. Thank you!

Adam Shand from Wellington, New Zealand

I've got my own blog post which slightly different instructions here if it's of any help to people.

http://adam.shand.net/iki/2008/howto_repair_the_cisco_vpn_client/

It's great to see all the suggestions here as well, thanks!
Adam.

Harald Walker from Almere / The Netherlands

Thank you for the post. It worked (on 10.5.3). Saves a lot of time and frustration.

t from The World

Another thing to check - make sure you do not have multiple network interfaces active. For example, if you are using a wired connection, then disable your wireless connection using "Turn AirPort Off".

Then restart CiscoVPN as above, and it may work.

Josh Golden from Lincoln, CA

I thought I tried every supposed fix out there, then I found this..... Dude, you are THE MAN!!

Allan from

Thanks -- brilliant, that fixed it. Thanks so much for your post!!

Miguel from Utah

Thank you so much for this fix.
You're the man!!!

Tony from VA

I was losing my mind until I found your fix. Thanks!

Mario from Pennsylvania

Thanks for the tip...
Worked like a charm
THAN YOU!!!

Enzo from http://tweaklearning.wordpress.com

works like a charm.. thanks!

Dave from Ottawa, Canada

Brilliant! Thank you so much

btn from San Jose / CA / US

This solution fixed the problem after I upgraded to 10.5.3. Thanks!

iWeasel from Kent, UK

Worked first time. Thanks. Help appreciated.

Julian from KL

Just upgraded to Leopard 10.5.3 from 10.5.2. Broke my Cisco VPN client 4.9.01.0100 which was working fine in 10.5.2. Tried your suggestion of restarting the Cisco VPN from terminal and it worked. Thanks man !

ray haleblian from Vancouver

thank you for posting this - it actually led me to find this StartupItem was missing, so I was able to restore it with TC and get running again.

Amarand from Columbus, OH

After upgrading to 10.5.3 (Intel MacBook) from 10.5.2, started receiving these Area 51 errors (CiscoVPN 4.9.01.0100, only version installed, clean) and through the magic of Google, found this page, and your suggestion worked perfectly. Thank you!

Cristi from Bucharest, Romania

Whew, that saved my day, or night so to say. Great tip!

Grant from Melbourne, Australia

Thank you. Fixed on OS X 10.5.3 with VPN Client 4.9.01 (100).

swoodie from berkeley

thank you! very useful.

hywel from nh

Worked perfectly!! Thanks!!

Berthor from Chicago

wow, I'm glad I googled and found your site. thanks for the info, worked right away.

Mitch from Toronto

Brilliant! Thanks - confounded my IT department

JD from San Francisco

thank you mr. awesome

eru from

sweetness!

Ben from Chicago

Thank you! Now I don't have to go into the office on the weekend. :^)

Kevin from Santa Barbara, CA

I did this and it worked, but now my Remote Desktop connection will not connect. Not sure what to do now.

Daniel Gauthier from Missoula

Cisco VPN
Error 51: unable to communicate with VPN subsystem
My Windows Fix...
Close any cisco vpn processes in control alt delete, Go to start, go to run, type in "services.msc", turn off "wireless zero configuration", restart "cisco systems, inc VPN service", turn "wireless zero configuration" back on.

Nathan from Medford, WI

Hi eveyone, this is by far the most knowledgeable set of posts about Cisco VPN on OS X, and I'm hoping you can provide me with some suggestions on running a Cisco VPN on OS X.

I've thankfully not had any of the problems noted in this blog post. I have full access to our internal network, web browsing etc. However, I'm trying to run Oracle's jDeveloper (and the embedded OC4J) from home while connected to the VPN, and not having much luck.

The OC4J is acting as a "provider" for the Oracle Portal Shell that runs on our internal network, and that machine is not able to send messages to my Mac. I'm giving the Cient IP address provided in the Cisco VPN --> Status --> Statistics to both the Oracle Portal to "register" the provider, as well as to the OC4J instance running inside of jDeveloper. But no luck; my gut is telling me that the traffic on that Client IP address is not getting to/from my MacBook. Does anyone have any ideas?

I'm running on a NetGear wireless router, which I guess could also be causing problems? Anyways, any help at is greatly appreciated.

Daniel Gauthier from Missoula MT 59808

I encountered another cause of this problem. A Virus protection program (bit defender) was blocking the VPN client. I had to turn off the program's firewall and then run my fix posted above. I then allowed the VPN client in bit defender and the problem went away.

DB from Columbia, MO

Anders

Your the fricking man, the solution worked just as you said it would, and now I can finish all the work the boss made me take home and finish all night long!!

thank you

Preston from Los Angeles / CA / USA

Thank you! This has been such an annoyance!

Carina from San Francisco

Thanks for the tip! It worked great for me!

Carl Spackler from Bushwood

Thanks, that did the trick and got the client running again.

nikolaus heger from

I have to restart Cisco VPN all the time - so I already knew your tip. I have a shortcut that does it ;)

Another tip if you want to use Cisco VPN over a PPP connection: Shut down vmware and parallels. Disable all Parallels network adapters in the network preferences.

For VMWare not sure this is still an issue with VMWare 2.0 but the older version I just shut down like this:
sudo "/Library/Application Support/VMware Fusion/boot.sh" --stop

When you need VMWare, you have to re-enable it like this:
sudo "/Library/Application Support/VMware Fusion/boot.sh" --start

my 2ct...

Anon from

Works!!
Thanks a lot!

Jay from Mass

Worked instantly. Thank you and thank you google.

Siddharth Singh from

Worked like a charm!
Thanks.

Tim Chan from

thank you.

Katrina from Syracuse, NY

This works great! I have to do it every 2-3 times I start up VPN, though. But it works like a charm every time -- thank you!

Bryan Walsh from Denver, CO, USA

Is there anyway to automate this script? I always have to come to this stie (Which is not a bad thing...just cumbersome ;) )?

David from Delft/Netherlands

Thanks to Tela now this stupid and very annoying problem is fixed. Cisco VPN client really sucks!

I am on a MacBook 10.4.11 with 4.9.01 (0080) VPN client

zm from san jose, ca

this ROCKS. thank you so much. i hated having to reboot just because of this stupid error.

KC from Los Angeles, CA, USA

Yep, I use several accounts (pers, work, admin) and turn the Airport on/off, use sleep, etc.

10.5.4 MBPro

Open terminal, su - admin, run your command... bang! Fixed.

Thanks!!

Chuck Burt from Boston Area, MA, USA

I just wanted to point out that I come back and refer to this article time and time again. Thanks for posting it!

Joe from NYC

Hey,

Thank you for the advice. I'm using OS 10.5.2. Your advice worked perfectly! Thank you so much.

Brad from Omaha

Yes!! Finally!!

MacLover from San Jose, CA USA

I had a very stubborn case of "error 51" after I purchased a new IMAC and my files were transferred from another IMAC. After getting nowhere with my IT person, Apple and Cisco, I somehow noticed in my finder window a "Devices" folder that had been opened out so I could see the sub folders. In it was the FULL version of CiscoVPNClient circa Nov. 2007. It had a Resources and Profiles folder. I clicked on it, it installed and I now can use VPN! I think what was in my Applications folder was an Alias, and perhaps "error 51" means the application is missing parts?
Anyway, for those of you who have exhausted all your resources, try looking in the Devices area of your Leopard OS (in the finder window) to see the full version of VPN. First repair your permissions (with utility), then install, who knows it may work like it did with me?

Speedwolf from UK

Worked like a charm, cheers.
I've passed this one around work.

Gavin from Rockville, MD

it didn't work for me. I got the output:
Stopping Cisco Systems VPN Driver
kextunload: unload kext /System/Library/Extensions/CiscoVPN.kext failed
Starting Cisco Systems VPN Driver
kld(): Undefined symbols:
__FREE
__MALLOC
_apple_hwcksum_rx
_apple_hwcksum_tx
_dlil_attach_interface_filter
_dlil_detach_filter
_dlil_inject_if_input
_dlil_inject_if_output
_ifnet
_ifunit
_log
_m_copy_pkthdr
_m_copydata
_m_free
_m_freem
_m_gethdr
_m_mclget
_m_mtod
_network_flock
_soclose
_socreate
_soreceive
_timeout
_tvtohz
_untimeout
kextload: kld_load_from_memory() failed for module /System/Library/Extensions/CiscoVPN.kext/Contents/MacOS/CiscoVPN
kextload: a link/load error occured for kernel extension /System/Library/Extensions/CiscoVPN.kext
link/load failed for extension /System/Library/Extensions/CiscoVPN.kext
(run kextload with -t for diagnostic output)

What should I do?

Anders from RTP

Gavin: Looks like you have module version problems. You might have a newer version partially installed over an older one. Try a fresh re-install and see if you still have that issue.

Gavin from Rockville, MD

Hi Anders,
Yes, I dragged the old version from Apps to the trash, emptied it, then installed from a newer version from a dmg (I did this twice), and am trying to run it from Apps. I don't know what you mean by fresh re-install. Does that mean trash, then repair permissions, then install? Is their a cleaner way to delete?

Anders from RTP

Gavin: There is more to the Cisco VPN Client than the app in the Applications folder. (specifically, the directory /System/Library/Extensions/CiscoVPN.kext) Delete the Application and then go through your entire filesystem and delete anything having to do with CiscoVPN as well. Then reboot so you are sure nothing CiscoVPN related is resident in memory (it seems from your debug output that the module didn't unload for some reason either) and do a fresh re-install. If all else fails, you may need to reinstall your OS though I've never heard of things getting so corrupted that this is necessary.

Brian from Dearborn/MI/usa

I used the fix at the top and it worked great. I did a cut/past from the page. When I tried to type it in myself, it didn't go through. I also repaired the permissions just before using the reset.

JC from Maine

Copied and pasted into Terminal. Worked great. Thank you!

Daragh from RTP

Doesn't work for me. Any other suggestions?

openvpn from

I recently launched openvpn server for remote clients. I did it because of 2 reasons:

1) Multiple clients are not allowed from the same IP address with Cisco EasyVPN client.

2) Cisco EasyVPN client is not stable on Vista an does not exist for Vista 64 at all.

I am very happy with how openvpn works - it is stable, fast and easy. I recommend it to everyone!

Ashish M from San Jose / CA / USA

It worked for me ... :)
Thx

vpnnoob from nyc

just to add my $.02, in case it helps anyone:

I have never, before yesterday, used VPN, total newbie here. My client's server tech set me up with Cisco VPN Client v4.9.01 (8080). Installed (coupla times) on my G5, consistently failed w/error 51. We didn't make any effort to resolve, opting instead to try again on my MBP, which is wirelessly connected to my router (only these two machines in the LAN) and succeeded. As my preference is to use the VPN on my G5, I searched briefly and found this page (thank you all!). I tried several things mentioned above but not the solution which apparently helped many of you using Leopard - both my machines are running Tiger.

I did however confirm that my internet sharing was disabled which didn't help (I'd already tried repairing permissions and restarting) but then I stopped Personal File Sharing, Personal Web Sharing and FTP Access, and then succeeded w/VPN Client. I quit VPN, then enabled each service and restarted VPN, to see which service was the apparent cause but I was able to re-enable ALL of them and still the VPN Client succeeded in running and connecting. In other words, I simply turned the services off and on, and that somehow allowed VPN Client to connect and re-connect subsequently with my required services running.

Lantao Liu from US

can anybody describe the reason of this problem?

How Did I Miss This? from USA

I was pulling my hair out with this Error 51 on a fresh install of 10.5.5 and VPN 4.9.01 (0100).

Through googling, I realized I overlooked a stupid issue that I introduced. I was using Little Snitch for network connection management, and even though I had no rules blocking the Cisco VPN client, as soon as I added a rule allowing the Cisco VPN client to access everything....BAM!...my VPN worked straight away.

Just something to keep in mind...

Iane from Heidelberg, Germany

hey, I have this problem too, the terminal command does not work for me, unfortunately. I checked my updates as well...the only thing that helps is a second installation and a restart. this is very annoying, but I cannot switch to another programm as u can only connect to my university net by using CiscoVPN...even the specialists around here from the computer center cannot fix the problem...I'm kind of desperate!! Please let me know, if anything new is found out...thanks a lot!!!

Anil from someset/NJ/USA

I saw the problem after upgrading to 10.5
then i installed new Cisco VPN app.
and did
sudo chmod 777 /etc/opt/cisco-vpnclient/Profiles/

finally that worked for me.

Thanks ike ad others

Bob from Miami, FL USA

Thank you so much. This error 51 message has been tormenting me for over a year. I followed your instructions and it worked like a charm. I googled the error message and was directed to your site. Again, Thanks.

Jeff Martin from Capitola, Ca

I have just got a new iMAC , I got a ciscoVPNclient software from my work. I am getting the error51, I tried to use the script and still get the error. I tried restarting and reinstalling the software will no luck. Here is the terminal info, and idea'?
eff-martins-imac:~ jeffmartin$ sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart
Password:
Stopping Cisco Systems VPN Driver
kextunload: unload kext /System/Library/Extensions/CiscoVPN.kext succeeded
Starting Cisco Systems VPN Driver
kextload: /System/Library/Extensions/CiscoVPN.kext loaded successfully

John from Freedom PA USA

Turning Bluetooth Sharing off fix my Error 51 problem.

Dmill from chicago

Great. Works like a charm.

Baris Kurt from Istanbul Turkey

Thanks very much.

Bert Woudwijk from Rotterdam, The Netherlands

I have error 51 with Windows XP. Do you know how can I solve this

Arnim van Lieshout from Maastricht, The Netherlands

Thanks!!!
This solved my problem.

PennyFinder from Boston, MA

This solved my Error 51 in Leopard immediately:

sudo kextunload /System/Library/Extensions/CiscoVPN.kext

sudo kextload /System/Library/Extensions/CiscoVPN.kext

From Paul Paradise

Derek from Halifax Canada

Worked perfect. I just cut and pasted sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart
into my terminal.

Thanks a lot!

Kelly O from Moorestown, NJ

I'm using VPN client version 4.9.00 on a Mac OS X 10.5.6 macbook and having the same error51 problem. I tried the sudo command several times and every time the output says that the command could not be found. Any suggestions?

$ sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart
sudo: /System/Library/StartupItems/CiscoVPN/CiscoVPN: command not found

Anders from RTP

Kelly: See whats in that directory:

ls /System/Library/StartupItems/CiscoVPN

or even:

ls /System/Library/StartupItems

CiscoVPN may not be installed as a Startup Item.

Kelly O from Moorestown, NJ

Thanks. You're right, it's not installed as a Startup Item.

Phil B from San Francisco, CA, USA

You are awesome. Thanks for posting. This has usually required me to restart my entire network... but this time it occurred again even after a restart. So I googled, and you fixed it!

Danielle from Cary NC

I have a Macbook Pro w/OS X 10.5.6. I'm trying to install the Cisco VPN, but keep getting Error 51. I tried typing sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart into Terminal. No luck.
Restarted, ran Disk Utility, tried the restart via Terminal again. Still no luck. Cisco VPN shows up in /System/Library/StartupItems.

Any other thoughts? Thanks!

Anders from RTP

Danielle: I don't really have anything solid to suggest but make sure any kind of firewall or other networking package isn't installed. Have you tried switching Wireless / Ethernet? Same issues? I'm unclear on what exactly Cisco is doing in their software so unfortunately this is somewhat of a black art.

Danielle from Cary NC

Thanks for trying to help. I tried again with an Ethernet connection and it didn't work either. I don't have any firewalls on and am not part of any network. Very puzzling. Thanks!

Danielle from Cary NC

Success. I reread all of the posts and found the one about getting version 4.9.0.1 at Macupdate.com. Haven't tried it wireless yet, but I can at least login. Thanks!

Dudeler from Tallahassee

What happened to "It just works!"?
I guess it just doesn't in this case.

the1plummie from santa clara/ca/us

whenever i got this error before i just restarted my computer to get rid of the problem. but finally i got fed up with it and searched for it and found this. it saves me a lot of reboots now. thanks a lot!

Florens from Germany Tübingen

So i fixed the problem: (Running Mac OS X 10.4.11)

First i uninstalled current version with:
terminal:
sudo /usr/local/bin/vpn_uninstall
(admin password required)

Install newest version:
http://www.macupdate.com/info.php/id/10317

Then i get this fucking error... error 51: bla bla

fixed it with: sudo ifconfig fw0 down
(password required)

but this only works until restart then i get the same error until i do it again.

Here the permanet fix:

$ sudo pico /System/Library/StartupItems/CiscoVPN/CiscoVPN

Then change the StartService() function to the following:


StartService ()
{
#disable fw0
/sbin/ifconfig fw0 down

if [ -d $CISCO_VPN_DIR ]; then
ConsoleMessage "Starting Cisco Systems VPN Driver"
kextload $CISCO_VPN_DIR
fi
}

Press ctrl-x and enter to save...

After the next restart the problem was away...

I hope i helped some people.

Good Luck

Flo

PS: But i didn't use the cisco vpn client... there is a program named shimo, that is much better, and easier to handle. I connect to my cisco-vpn-profile only by pressing "apple+shift+v" and if you want you can connect automatic if you connect to a certain wlan.

http://www.shimoapp.com/
(If you need cisco-vpn-profiles, you have to install cisco-vpn-client first, otherwise it won't run!)

Jay from Around the world

Just adding my 2c: after migrating (using the migration assistant) from my old MBP17 to my new one, I got this Error 51 message when firing up my Cisco client. Tried some of the solutions suggested here, but it didn't work out. What finally cut it was to re-install, and after that everything was ok. Nb - I already had the latest version installed before re-install.

aby from Sao Paulo / SP / Brazil

Worked. What an embarrassment for Cisco. Thanks, keep up the good work.

Edd from Belgrade, Serbia

thank you, that helped!

Ben Leivian from Arizona

Thanks man, you saved the day!

Andy Wagers from Bryan / TX / USA

Thanks for the tip, it worked like a charm. Unlike the Cisco website which made me register and then told me that I couldn't access the page that would explain the error messages.

Taylor from Raleigh, NC

Thanks! You're the man. I searched through Cisco's crap for 15 minutes and then gave up on them. Found this right away and it worked immediately.

mac_lover from St.John's, Newfoundland, Canada

Hi, I was running into the Error 51 issue with my Cisco vpnclient on Leopard after installing the Mac OSX update. Read through gazillions suggestions and none worked... until I read the one asking to disable internet sharing... so I did... and it started working again. Thanks!

Harry from London

UPDATE: Yup, Cisco now seems to require you to be a partner company to access the VPN download, any suggestions?

Anders from NY

@Harry Ouch. No, sorry, no suggestions. Seems odd for them to not make it freely available. (actually, I'm not sure it was ever freely available) Its not like its going to work with a VPN from someone else...

The standard line from Cisco is "Get the software from your IT department." to users so I don't know if that helps you.

Harry from London

@Anders I'll see if IT can help, last few times I just downloaded direct no reg required. If anyone's got the latest copy of the 4.9+ .dmg they can share please let me know!

David from Brooklyn

I was getting this error as well after I updated to Snow Leopard. I reinstalled (I have an old bundle, 0030) and it works fine now.

Ritesh from fremont, ca

Hi,

I had the similar problem. But restarting vpn didn't worked. I went to terminal and ran this command
> /usr/local/bin/vpnclient stat
This told me that 'nobody' user is missing. From system preferences, I created a new user and named it 'nobody' and vpn started working again.

Dan H from Portland, OR

I tried this:

sudo kextunload /System/Library/Extensions/CiscoVPN.kext

sudo kextload /System/Library/Extensions/CiscoVPN.kext

The kernel extension unload command didn't work because it wasn't loaded in the first place! The second command loaded it and then it worked. Don't ask me how it got unloaded..

Moguul from Regensburg, Germany

Thanks Dan,
works great with my Version and Snow Leopard.

;-)

Dave T from NYC, NY, USA

Dan H: great work--I wish I would have started this thread from the bottom up!

In case anyone sees this as well, what caused the problem was the CiscoVPN.kext file corrupted, probably either on install of Snow Leopard, or update of a security patch to it--probably the latter, because I believe I used my VPN after Snow Leopard install but before security patch from last week.
Dave

Eds from Nashville TN USA

THANK YOU Dan H!! Had the same glitch after upgrading to Snow Leopard.

Dan H from Portland, OR
#159 | Thu, Oct 15, 2009 11:11 AM

I tried this:

sudo kextunload /System/Library/Extensions/CiscoVPN.kext

sudo kextload /System/Library/Extensions/CiscoVPN.kext

The kernel extension unload command didn't work because it wasn't loaded in the first place! The second command loaded it and then it worked. Don't ask me how it got unloaded..

Nik from Smyrna, DE

Thanks Dan H from Portland - your fix worked for me after upgrading to Snow Leopard.

Carrie from Queensbury, NY

Thank you Dan H and Anders! I'm so glad I found this solution so quickly!

sahrawi from illinois

it says command not found!

r from CT

3 years on, your post is still solving problems. thanks!

Matt from wiltshire UK

Cheers Dan , Your a Top Man !!

Worked a treat as it had stopped working when i installed Snow Leopard..

Kibar from Toronto

Hi all,

Great suggestions but I am running Leopard 10.5.8 and I tried to follow some of the suggestions mentioned above. Here is what I get:
Stopping Cisco Systems VPN Driver
kextunload: unload kext /System/Library/Extensions/CiscoVPN.kext failed
Starting Cisco Systems VPN Driver
extension /System/Library/Extensions/CiscoVPN.kext does not contain code for this architecture

I don't understand what this is and am not sure what to do now...any suggestions?

Thanks.

Richard from Santa Barbara

I'm running Snow Leopard now and the previous "restart" method doesn't work anymore; there's no such program as "/System/Library/StartupItems/CiscoVPN/CiscoVPN". However, I did find that simply loading the kernel extension seemed to work fine:
"sudo kextload /System/Library/Extensions/CiscoVPN.kext"
Then I was able to run VPNClient with no problems.

Rick from Montana

Using 10.5.8 on an Intel iMac. Ran both commands and get the same Error 51. Tried deleting and re-installing Cisco VPN. Ran Terminal command before first launch. Still not working. Anyone have any suggestions. Others from the office with 10.5 are able to launch Cisco VPN and connect.

Deise Tsukada from Sao Paulo, Brazil

Thank you Tela, it worked to me! (Mac OS X 10.5.8 and Cisco VPN Client 4.9.01 (0100))

Rabbid from NZ

The reason why Cisco cant put restart into the client is because of the structure of the Mac OS X and they had to do this as a kernel extension so it runs on a much lower level than normal Mac OS applications. if Apple allowed more control and not be so tight ass and then justify it by saying they are making a stable OS (which is BS, guest account disaster on 10.6??), Cisco might be able to make a better client. Be thankful they even bothered to make it for Mac.

Anders from Boston, MA

Rabbid: In my opinion, that's not a good rationale for writing bad software. It might make more sense for Cisco to have used the native IPSec implementation in Mac OSX. I'm sure there is a good reason somewhere but there is probably a good compromise that could be worked out where this sort of thing won't be an issue. Even if Cisco's VPN client were essentially a shell script which unloads then reloads the ktext and then starts the client, that would be better.

Kei from Fremont, ca, usa

Great tip and it worked! Thanks!

Stephen Bau from Abbotsford / BC / Canada

On Snow Leopard (Mac OS X 10.6.2) nothing was working until I loaded the kernel extension as instructed by Richard from Santa Barbara:

sudo kextload /System/Library/Extensions/CiscoVPN.kext

adam feuerstein from winchester/ma/usa

the tip worked, allowed me to connect my VPN but i still can't access my work's firewalled websites. i get server not found errors even though the VPN connection is established. anyone have similar problems or ideas on how to fix? thanks.

Kurli from US

You just saved my sanity! THANK YOU a million times...

Anders from Cambridge, MA

@Adam: Seems like you might be pointed to the wrong DNS server. In Terminal, type:

cat /etc/resolv.conf

and check the nameserver lines against what your tech department considers "internal DNS servers".

Erik from Stockholm / Sweden

THX! Awesome it worked! Stopped working after I upgraded from 10.5 to 10.6.

Tom from STL MO USA

Tried quite a few of the super user commands out there and found that simply locating a better image of the install worked for me. This was on a machine running 10.5.8. Here's the link to the installation of the Cisco VPN client that I'm using (4.9.0180).
http://mac.softpedia.com/progDownload/Cisco-VPN-Client-Download-12633.html

Jack M. Bernstein from Dayton, OH

Thanks! Using Snow Leopard and the sudo kextload command, I was able to restart the VPN client.

thewhell from buffalo, ny

Awesome thanks!!! just what I needed!

Shaun from London, UK

Thanks, did just the trick!

Lisa from Boston, MA

Outstanding. Worked beautifully. ;)

LB from Washington

Worked like a charm. Thanks man.

Reyn from Los Angeles/CA/USA

I also used Richard of Santa Barbara's sudo kextload command and it worked when nothing had worked before. For good measure I downloaded and installed, after sticking my old version in an "old" folder (did you know Cisco blocks changing the name of this application?) the newer version 4.9.01.0180 from the mirror site mentioned above. The Cisco site requires a userID and password even to update your version; thank goodness for mirror sites.

Rene from San Antonio

this helped me... I tried all the suggestions until I found one that worked, Thank You!

Kristy from Chicago

Thanks for posting. Works like a charm. Mac OSX 10.6.3.

Nabha from California

Holy smokes, thanks for sharing this; it worked perfectly.

Susi from Jena, Germany

Thanks for sharing. Awesome.

Els from Valkenburg NL

Anders, thanks for keeping this blog. Richard from Santa Barbara's sudo line solved all my error 51 problems.

nicolas from france

The cisco driver doesn't work when running the 64 bits kernel. Reboot in 32 bits mode to fix error 51.

Afshin Attarzadeh from Hall/BW/Germany

Thank you so much. I couldn't solve the problem on my own.

Frank Ykeda from Ribeirão Preto - Brazil

Mr Brownworth,
thank you very much for the tip.
I had a VPN connection problem and it worked really well,
Obrigado
Frank

Jorge from NY, NY, USA

After a couple of days and endless articles I have to thank Tom from STL MO USA for his comment.

It worked instantly. Thanks.

Zappa from Germany

for me the combination of this tow commands work realy good!

sudo ifconfig fw0 down
sudo kextload /System/Library/Extensions/CiscoVPN.kext

sanya from kyiv/Ukraine

Man, it is no problem with 32-bit macosx mode but what to launch it in 64-bit mode? Please help ;(
I have 230 build of Cisco VPN client but no luck yet.

p.s.
Os: Mac OSX Snow Leopard Server.

Anders from Cambridge, MA

Sanya: Do they make a 64 bit binary? If you have one, does it crash in some way? Is there a different error message?

sanya from

Hello!

I heard about 230 build supports 64 bit mode. But it is not true.
I can only login to macosx in 32-bit mode.
That's all what I can to do for today.

230 build is not supports 64bit mode. (

2) Error message stays the same - 51 error code.
3) Way of crashing the same too.

Naomi van Eenennaam from Amsterdam, Netherlands

Thanks! It worked!

Dan from London Ontario Canada

Perfect - I have never gone into Terminal, but I really needed to solve a client problem via the VPN and wow - it worked perfectly. Thanks Anders for posting...

Niraj D from irvine, ca usa

You ROCK!

MacUser from Germany

Hello,
since I had to warmstart my system when I was working with the admin account, my VPN Client (Cisco) doesnt work anymore when working with another user account.

I deinstalled and reinstalled the VPN-Client, repaired the rights, repaired the volume, used the sudo-commands in the terminal (of which 2 kinds can be found in the net), but nothing doesnt work. Funny is, when working with my admin account, the VPN client works. When using another user account it doesnt. "Unable to communicate..."

I also deactivated the LittleSnitch Firewall and the Sophos Antivirus. But nothing seems to work...

I would be very glad, if someone has suggestions what to do. Thanks!

Jon from SF,CA, USA

*to the office

Zappa from Germany

Hi MacUser,
have you used the sudo commands in this row?
first:
sudo ifconfig fw0 down
then:
sudo kextload /System/Library/Extensions/CiscoVPN.kext

What Mac OSx are you using?

CJ from maryland

I'm receiving the VPN error 51 but i am using a PC not a Mac. What steps should I follow?

AL from round rock/texas/usa

worked perfectly

johnboy from yeehaw

you're awesome. works perfectly.

Jürgen from Berlin

Thanks a lot, worked perfect

Andreia from Lisbon

Ohhhhh! Nice! Thanks a lot, worked really well!

Nicole from Ottawa Canada

Thank you! I had only found mention of this fix using the old path and wasn't sure what the new path was. This totally fixed my issue!

Scott from

Awesome! Thank you!

Pourya from Incline Village, NV

After trying just about everything on this page to get rid of error 51, this is what I realized. In the console I get "Could not attach to driver. Is kernel module loaded?" from Cisco. So definitely a kext issue. Well as it turns out its an architecture issue, because using kextutil told me that the compiled code does not support x86_64 architecture.

So why was this working on my laptop but not my MacPro? Because on the MBP SL boots into 32-bit by default, but the default is to boot into the 64-bit kernel on a MacPro. So I restarted the MacPro into the 32-bit kernel (hold 3 and 2 when restarting) and all was working well.

Side Effect: I did lose my mouse and trackpad however (both bluetooth), but I was able to screen share using the MBP to get those to reconnect from the bluetooth icon.

I'm not happy that whenever I VPN I have to reboot into 32 bit mode, but luckily I don't need to do that often from the MacPro.

Hope this helps some of the folks out there who weren't able to make this work using the solutions posted here.

Pourya from Incline Village, NV

As a quick follow up post. On SL-64 bit kernel, I used the Apple VPN to connect. I have a PCF file from the IT people and use RSA SecurId. If you're in the same boat, you can open the PCF in textedit and copy the group name and password. If the group password is encrypted, copy the enc password and paste it into: http://www.unix-ag.uni-kl.de/~massar/bin/cisco-decode and you will get the decoded password.

This worked beautifully, I am now booted into the 64-bit kernel and VPN-ing without Cisco's klugey code.

Karen F from Gaithersburg MD

I don't understand _why_ it works, but it works. Thanks!

Anders from Cambridge, MA

Pourya brings up a great point. Here's a guide that walks you through converting a CiscoVPN profile to a native Mac OS X IPSec VPN connection.

http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

Constantine from Simferopol, Crimea, Ukraine

Anders, this is fantastic! I was so tired about Cisco VPN disconnecting. Your solution resolved my issue and made me happy. Huge thanks for help!!!

Nathan Rambeck from Xenia, Ohio

Thanks, worked perfectly. However, I also am now using the native Mac VPN client per you instructions. Even better!

nick from Australia

I tried following the instructions and inside Terminal i get the error /System/Library/Extensions/CiscoVPN.kext failed to load - (libkern/kext) requested architecture/executable not found; check the system/kernel logs for errors or try kextutil(8).
This is my first Mac and i've not had it long. Thanks

Anders from Cambridge, MA

There is a good chance you have a 64 bit machine. Cisco's VPN client is written for the 32 bit architecture. Try creating a native VPN connection:

http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

Julie from Somerville, Ma

I'm not able to type a password after I paste the codes into the terminal - why is this?

Anders from NYC

When you type your password, you won't see anything on screen. Just keep typing and hit enter when done.

Anders from Cambridge, MA

A new flavor of this error seems to be showing up.

argument missing: error 51: unable to communicate with the vpn subsystem

I have no idea how this differs from the original error but maybe others who are having this problem can chime in.

Alvin from Singapore

cant seem to get it working on 10.6.7 snow leopard and on ciscovpn 4.9.01 (0080) , still having error 51. both sudo commands do not work, ifconfig down does not work too and uninstalling and reinstalling either. any suggestions ?

Anders from Cambridge, MA

Alvin: Sorry, I haven't seen that so I don't have anything to suggest. Are others seeing this as well?

Your other alternative is to set up a native connection.

NickG from Watertown, CT

I can confirm not working with the following:

MAC OS 10.6.7
CiscoVPN 4.9.01.0230

Error 51

sudo commands do not work also, can not find file

Tried wired and wireless connnections, rebooted, and reinstalled.

Any ideas?

Anders from Cambridge, MA

Nick,

What is the output of this command on your machine: (in Terminal)

find /* -iname "*cisco*.kext"

This will take some time to complete as it will return a listing of all files with CiscoVPN in the title. It is possible that the name of the .kext changed. If the above doesn't find it, try:

find /* -iname "*cisco*"

Worst case, try this: http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

Yves from Japan

Very valuable information.
The PCF to Snow Leopard embedded VPN connection was successful and worked immediately.
Thank you.

Tyler from

We've noticed on the SandyBridge macs (the ones with Thunderbolt) even the newest VPN client wont start -- just gives the error 51. Our only workaround was to use the native VPN connection.

Likely have to wait for an update from Cisco for the client to work -- means I need to update documentation for our users!

Anders from Cambridge, MA

Cisco notes some alternate (but very similar) instructions on their VPN Client FAQ:

To stop:

sudo kextunload -b com.cisco.nke.ipsec

To start:

sudo kextload /System/Library/Extensions/CiscoVPN/CiscoVPN

Bala Ganesh from Bangalore

I had this dreaded Error 51 and tried various suggestions from this post.

Only One Worked like a charm :)

http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

I am using MBPro 15" (64 Bit)

Thanks All and Anders.

Quinn from Ireland

Cheers man worked first go!

Krejko from St. Louis/MO/USA

Hey, for those that can not use the Snow Leopard VPN to work or are having issues with terminal, I used this this and it worked for me.

Apparently this can be a problem with any mac using a 64 bit kernel. These were the instructions that I followed that resolved the error

"In my case it happened if running the 64-bit kernel (see this Apple support article if you're not sure how to check it).

Here is a Cisco support document that states:

The Cisco IPSec cliet for Mac OS X does not support the 64 bit kernel. The VPN driver only has i386 and PPC extensions, not x86_64 extensions.

The solution:

hold 3 and 2 simultaneously during startup to boot using the 32-bit kernel (link to Apple support article). The Cisco VPN client should open and function just fine now."

http://superuser.com/questions/291729/cisco-vpn-client-error-51-setting-up-network-interface

Hope It helps!

Eduardo from Buenos Aires/Argentina

Hi guys,! yesterday downloaded Lion (10.7) and
when I tried to open Cisco VPN Client gave me the bloody error 51.
Does anybody know how to solve it?
Thks n Rgds

Anders from Cambridge MA

Try a native VPN setup instead.

http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

Cary from Indianapolis, IN

My Cisco VPN broke under Lion. Your instructions were wonderfully easy and I now have the VPN working again. Thank you very much.

Alex from Devils Lake ND USA

MacBook Pro 15, OS 10.5.8

I ran into the "argument missing: error 51: unable to communicate with the vpn subsystem" this morning... tried the suggestion by the MacWorld guys and it crashed the OS, had to push-and-hold. However, after getting the system back up, the client worked again.

Also, tried the native VPN connection, and unlike the article, there is no IPSec or Cisco choice under "VPN Type".

It would be handy to note which versions of MacOS each of the commands or suggestions pertain to. I know now that I shouldn't use any of the MacWorld suggestions, as they either don't work or will crash my OS. :) To be fair, I didn't try suggestion 1 or 2, though...

sateesh from RTP

Worked liked charm. Thank you.

Allen from South Africa

Hi,

Thanks for the info on http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

I have now switched to native, since the Cisco client never worked for me on Lion.

Now, I see a successful connect, authentication and IP address, even the banner message, but almost immediately after that, the VPN disconnects!

The kernel log says something about SIOCPROTODETACH_IN6: utun0 error=6 and the system log says IPSec Controller: IKE FAILED. phase 5, assert 0

Does anyone know how I can resolve this immediate disconnect?

Thanks in advance!

Anders from Cambridge, MA

@Allen Can you post more of your system log right around the IKE FAILED message? AFAIK, IKE doesn't have a phase 5 so I'm hoping to see some other context.

Allen from South Africa

Hi,

Here are both logs:

Allens-MacBook-Air:log allen$ tail kernel.log
Aug 12 14:56:32 Allens-MacBook-Air kernel[0]: wlEvent: en0 en0 Link UP
Aug 12 14:56:32 Allens-MacBook-Air kernel[0]: AirPort: Link Up on en0
Aug 12 14:56:32 Allens-MacBook-Air kernel[0]: en0: BSSID changed to 00:04:ed:b9:13:54
Aug 12 14:56:34 Allens-MacBook-Air kernel[0]: AirPort: RSN handshake complete on en0
Aug 12 14:59:16 Allens-MacBook-Air kernel[0]: utun_ctl_connect: creating interface utun0
Aug 12 14:59:16 Allens-MacBook-Air kernel[0]: SIOCPROTODETACH_IN6: utun0 error=6
Aug 12 15:14:27 Allens-MacBook-Air kernel[0]: utun_ctl_connect: creating interface utun0
Aug 12 15:14:27 Allens-MacBook-Air kernel[0]: SIOCPROTODETACH_IN6: utun0 error=6
Aug 12 15:39:29 Allens-MacBook-Air kernel[0]: utun_ctl_connect: creating interface utun0
Aug 12 15:39:30 Allens-MacBook-Air kernel[0]: SIOCPROTODETACH_IN6: utun0 error=6

Allens-MacBook-Air:log allen$ tail -20 system.log
Aug 12 15:39:29 Allens-MacBook-Air racoon[249]: IKE Packet: transmit success. (Initiator, Quick-Mode message 1).
Aug 12 15:39:29 Allens-MacBook-Air configd[14]: IPSec Network Configuration established.
Aug 12 15:39:29 Allens-MacBook-Air configd[14]: IPSec Phase1 established.
Aug 12 15:39:29 Allens-MacBook-Air configd[14]: event_callback: Address added. previous interface setting (name: en0, address: 10.0.0.110), current interface setting (name: utun0, family: 1001, address: 111.22.333.444, subnet: 255.255.255.255, destination: 111.22.333.444).
Aug 12 15:39:29 Allens-MacBook-Air configd[14]: network configuration changed.
Aug 12 15:39:30 Allens-MacBook-Air racoon[249]: IKE Packet: receive success. (Information message).
Aug 12 15:39:30 Allens-MacBook-Air configd[14]: IPSec Controller: IKE FAILED. phase 5, assert 0
Aug 12 15:39:30 Allens-MacBook-Air configd[14]: IPSec disconnecting from server 123.44.555.777
Aug 12 15:39:30 Allens-MacBook-Air racoon[249]: IPSec disconnecting from server 123.44.555.777
Aug 12 15:39:30 Allens-MacBook-Air configd[14]: SCNC Controller: service_ending_verify_primaryservice, waiting for PrimaryService. status = 1
Aug 12 15:39:30 Allens-MacBook-Air configd[14]:
Aug 12 15:39:30 Allens-MacBook-Air configd[14]: network configuration changed.
Aug 12 15:39:30 Allens-MacBook-Air configd[14]: SCNC Controller: ipv4_state_changed, done waiting for ServiceID.
Aug 12 15:39:30 Allens-MacBook-Air configd[14]:

Thanks,
Allen

Anders from Cambridge, MA

@Allen This is a very unusual error. It looks like your VPN server is asking your Mac to use the IP address "111.22.333.444" which is not a legal address (each number needs to be between 0 and 255 exclusive) so I'm guessing this is causing the Mac's IPSec client to bail. Send your logs to the VPN server's administrator and have them check that for you.

Sushant from Sunnyvale

Awesome, great article, it works !!

vcc from sweden

it works on vcc intranet with rsa kode!

tufail from leeds, uk

i installed mac os x lion and my vpn is not working and shows error 51. tried everything. not working though. any ideas?

Sarah from Canada

Just wanted to say 'thank you' for this post! I have this page bookmarked because I have to use this command so frequently!

PD from Denmark

all you having trouble to reset the VPN make sure you're not running in 64 bit mode. It will not work, at least that's my experience and it seems that 64 bit is not supported for os x. so try to set it to 32 bit mode. believe you can reboot and hold don they keys 3 and 2 for 32 bit and 6 and 4 for 64 bit.

Webmaster Telenet from Canada

Thank you for this info, very useful for me !

Mark from St. Louis, MO

Thanks so much for this! The macworld suggestion did not work for me but
sudo kextload /System/Library/Extensions/CiscoVPN.kext
did work.

David from zürich

thank you very much :D best way was your tutorial to use the mac native VPN this works cisco not !

Liana from Ann Arbor

THANK YOU!!! (this was driving me crazy!)

Monish from India

Thanks ! works good for me

Jeff from Formerly from Cambridge

Thanks for this tip!

Pradeep from Charlotte

I have 10.7.3 and cisco vpn client-darwin-4.9
It worked only when I restarted my mac on 32 bit mode. great tip from @PD above.

Peter from Norristown, PA

Many Thanks

Sarah from Riverside

Thank you so much! It worked perfectly!

Thankful Sean from UK

Cheers fella, you just saved my morning!

Miguel Santos from Setúbal / Portugal

I already use that solution on past, but now doesn't work, in Montain Lion 10.8.

The solution to change the Mac OSX to 32 bit, doesn't work too with ML because we can't change anymore.

I realy need to still working with cisco VPN.

Many thanks in advance.

Hilary Snaith from United Kingdom

Fabulous! Worked like a dream. Thanks so much!

Anders from Cambridge, MA

Miguel: Have you tried the native implementation of the Cisco VPN client in Montain Lion 10.8?

http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

Jay from Somersworth, NH

For those still having issues with running the Cisco VPN client with Mountain Lion 10.8, it looks like it's because ML 10.8 defaults to 64bit.

run: sudo systemsetup -setkernelbootarchitecture i386

This will switch your OS to 32bit, which is compatible with Cisco VPN Client.

If you find that certain programs are experiencing issues with 32bit, run the same sudo command above except with x84_64 instead of i386

Grace from

Thanks so much!

ceng from Canterbury UK

Mac OSX comes with a Cisco VPN client - no need to use this connector software.

System Preferences -> Network -> Add (+) -> VPN (Cisco IPSec)

Server address: Server IP
Account name: Username
Password: password

Authentication settings:
Shared secret: password
Group name: name

I had to fiddle with the username password combinations in the two spaces for each but got it working in the end.

Anders from Cambridge, MA

@ceng - I wrote a guide that talks people through that.

http://anders.com/guides/native-cisco-vpn-on-mac-os-x/

Swetabh Pathak from India

Very helpful. Thanks.

Pablo from Barcelona

It's not working, I've downloaded the Cisco Client 4.9.01.0100 but always have the same error 51. I've changed boot mode to 32 bit, but nothing.
My main problem is that I can't make works the native Cisco VPN because I have a p7b certificate in keychains and a PCF with the information about the connection. I would like to know how to import this certificate in my VPN connection. In Windows it's working perfectly.

Rick from Los Angeles

Thanks! This worked perfectly, instantly.

June from Honolulu HI

Thanks so much for sharing! Appreciate it!

Leave a Comment

Name:
Location: (city / state / country)
Email: (not published / no spam)
Comment:

No HTML is allowed. Cookies must be enabled to post. Your comment will appear on this page after a moderator OKs it. Offensive content will not be published.

Click the ball to submit your comment.

To create links in comments:
[link:http://anders.com/] becomes http://anders.com/
[link:http://anders.com/|Anders.com] becomes Anders.com
Notice there is no rel="nofollow" in these hrefs. Links in comments will carry page rank from this site so only link to things worthy of people's attention.