Why is DNS lookup failing for both my computer and my smartphone?
December 17, 2014 11:12 AM   Subscribe

Why is DNS lookup failing for both my computer and my smartphone when connected to public (library) wifi, when it is working for everyone else?

I had been using my library's public wifi on both my laptop and my phone all morning with no issues. I stepped out for lunch, and when I came back, I was getting DNS lookup failures, on both devices. (DNS_PROBE_FINISHED_BAD_CONFIG, DNS_PROBE_FINISHED_NXDOMAIN, and some others) Meanwhile, no one else in the room was having any issues.

I changed the DNS server to Google's public DNS server (8.8.8.8) on both my phone and computer, and now I'm back in business.

So what happened here? What is baffling to me is that it affected both my devices (a Macbook and an Android), and I refuse to believe that everyone in here has at one point changed the DNS settings on their devices.
posted by alligatorman to Computers & Internet (6 answers total)
 
Best answer: Many wifi networks require you to first go to any website and either "sign in" or "accept terms and conditions" before the internet connection will be fully functional on your device. Might this have been the problem? Usually, I open a web browser and try to go to any website to get the login page. It could be that when you went to lunch, your devices went to sleep and the wifi router forgot about them.

It looks like you found a reasonable workaround though. I will have to try changing my DNS on one of these sites as that silly login is rather annoying.
posted by tckma at 11:20 AM on December 17, 2014


Response by poster: tckma - I don't think that's the issue. I couldn't even reach the Terms & Conditions page on either device. As a matter of fact, after changing the DNS setting on my phone to Google's, the T&C page appeared and I was able to get in.
posted by alligatorman at 11:32 AM on December 17, 2014


Response by poster: huh.. well I'll have to try it out again tomorrow, but I'll accept your answers, since it's the only thing that could make sense.
posted by alligatorman at 1:13 PM on December 17, 2014


I agree with the other posters that it sounds like a traffic redirection / captive portal situation may be involved.

If you can reproduce the condition and want to troubleshoot:
  • Open a shell in a "Terminal" window
  • Use the "dig" command to issue a dns query, e.g. "dig ask.metafilter.com". The output will tell you (among other things) what server answered your query, whether it gave you an answer or an error code, and what it answered (if it provided an answer.)
  • If you suspect that the DNS server which was suggested for you as part of the DHCP lease you received when you joined the network is giving you altered answers, compare the results to answers from another DHCP server, e.g. "dig ask.metafilter.com" vs. "dig @8.8.8.8 ask.metafilter.com"
Dig is a very versatile DNS troubleshooting tool and it's already installed on your MacBook (unless Apple has removed it in the most recent distributions of MacOS; I haven't checked lately but BIND and its associated utilities were provided as part of MacOS for quite some time.)
posted by Nerd of the North at 1:22 PM on December 17, 2014


I've run into a similar problem with public wifi routers where I have to request a page I've never been to before to get the login page to load. If I just refresh whatever page is in the browser, or use yahoo or Google or something in the history on the browser, it simply does not work.
posted by COD at 5:31 PM on December 17, 2014


COD beat me to it. i've noticed on my android and ios phones, sometimes on my OSX(10.6-10.10) laptops, and windows 7/8 machines that you need to load a page that *isn't cached* so that it 100% for sure has to do a real DNS lookup. Then it'll get harpooned and taken to the username/password or "click agree to continue" portal page.

My default is just to do a random google search, that seems to work like 9/10 times.

Captive portals are support nightmares and i hate them. I get why they need to exist in some places, but ugh. They're soooo janky and borked sometimes and occasionally you have to wipe your cache and refresh your DHCP lease to basically get a second "chance" at getting redirected, or your IP/MAC gets marked as connected but not signed in and you're just boned because the stupid page won't load.

Note that setting a custom DNS server might break your connection on other, "smarter" captive portaled networks in the future.
posted by emptythought at 11:14 PM on December 17, 2014


« Older How much to tip building staff?   |   "Babymoon" weekend trips within 2-3 hours of... Newer »
This thread is closed to new comments.