I've been using OpenWrt for some time now. I occasionally run into an issue that I haven't been able to figure out how to address it. I searched around for answers to this and I wasn't successful. Forgive me if this has been asked before.
I commonly use my OpenWrt router in hotels and public Wi-Fi hotspots where they redirect you to a captive portal via a fully-qualified domain name (FQDN) that can only be resolved when using their internal DNS servers.
For example, tonight I logged into OpenWrt, scanned for the hotel Wi-Fi network and the router connected successfully. The hotel's network assigned two internally accessible DNS servers.
When I attempt to access the Internet from a computer behind OpenWrt, the browser receives the HTTP 302 redirect from the hotel Wi-Fi network but fails to connect because my computer cannot resolve the FQDN of their web server.
The way I work around this issue is to find the DNS server addresses that were assigned to the OpenWrt WAN interface and add one of them to my computer's Wi-Fi adapter. Once I do that, I can resolve the FQDN in the captive portal redirect URL, agree to the acceptable use policy, then I can access the Internet.
I can even revert back to the DNS sever IP assigned by the OpenWrt DHCP server which is the IP of OpenWrt itself.
If I SSH into OpenWrt, then try to resolve the FQDN for the captive portal, that works as I would expect.
It seems that the dnsmasq is just using the DNS root servers and is ignoring the DNS servers assigned by the hotel Wi-Fi network.
Why doesn't OpenWrt just use the upstream DNS server(s) assigned to the WAN interface when a host on the LAN issues a DNS query?
Is there an option to force OpenWrt to use the upstream DNS servers?
Is there an option where I can have OpenWrt automatically update the DHCP configuration such that it assigns the upstream DNS servers to DHCP clients on the LAN?
Thanks in advance!