[Nodogsplash] Redirect when there is no Internet connection.
moritzwarning at web.de
Thu Jan 22 14:21:16 UTC 2015
On 01/22/2015 01:12 PM, Gui Iribarren wrote:
> On 22/01/15 03:57, Moritz Warning wrote:
>> Yes, that is right.
>> When there is no Internet connection, then there is no DNS.
>> Th Browser fails to resolve the DNS record and won't make
>> a http request.
>> When there is no Internet connection, you could configure your
>> DNS server to resolve everything to a specific IP address.
> with dnsmasq (the stock openwrt dns server) that would be the
> "--address" option
> -A, --address=/<domain>/[domain/]<ipaddr>
> [...] Thus --address=/#/22.214.171.124 will always return 126.96.36.199 for any
> query not answered from /etc/hosts or DHCP and not sent to an upstream
> nameserver by a more specific --server directive.
> so, try appending the following line to /etc/dnsmasq.conf and restart
> the daemon:
> something like
> # echo "address=/#/188.8.131.52/" >> /etc/dnsmasq.conf
> # /etc/init.d/dnsmasq restart
Even better! :)
Thanks for the hint!
>> Though, this is not really recommended. :>
> why not? :)
Well, I had the impression that the browser caches the entry to access the IP afterwards.
So the user will first click on the splash page and then get a failed connection.
Another page reload should work, though.
> Nodogsplash mailing list
> Nodogsplash at ml.ninux.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 473 bytes
Desc: OpenPGP digital signature
More information about the Nodogsplash