Page 1 of 1

Netwatch and SSH Script

Posted: Thu Sep 01, 2016 8:57 pm
by RyperX
Hi guys,

i need your help. Setup: openwrt router with USB LTE Modem in Bridge Mode to my Mikrotik.
The problem is the router gets an 24h official dhcp ip adress, but the dhcp client thinks it will last for 7 days.
Because of that i use netwatch to monitor a wan ip (google dns) and when it get an timeout, it will disable and enable the interface.
This is working fine for me at the moment.

My other problem:
Sometimes the usb modem doesnt connect on the openwrt router and the easiest way is to reboot the router.
So my idea; use netwatch and when it get 2mins timeouts reboot the openwrt router.

My question how i would write the ssh command to connect with password? After login it only needs "reboot" ;)

Thanks and best regards

Re: Netwatch and SSH Script

Posted: Sun Sep 04, 2016 3:01 am
by BrasDeutscher
I think it's better when you use any Script in Netwatch which change the distance Number, example Google O.k. set distance to 0 on your ping Interface, if Google was down set distance to 3, when you use two Wan's you set the second Wan to distance 2, for me work it very fine !!!