I wish there was a command to RING A BELL when OpenVpn connects!

This is where we can discuss what we would like to see added or changed in OpenVPN.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
woodrock
OpenVPN User
Posts: 37
Joined: Sun Jun 04, 2017 1:59 am

I wish there was a command to RING A BELL when OpenVpn connects!

Post by woodrock » Sat Jul 01, 2017 12:22 pm

I wish there was a way to tell the OpenVPN Daemon to RING A BELL when OpenVpn connects!
Image
My Windows OpenVPN use model is described here, where I simply select a score of recently downloaded public openvpn files from vpngate.net to open in the OpenVPN Daemon, and where only one command window makes the connection, while the rest of the command windows die of their own accord within minutes.

Given it takes time, I have to keep checking; but if an audible bell were rung upon a successful connection, it would be more efficient!

Skaperen
OpenVPN Power User
Posts: 89
Joined: Fri Aug 05, 2011 3:02 pm
Contact:

Re: I wish there was a command to RING A BELL when OpenVpn connects!

Post by Skaperen » Mon Jul 10, 2017 12:57 am

an app that can ring your bell and can scan the log file for the right text, or ping a known host via the tunnel, could solve your need.

woodrock
OpenVPN User
Posts: 37
Joined: Sun Jun 04, 2017 1:59 am

Re: I wish there was a command to RING A BELL when OpenVpn connects!

Post by woodrock » Sun Sep 03, 2017 10:42 am

Skaperen wrote:an app that can ring your bell and can scan the log file for the right text, or ping a known host via the tunnel, could solve your need.
This may very well be true, and I appreciate the advice since nobody has to offer any advice.
However, unfortunately, I have two responses to that which negate it as a practical matter:

1. This thread is expressly for the openvpn app to add the feature, not for a second unrelated app to add the feature. :)
2. Besides, nobody knows how (yet) to make a secondary app ring the bell either.

For details on the second issue above, see the related thread exactly asking HOW to ring a bell (any way possible) when OpenVPN connects:
* How can I get OpenVPN Daemon to ring a bell upon "Initialization sequence completed

After two months, we still have been unable to even get a secondary app to ring a bell upon OpenVPN completion.

klanimantsi
OpenVpn Newbie
Posts: 13
Joined: Mon Sep 04, 2017 9:00 am

Re: I wish there was a command to RING A BELL when OpenVpn connects!

Post by klanimantsi » Tue Sep 05, 2017 9:59 am

Hmm, yea now that you say it I think that would be a handy feature:)

x9p
OpenVpn Newbie
Posts: 4
Joined: Mon Sep 18, 2017 12:07 am

Re: I wish there was a command to RING A BELL when OpenVpn connects!

Post by x9p » Wed Sep 20, 2017 1:27 am

My sugestion is for a linux environment. Can be adapted to a windows environment via cygwin or powershell

assuming this openvpn start script:

openvpn --config /etc/openvpn/config --log /var/log/openvpn.log

bell.sh (run via nohup and/or put in /etc/rc.local:

-----
#!/bin/bash

MAX_BELL_TIMES=10 # 10 bells upon initialization sequence completed

while true ; do

completed=$( tail -n10 /var/log/openvpn.log | egrep 'Initialization Sequence Completed' | wc -l )
if [ $completed -ne 0 ] ; then
for belltimes in $(seq 1 ${MAX_BELL_TIMES})
do
echo -ne "\a"
done
echo -ne "\n\n\n\n\n\n\n\n\n\n\n" >> /var/log/openvpn.log
fi
sleep 10

-----

script was not tested, may contain bugs, probably not.

Post Reply