Link to home
Start Free TrialLog in
Avatar of m0nk3yza
m0nk3yzaFlag for South Africa

asked on

OpenBSD and vpnc - force disconnect on exit

Hi Guys,

My question: Is there a way to force vpnc to disconnect when I log out (Cisco VPN Client has this option - for Windows).

I have an OpenBSD 4.9 server with vpnc.

I ssh into the OpenBSD server (from my Windows laptop) and then run vpnc to connect to another network (so far so good).

[1] As soon as I connect the vpnc connection, I'm unable to establish a 2nd connection to the OpenBSD server from my laptop.
[2] Also, when I log out from the OpenBSD server, the vpnc connection remains active, preventing me from logging into the OpenBSD server again.

I then have to go to the OpenBSD server, and run "pkill vpnc" from the console.

Thereafter I can ssh into the OpenBSD server again.

Thank you,

J

Avatar of gheist
gheist
Flag of Belgium image

[1] do you see anything in vpnc logs (or messages) why 2ns connection does not connect.
[2] It is designed to work like this. It suns a background daemon which does not disappear with session. There is a "screen" utility if it does not run in background well. Probably there is no remedy.
You can simply create a logout script that would kill the vpnc job.
More on logout scripts here:
http://webmaster.iu.edu/tool_guide_info/logout_script.shtml
SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If there ais any other user they can run a portscan and exploits over that vpn connection while it is connected, it will not start ringing and whistling...
Normally you give B grade  for simple pointers that lead to solution...
Avatar of m0nk3yza

ASKER

Point taken.