What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Cron job example to do a hearbeat ping

ifconfig will show you all currently active interfaces

It worked. Thanks so much !!! I've changed the VPN to route in inclusion and the router is not included but the ping is now going through the tunnel. I've also changed the ping to once in 30 seconds. The provider also said that openvpn keeps the tunnel running with an icmp hit every 10 seconds. Not sure but the ping has kept the connection alive. Still needs a detailed test to conclude but let's see but at least for now the solution seems to be working.
 
Thank you so much for your help, however, the ping on the router didn't cause the VPN to remain alive. This could happen due to a few issues in my opinion such as.

ping on google.com is getting routed through the internet and not through the VPN as it was on the laptop.

Is there a way to get the output of the ping to the logger.? is the cron job using the same route as when the command is being run on terminal?

for example if I ping www.google.com on local network, I'll get 10ms in response. however when its on VPN it will give a response of 189ms. hence I know its going through the vpn.

Alternatively do you suggest to increase the size of ping packets?

Use ping -I tun11 google.com to make sure it goes through the right interface
 
Similar threads
Thread starter Title Forum Replies Date
XIYO Questions Regarding acme.sh Cron Job Setup and Directory Linking Asuswrt-Merlin 1

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top