Quantcast
Viewing all articles
Browse latest Browse all 20028

Is something wrong with my Cron/VPN check script?

Hi

 

I have a bit of a randomly dodgy DSL line. It behaves itself mostly, but, it can randomly (very recently twice per day) drop the VPN and not come back. 

 

I never got DPD working and instead I used the method I found on the forum:

 

#!/bin/bash

/bin/ping -c 1 -W 2 lan-ip-of-remote-end 1>/dev/null 2>&1

if [ $? -ne 0 ]; then
        echo "Failed"
                /bin/vbash -ic 'clear vpn ipsec-peer public-ip-of-remote-end'
                fi

along with adding the following config to the system:

 task-scheduler {
     task vpncheck {
         executable {
             path /config/vpncheck.sh
         }
         interval 1m
     }
 }

This always seemed to work fine in the past, but recently it doesn't seem to fire.

 

My VPN just dropped and logging on to the remote end, I could see an inbound trying to reestablish every 20 seconds, but failing.

 

I usually log on to my edgerouter and I run "restart vpn" which works, but, this time I tried calling "/config/vpncheck.sh" (just in case the script broke) which also immediately started working.

 

I can only assume the cron/task isn't firing and before I try loads of things, I was wondering if anyone has seen this before and can recommend anything?

 

 

 FYI:

Version:      v1.7.0
Build ID:     4783374
Build on:     06/22/15 15:34
Copyright:    2012-2015 Ubiquiti Networks, Inc.
HW model:     EdgeRouter Lite 3-Port

 


Viewing all articles
Browse latest Browse all 20028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>