Hi all !
An idea arose, maybe a little crazy, but still.
Periodically, somewhere along the line there are communication breakdowns, mainly due to a power outage somewhere on the line and, of course, the Internet does not work.
Users start unplugging the router, then call me
Question: is it possible to do something so that when the Internet goes out, the user is redirected in the browser to a page on which it will be written - don’t worry, the Internet will appear soon
You could add an internal DNS address that resolves all requests to an in house URL.
Internet goes down, dns fails except the last one which resolves all requests to a local HTML page.
If a specific site is down, but "the rest of the Internet" works, then the "Internet is down" web page would be inaccurate, no?
Granted, you also get this symptom with "the standard way" every system checks for Internet connectivity (that is, attempt to connect to a specific server). Speaking of which, I wonder how any such solution would interact with such built-in "connectivity checker" functions.
I'm going to attempt to sketch a possible implementation of @LilRedDog's solution. I have not actually tried this.
Run another dnsmasq instance listening on localhost only and on a different port, say port 5353. Call this the "failover DNS".
Configure the failover DNS to return the OpenWrt device IP for all queries. According to the dnsmasq man page, you can use something like --address=/#/192.168.1.1 to achieve this effect.
Configure the main DNS to use the failover DNS when upstream DNS aren't available. My initial reading of the man page suggests using --strict-order in combination with multiple --server directives. Apparently you need to specify the servers in reverse order, so the highest-priority servers go last in the list. This would mean the failover DNS directive like --server=192.168.1.1#5353 goes first.
Modify or replace the LuCI front page to show your desired message.
text is inserted
and redirects only if you enter the router address, for example 192.168.1.1/fhgjg
text visible
but if you enter the wrong domain into the browser address, it doesn’t redirect, maybe I’m doing something differently than usual, but beyond these steps I’m at a dead end