Hello! I am looking for a way to get alert in case the OpenWRT router dies or gets disconnected behind an ISP as double NAT.
For the system with OpenWRT+Modem (single NAT), I did this way:
Set ping at https://uptimerobot.com/ for the public address (not fixed).
Have a script on OpenWRT to send me an email if the public address changes, using
kdig +short myip.opendns.com @resolver1.opendns.com
or
. /lib/functions/network.sh; network_find_wan NET_IF; network_get_ipaddr NET_ADDR "${NET_IF}"; echo "${NET_ADDR}"
If I get an email from uptimerobot that my public address is not pingable, and I get an email from OpenWRT that the address changed, then I know that nothing happened. If I don't get any email from OpenWRT, then I know that either modem or OpenWRT is dead, I have to go check. This way, I don't have to pay for a fixed public IP.
Now, if I change the modem into an ISP router, it's not going to work: OpenWRT might be dead or the cable cut off and I won't get notified. Is there any way to get around it, other than using "exposed host" option for the router ? (Fritzbox 7530)
I will have two sets of this system (FB4020 with OpenWRT behind FB7530), so I might think of something like site-to-site wireguard if nothing else works, but I am wondering if there is any easier way to achieve this.
I will appreciate your hint!