Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: A workaround for Cisco VPN issues after sleep Apps
Tiger only hintI have to do this constantly now in Tiger, so I figured I'd share.

After I leave the VPN client open for a while, usually across multiple sleeps it seems, it starts acting weird. When I try to connect, it comes up with a crazy error message about not being able to contact something or other. Anyway, restarting works, but you can just use this in the Terminal instead:
$ sudo kextunload /System/Library/Extensions/CiscoVPN.kext
$ sudo kextload /System/Library/Extensions/CiscoVPN.kext
That'll restart the background extension or whatever, and the VPN Client will work again.
    •    
  • Currently 3.17 / 5
  You rated: 2 / 5 (6 votes cast)
 
[38,593 views]  

10.4: A workaround for Cisco VPN issues after sleep | 16 comments | Create New Account
Click here to return to the '10.4: A workaround for Cisco VPN issues after sleep' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: A workaround for Cisco VPN issues after sleep
Authored by: ntorda on Jun 24, '05 01:06:10PM

I also had this issue, but here was my solution:
create a script as follows
[code]
#!/bin/bash
/System/Library/StartupItems/CiscoVPN/CiscoVPN restart
[/code]

Save it and make it executable

Run it from the command and it will restart the vpn services. works every time for me now, i don't even bother trying to connect anymore without running this script first. If i was smart, i would write an applescript/automator action that i could put in the dock instead of the cisco icon that would perform the above script, wait and then launch the vpn client.... but that would be too easy i guess



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: mangosi on Jun 24, '05 04:43:45PM

Why even make a script? Either:

[code]sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart[/code]

or alias it in your .cshrc or .bashrc file

[code]alias restartVPN 'sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart'[/code]



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: ntorda on Jun 24, '05 11:49:48PM

if you make it into a script, you have less to type!



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: Djehuti on Jun 24, '05 03:27:32PM
I entered the following script into Script Editor and saved it in ~/Library/Scripts, and enabled the script menu. So I can just choose it from the script menu if CiscoVPN flakes out:
do shell script "/System/Library/StartupItems/CiscoVPN/CiscoVPN restart" with administrator privileges


[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: xevious on Dec 07, '05 04:24:32PM
I wish I had read your post before I went off and wrote my own AppleScript:

display dialog (do shell script "sudo /System/Library/StartupItems/CiscoVPN/
    CiscoVPN restart" with administrator privileges) 
    giving up after 30 buttons {"OK"} with icon note

---
-Douglas

[ Reply to This | # ]

10.4: A workaround for Cisco VPN issues after sleep
Authored by: Durandal on Jun 24, '05 03:38:38PM

This won't always work. In the case that it does not, you should switch to another in the `Locations' menu and then switch back. Then unload and reload the kernel extension.

---
Damien Sorresso



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: stubaker on Jun 24, '05 03:50:37PM

you can also do this:

sudo SystemStarter restart CiscoVPN



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: rmuir on Jun 24, '05 06:47:57PM

My work-around? Since I always have a terminal open, I just typed
"sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart"
into a terminal line and, before I pressed return, I highlighted this text
and dragged it onto the desktop; thereby saving a Text Clipping onto my desktop.

Now, if the damned CiscoVPN client hangs again I just drag the text clipping on
to my open terminal window. ...press return, enter the sudo password, and I can
then restart the CiscoVPN client.

...wish Cisco would fix version 4.6.04(0061)!



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: hamarkus on Jun 25, '05 01:32:03AM

Does anybody know whether the error message:
"Secure VPN Connection terminated locally by the Client. Reason 403: Unable to contact the security gateway." has anything to do with?
Running 10.3.9 and Cisco VPN Client 4.0.3 (E), this shows up every time I try to connect to the VPN since for about a week now. Coincidentally, about the same time ago, I tried to use the OS X built-in VPN client, but have since deleted all its settings again. In the log it shows the following message:
"1 07:25:19.757 06/25/2005 Sev=Critical/1 CVPND/0xC3400003
Function SocketApiBind() failed with an error code of 0xFFFFFFF8(ike-init-state.cpp:355)

2 07:25:19.758 06/25/2005 Sev=Critical/1 CVPND/0x43400015
Unable to bind to IKE port. This could be because there is another VPN client installed or running. Please disable or uninstall all VPN Clients other than the Cisco VPN Client."



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: xostential on Jun 25, '05 06:27:53AM

1. Open Script Editor and copy the lines (without the [code] tags) into a new script.
2. Hit the "compile" button (gives the script the opportunity to 'discover' your vpn client application if needed)
3. Save with format set to application and all options deselected (no startupscreen etc)
3. Run this little app instead of running the vpn client. The script restarts the necessary components and then starts the VPN client and subsequently quits itself.

[code]
do shell script "/System/Library/StartupItems/CiscoVPN/CiscoVPN restart"
tell application "VPNClient"
activate
end tell
quit
[/code]

Sweet really.



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: jpgetty on Jun 29, '05 12:48:27PM

except you need to do this with admin privileges - I don't normally run as root.



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: xostential on Jun 30, '05 05:07:47PM

I never run as root so two things.

1. Not sure how I left it out of the script (put it down to being cerebrally challenged) but first add the word 'sudo' to the script . .
[code]
do shell script "sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart"
tell application "VPNClient"
activate
end tell
quit
[/code]

2. If you want to negate the need to enter your password every time you start VPN . . .
a]. Open terminal application and paste the following line into an open terminal window (you need to be running an admin account) ....
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/sudoers
(if you don't what 'vi' is just paste the line above)

b]. at the prompt type your password. For those not familiar with the terminal you will not see anything when you type - just type your pw and hit enter. This will open the sudoers file in TextEdit ready for editing.

c]. look for the line that says . . "# Cmnd alias specification" and paste the following text below it on a new line.
Cmnd_Alias VPN = /System/Library/StartupItems/CiscoVPN/CiscoVPN

d]. Edit the user privilege lines to look the same as below. (paste replace is easiest)
# User privilege specification
root ALL=(ALL) ALL
%admin ALL=(ALL) PASSWD: ALL, NOPASSWD: VPN

e]. Save and quit TextEdit and Terminal.



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: kaz219 on Jun 27, '05 04:40:55AM

Is it about the "Error 51: Unable to communicate with the VPN subsystem. Please make sure that you have at least one network interface that is currently active and has an IP adress and start this aplication again." error message ?

If it is, and you are using airport, just turn airport off and then on again, it should do the trick...



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: wrwebb79 on Oct 31, '06 10:20:12AM

Hey there-

So I tried all this stuff and kept getting

"you must be root to run ConsoleMessage
permission denied; you must be root to unload kets
you must be root to run ConsoleMessage
you must be running as root to load modules onto the kernel"

I guess this is pretty good since I don't want to *censored* up my kernel...but I would like to be able to make the VPN work! I downloaded it today and got the error message everyone has been mentioning here...any ideas? How do i login as root? How do i not *censored* it up?



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: wrwebb79 on Oct 31, '06 10:21:36AM

Hey there-

So I tried all this stuff and kept getting

"you must be root to run ConsoleMessage
permission denied; you must be root to unload kets
you must be root to run ConsoleMessage
you must be running as root to load modules onto the kernel"

I guess this is pretty good since I don't want to *censored* up my kernel...but I would like to be able to make the VPN work! I downloaded it today and got the error message everyone has been mentioning here...any ideas? How do i login as root? How do i not *censored* it up?



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: rsnyder on Oct 31, '06 01:13:00PM

You need to add 'with administrator privileges' to the end of the first line after the end of the double quotes:

do shell script "/System/Library/StartupItems/CiscoVPN/CiscoVPN restart" with administrator privileges
tell application "VPNClient"
activate
end tell
quit

recompile and save the script.

This will throw you the administrator login panel when you run the script, and as long as your account as admin privileges, it will work just fine.



[ Reply to This | # ]