logoalt Hacker News

itaketoday at 4:52 AM4 repliesview on HN

Does anyone have advice on how to use public wifi alongside DNS resolver?

Many public wifi network works need you to use their DNS, so they can redirect you to a gated "accept ToS" screen (and may even require re-approval every 30-60 minutes).

To resolve the issue is so frustrating:

1. realize the internet stopped working 2. ping google.com, wait for timeouts to show up. 3. try to guess if its a ISP issue, but then realize the wifi probably timed out. 4. Switch the dns. Flush DNS. 5. try to access a non-TLS domain 6. approve the gate 7. switch the DNS back

There has to be something that manages this


Replies

jer0metoday at 7:08 AM

On macOS, you might be able to use /etc/resolver to fix this:

  sudo sh -c 'echo "nameserver 192.168.1.1" > /etc/resolver/captive.apple.com'
I did this for an internal website at my university that could only be resolved using the network name server. It just occurred to me that it might also work for the URL macOS uses to detect captive portals. We'll have to see if it works the next time I'm at a café.
show 2 replies
boramalpertoday at 7:00 AM

For macOS and iOS, you can create a profile to configure which DNS server you want to use at all times (including across different Wi-Fi networks and mobile data). See:

https://doh.lvv.me/

That’s what I’ve been using for years and never had any issues with public hotspots.

show 1 reply
microgpttoday at 12:37 PM

Just put an IP address into your address bar. They're usually intercepting all port 80 traffic.

charcircuittoday at 6:47 AM

This is something your OS should handle as part of the OS's support for captive portals. I'd recommend contacting your OS's creator about this and filing a bug.