Recently I plopped an old laptop running a stripped down version of Ubuntu onto my home network. I joined it to the local workgroup and gave it a NetBIOS name so I could ssh into it from the windows machines without having to remember the IP address. In the past this has always worked for me, but this time around I noticed something weird. When I tried to ping the machine from within windows the local address was resolving to some remote ip:
>ping elder Pinging elder.hsd1.nj.comcast.net [188.8.131.52] with 32 bytes of data:
Initially I thought that I simply messed up the entries in smb.conf but this was not the case. To my dismay I realized that this was happening for EVERY machine on my network. I could not ping grendel, I could not ping eoran, I could not reach malekith and even myprecious (don’t ask – it’s not my machine) was out of reach! What the fuck in hell?
Quick whois lookup gave me the culprit: OpenDNS which I have been using as my primary DNS provider for quite a while now. I’m not sure why this issue started right now. I don’t remember seeing this problem ever before. Nevertheless it was there and I suspected it had something to do with the OpenDNS auto correction which fixes typos in your URL’s and redirects you to a search page whenever it fails a look-up. I was always a bit skeptical about that particular “feature” but I didn’t really mind it as long as it did not interfere with normal day to day operations.
This issue really boils down to the way Windows does domain name resolution. It works like this:
- First it checks the HOSTS file.
- Next it Queries the DNS server(s).
- If all else fails it falls back on NetBIOS.
In my case, step 2 would never fail because it would successfully resolve to that weird remote ip I shown you above so it would never even try to use NetBIOS. This was an issue because I really did not feel like setting up a local DNS server just to be able to access local machines. I mean, I could but I don’t really have a spare box to devote to this task, and also it would be silly considering that up until now I was happily relying on NetBIOS names for this sort of stuff.
There only one quick solution could think of: stop using OpenDNS and switch back to the servers provided by my ISP. But I did not want to do that. There is a reason why I started using OpenDNS in the first place – not only is it faster, but also more reliable than whatever Comcast had to offer.
The Real Solution™ required some digging around in OpenDNS docs. Apparently you can disable the auto correct feature if you register your network on the OpenDNS website. The process is very straightforward – you create an account and then associate your external IP with it. Once you do that, you can disable, and reconfigure all the “questionable features” that come with the service.
I’m not terribly happy with putting my IP address in their database this way, but then again I have to remind myself that they already have my IP showing up many many times in their logs so there is probably no difference here.
The changes took effect some 5 minutes after I registered and disabled the typo correction. Now I can ping local machines again without any issues. So if you are using OpenDNS and you suddenly find yourself cut off from your local network consider registering, or dropping their service.
Sigh… I wish some of these features were opt-in instead of opt-out. But I guess they are trying to make their service idiot friendly and idiots do not opt into or opt out of anything that ever remotely relates to technology.