Hello ,
I need some guidance on script based “Re-Connect SSTP connection from Client” router.
SSTP : SSTP connection is using certificate based.
Client router :951Ui-2HnD - R3 /Firmware: 6.48.6
All of sudden the SSTP connection disconnects even though the internet connection exists.
what i am looking is
a. check for internet connection
Yes (internet ) → check for SSTP connection , SSTP connection exists - No action required
Yes (internet )–> check for SSTP connection , SSTP not exist then re-connect the SSTP from client router.
No(internet ) – no actin required .
Check the same process every 30 Min once.
Please give me the script and scheduling idea to achieve the above.
Regards
MR
Im not sure about term of reconnect or restart mechanism here.
Script:
:local iWAN "ether1";
:local iSSTP "sstp-out1";
:if ((![/interface get $iSSTP running])\
&& ([/ping 1.1.1.1 interval=1 count=2 interface=$iWAN] != 0)) do={
/interface disable $iSSTP;
:delay 5s;
/interface enable $iSSTP;
}
Basic scheduler maybe:
/system scheduler
add name="sstp-mon" on-event="script" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon\
start-time=startup interval=30m
thankyou very much for sharing,
i am testing will update the results.
MR
/interface disable $iSSTP
#above disabled the SSTP , But unable view the SSTP connection enabled.
manually connected at remote side and noticed , the SSTP was disabled.