Community discussions

MUM Europe 2020
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Thu May 21, 2015 11:14 am

Netwatch and SSH Script

Thu Sep 01, 2016 8:57 pm

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
User avatar
Posts: 43
Joined: Sat Sep 03, 2016 12:31 am
Location: Brazil

Re: Netwatch and SSH Script

Sun Sep 04, 2016 3:01 am

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 !!!

Who is online

Users browsing this forum: SiB and 29 guests