LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   keep linux cisco vpn client up and running (https://www.linuxquestions.org/questions/linux-networking-3/keep-linux-cisco-vpn-client-up-and-running-90679/)

cccc 09-08-2003 06:37 PM

keep linux cisco vpn client up and running
 
hi

I have installed vpnclient-linux-3.7.3.A
at SuSE 8.2

My problem is, that sometimes the tunnel goes down.

I'm looking for a script to keep linux cisco vpn client up and running and I would be very glad, if some one can post it.

kind regards
chris

td_miles 10-06-2003 01:23 AM

I configure PIX firewalls for use with teh VPN clients and there is a timeout that is set for inactive clients to disconnect them. This is done for a reason, so as I see it, you have two options:

1. Contact the person who is in charge of the VPN endpoint you are connecting to and see if the timeout can be lengthened.

2. Do something to send some traffic so that the tunnel doesn't get disconnected if idle.

If the tunnel is not idle (ie. you are sending traffic over it, but still getting disconnected), then you need to start doing some debugging to work out why. I haven't used the Linux VPN client, but the Windows one has a debug console built in where you can try to see what is happening.

An alternative would be to write a script that checks to see if the tunnel is up (say every 1 minute) and if it isn't, then the script should initiate the tunnel.

I would suggest talking to your tech support for the VPN endpoint for this as well.

levenger 01-13-2004 08:26 AM

cccc,

I've installed the Cisco VPN client on my computer successfully but I can't find the file
/etc/rc.d/init.d/functions

Do you know where it comes from? Does the install create it? Is it something I need to install? If so, what package is it in?

cccc 01-13-2004 02:35 PM

hallo levenger

what kind of linux do you have ?

cisco vpn client was created for linux RedHat
and it install start links for RedHat

first check which runlevel starts your linux:

# runlevel
N 5

after your have to create start links:

cd /etc/init.d/rc5.d
ln -s ../vpnclient S99vpnclient
ln -s ../vpnclient K99vpnclient

regards
cccc

srp8621 04-18-2006 01:45 PM

Followup
 
Quote:

Originally Posted by cccc
hi

I have installed vpnclient-linux-3.7.3.A
at SuSE 8.2

My problem is, that sometimes the tunnel goes down.

I'm looking for a script to keep linux cisco vpn client up and running and I would be very glad, if some one can post it.

kind regards
chris


Hi Chris.

Did you ever find a suitable script to fix this problem?
I am in the same situation and am in need of a keep alive script.

Thanks.
Scott

cccc 04-18-2006 07:54 PM

Quote:

Originally Posted by srp8621
Hi Chris.

Did you ever find a suitable script to fix this problem?
I am in the same situation and am in need of a keep alive script.

Thanks.
Scott

yep,

I've added to the end of /etc/init.d/vpnclient the following:
Code:

cp /etc/Cisco/Profiles/cisco.template /etc/Cisco/Profiles/cisco.pcf
sleep 10
/usr/local/bin/vpnclient connect cisco & > /dev/null

in cisco.template I had user and passwort and SaveUserPassword was on '1'.

and there was my script to keep the vpn client up & running from cron:
Code:

#!/bin/sh

# cisco_vpn_script
# /usr/local/bin/vpnclient

ping -c 4 X.X.X.X

# ps ax | grep vpnclient | grep -v grep

if [ "$?" != "0" ] ; then

# restart PROCESS

    /etc/init.d/vpnclient_init restart

    fi

greetings
cccc


All times are GMT -5. The time now is 10:34 AM.