Joined: 16 Apr 2016 Posts: 307 Location: California
Posted: Fri Sep 15, 2017 7:51 Post subject: Custom Watchdog
Yes, you would need to use a custom watchdog script like one I just created for the openvpn tunnels.
Except this one would monitor the WAN interface and simply WAN down then WAN up I believe.
In certain cases possibly power on/off the usb as well could be an option.
(Maybe more than that depending on the setup)
I could program this is I was able to see it and get the data. _________________ My Karma ran over your Dogma
SploitWorks Custom Flashed Routers
Very good, it is possible. Good news, thank you both!
Now, if I got my router up to a newer r33345, got SSH-access, enabled JFFS2 to allow for some startup script like e.g. a variant of "failover.startup" found on the https://www.dd-wrt.com/wiki/index.php/Dual_WAN_with_failover page, what are the actual commands to bring the WAN down and up again by dialup as already set in the web-ui?
Is it a "ifconfig" command involving my "eth0" like what I see in "wan2up.startup" or is it a more elaborate script? What are the commands?
The second diode on my router reflects WAN-connectivity. Normally blue, but when the 3G-connection to the internet is lost, it goes orange (Linksys 1200ACv2). As things are out of the box, the diode appears to be a reliable indication of the state of internet-connectivity. Will reconnecting continue to be reflected in this diode as in "turn it back to blue once re-connected"?
From the below command, I suspect that the network interface for my WAN is "eth0".
Code:
root@enterprise:~# nvram show | grep wan | grep ifname
size: 27848 bytes (37688 left)
wan_ifname=
wan_ifname2=eth0
wan_ifnames=
Posted: Mon Sep 25, 2017 20:03 Post subject: stopservice wan, startservice wan
Okay, it does very much appear as if the commands I seek to do "up" and "down" on the WAN of mine might be these:
Code:
root@enterprise:/# stopservice wan
No such device
No such device
Code:
root@enterprise:/# startservice wan
cat: can't open '/proc/net/ip_conntrack_flush': No such file or directory
0
No such device
D-Link DWM-157 B1 detected
stty: standard input: cannot perform all requested operations
stty: standard input: cannot perform all requested operations
The commands do produce some not-too-sound looking output, but the "stopservice" command does disconnect the router from the internet and the "startservice" command does connect the router again. Right now, I have testet it with some live streaming and I am happy to see the LED for WAN-connectivity go to the disconnected orange color on stopservice and turn back on to the connected blue color on startservice. I also note that the startservice command by output appears to look at and use my 3G dongle (D-Link DWM-157 rev. B).