09-28-2009
Hi Chakrapani,
Thanks for the help. I need to mention again how the script should run. I need to write a script wherein i should recieve a mail when the VPN is down and when the vpn comes up i should a notification mail that the vpn is back up..That means i need to recieve email only twice, first when the vpn goes down and second when the vpn comes up..cron will run this script every 5 minutes..if the vpn goes down for 20 minutes the email stating "Partner VPN down" should be recieved 4 times, and the script is working as expected when the vpn goes down.. once the vpn is up only one email should be received that the vpn is back up.
I tried running the script you wrote for me, it sends an email that the "VPN is up" every time the script is executed..So the script should be modified in such a way that i should recieve "VPN UP" mail only once when it is back up...
Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i'm connecting with ssh from a windows pc to a linux system. i want to start e.g. a download and close my session afterwards. how do i do this without killing the download?
thx in advance. (2 Replies)
Discussion started by: sTorm
2 Replies
2. Shell Programming and Scripting
Hello all, I know that is a question which has made too many times, and I have been looking into the threads but all posted was not sucessfully for me so...
I need a shell script which connect two unix servers, but NOT using ssh... Is there another way to do it?
I've tried ssh but it didn't... (1 Reply)
Discussion started by: Geller
1 Replies
3. Shell Programming and Scripting
Hi,
I want to connect to oracle db using unix shell script. And i want to retrieve data from db through shell script.
Please help me as soon as possible.
Thanks,
J.P. Das (1 Reply)
Discussion started by: jyotidas
1 Replies
4. Ubuntu
Hi all,
I am trying to configure and connect Cisco VPN on Ubuntu 10.04.
I've imported .pcf file. The new vpn conn appears in the VPN Connections option. Now when I select it, it doesn't connect. Nothing happens.
I am not able to connect to VPN at all. I tried using kvpnc as well but it... (10 Replies)
Discussion started by: morningSunshine
10 Replies
5. Shell Programming and Scripting
Guys,
I am trying to write a shell script that connect to wcsprod database and read the query
#!/bin/ksh
sqlplus -s < connect to wcsprod user wcsadm using pwd >
select * from catentry fetch first 1 row only with ur;
databse: wcsprod
user: wcsadm
pwd: pwd
thanks (1 Reply)
Discussion started by: skatpally
1 Replies
6. AIX
Hi,
I have a task requested by my boss to create a script to enable a server to connect to a vpn network and then to connect to another server to upload some data...
How can I connect to a vpn network from AIX server? via telnet? ssh?
I have tried to google but mostly the answers are... (1 Reply)
Discussion started by: mushr00m
1 Replies
7. Shell Programming and Scripting
Hi All,
Please see the below code.
it is working fine when in 'test_file' have only one emplid.
test_file contains only emplid and date, like below ...
0000221|1/12/2003
0000223|1/1/1996
Problem :-
when test_file contains more then one records(emplids) it is not giving any errors... (3 Replies)
Discussion started by: krupasindhu18
3 Replies
8. Shell Programming and Scripting
Dear Experts,
I am new to the shell scripting.
I am looking for a shell script to connect to one Unix/Linux server1 to other Unix/Linux server2 and trigger a SAP Event in that server2 (Which will trigger a job in SAP).
Is this possible to connect from one server to the other server securely... (7 Replies)
Discussion started by: Venu V Reddy
7 Replies
9. Shell Programming and Scripting
hello
i try to made a report to conect all database to diferent OS
HP-UX/LINUX/SOLARIS/AIX
this is my example
i have 5 db
OS are HP-UX
ps -fea | grep pmon
root 1120 1 0 Nov 29 ? 5:14 ipmon -sD
oracle 10286 1 0 Nov 29 ? 27:19 ora_pmon_BD1
oracle 10431... (7 Replies)
Discussion started by: ceciaide
7 Replies
10. Shell Programming and Scripting
Hi Guys,
I suspect what I'm trying to do isn't possible, but I'm hoping someone can either confirm this or point me in the right direction.
We have a third-party application which transfers a collection of files to our SFTP server ( Ubuntu 12.04 with OpenSSH ) . Once the app disconnects, we... (13 Replies)
Discussion started by: jamesdrinkwater
13 Replies
LEARN ABOUT OSX
racoonctl
RACOONCTL(8) BSD System Manager's Manual RACOONCTL(8)
NAME
racoonctl -- racoon administrative control tool
SYNOPSIS
racoonctl reload-config
racoonctl show-schedule
racoonctl [-l [-l]] show-sa [isakmp|esp|ah|ipsec]
racoonctl flush-sa [isakmp|esp|ah|ipsec]
racoonctl delete-sa saopts
racoonctl establish-sa [-u identity] saopts
racoonctl vpn-connect [-u -identity] vpn_gateway
racoonctl vpn-disconnect vpn_gateway
racoonctl show-event [-l]
racoonctl logout-user login
DESCRIPTION
racoonctl is used to control racoon(8) operation, if ipsec-tools was configured with adminport support. Communication between racoonctl and
racoon(8) is done through a UNIX socket. By changing the default mode and ownership of the socket, you can allow non-root users to alter
racoon(8) behavior, so do that with caution.
The following commands are available:
reload-config
This should cause racoon(8) to reload its configuration file.
show-schedule
Unknown command.
show-sa [isakmp|esp|ah|ipsec]
Dump the SA: All the SAs if no SA class is provided, or either ISAKMP SAs, IPsec ESP SAs, IPsec AH SAs, or all IPsec SAs. Use -l to
increase verbosity.
flush-sa [isakmp|esp|ah|ipsec]
is used to flush all SAs if no SA class is provided, or a class of SAs, either ISAKMP SAs, IPsec ESP SAs, IPsec AH SAs, or all IPsec
SAs.
establish-sa [-u username] saopts
Establish an SA, either an ISAKMP SA, IPsec ESP SA, or IPsec AH SA. The optional -u username can be used when establishing an ISAKMP
SA while hybrid auth is in use. racoonctl will prompt you for the password associated with username and these credentials will be
used in the Xauth exchange.
saopts has the following format:
isakmp {inet|inet6} src dst
{esp|ah} {inet|inet6} src/prefixlen/port dst/prefixlen/port
{icmp|tcp|udp|any}
vpn-connect [-u username] vpn_gateway
This is a particular case of the previous command. It will establish an ISAKMP SA with vpn_gateway.
delete-sa saopts
Delete an SA, either an ISAKMP SA, IPsec ESP SA, or IPsec AH SA.
vpn-disconnect vpn_gateway
This is a particular case of the previous command. It will kill all SAs associated with vpn_gateway.
show-event [-l]
Dump all events reported by racoon(8), then quit. The -l flag causes racoonctl to not stop once all the events have been read, but
rather to loop awaiting and reporting new events.
logout-user login
Delete all SA established on behalf of the Xauth user login.
Command shortcuts are available:
rc reload-config
ss show-sa
sc show-schedule
fs flush-sa
ds delete-sa
es establish-sa
vc vpn-connect
vd vpn-disconnect
se show-event
lu logout-user
RETURN VALUES
The command should exit with 0 on success, and non-zero on errors.
FILES
/var/racoon/racoon.sock or
/var/run/racoon.sock racoon(8) control socket.
SEE ALSO
ipsec(4), racoon(8)
HISTORY
Once was kmpstat in the KAME project. It turned into racoonctl but remained undocumented for a while. Emmanuel Dreyfus <manu@NetBSD.org>
wrote this man page.
BSD
November 16, 2004 BSD