openDNS gibberish

My Firefox is configured to pull in the most relevant result page and dump it off on my monitor whenever I type in a query. Say, for example, when I type in an error message I get from my project development in the address bar and hit enter, I am automatically taken to a relevant site/forum that addresses my problem, like [stackoverflow.com(http://stackoverflow.com/). This has been an extremely convenient tool for me over the past few years. You can configure your Firefox too; details here.

So, it became an essence of my daily interaction with the www, as it enhanced my experience with it.

You start realizing the true power of something you had once it leaves you, much like a broken stereo headset with one deaf ear. This simple, yet powerful tool,  became that something  for me. One fine day, I opened up my browser and typed in ‘gmail’ and hit enter with an impact that could be heard over the next room (yeah, I am a bit rough on my Enter key. And I am sure majority of you are too)

So anyways, instead of the usual gmail, I am greeted with this;

What the hell is this?

It was a total surprise. Out of nowhere, my query was redirected to some site called http://www.website-unavailable.com. The first thing that came to my mind was how did my configuration change? I rechecked my settings and everything was intact. Okay, the browser settings are untouched. So the next probable area of fault could be messed up DNS settings, I thought. I opened up my DNS settings (mine are under ‘Network’ in control center of my Linux Mint system. Check  how to get to your DNS settings if you’re on a different OS). I found the problem area. My DNS settings were altered.

I had no clue how it got altered. I went ahead and removed those 2 DNS IPs and added my previous ones. If you’re unsure what your DNS IPs were, contact your ISP or use google’s public DNS: 8.8.8.4 and 8.8.8.8 .

And voila! my ‘something’ was back!

Not so fast!

A few days later, the same issue popped up. I was literally pulling my hair and cursing openDNS. OK, I get it that it maybe safer, faster, and everythingier and free like they say on their website, but that doesn’t mean it imposes itself upon me without my consent! To me, if anything, it was shittier as it took away my convenience.

Evil bureaucracy.

I opened up my DNS settings and wasn’t surprised to see that my personal settings were wiped off and replaced by those 2 annoying IPs again. I felt the insatiable need to go much deeper, to go to the root of all this and take back control of my system.

And so, a new mission was set. Firstly, I had to get my hands on the files that saved my DNS settings. So, I fired up a query of one of those 2 DNS IPs in my / directory with the parameter of search by content (like I did in one of my previous blogs).

I attacked the first result: /run/resolvconf/resolv.conf

At the first instance, I thought I had reached the root cause, but the words “OpenDNS Fallback” caught my attention.

I got to know 2 things from this file:

  1. It was dynamically generated by resolvconf and,
  2. OpenDNS configured the file from /etc/resolvconf/resolv.conf.d/

If you really are hungry about knowing not just the veins and arteries but even the capillaries of any program, read it’s manual. That’s exactly what I did. I fired up man resolvconf on my terminal. I learnt that the resolv.conf file is just a puppet who dances to the configurations set in:

/etc/resolvconf/resolv.conf.d/head and,
/etc/resolvconf/resolv.conf.d/tail files

I opened up the 2 files, and they pretty much said what they were.. the ‘head’ file was the top section of resolv.conf file and the ‘tail’ was, well, the remaining part.

The “OpenDNS Fallback” bullshit was present  in the ‘tail’ file. Finally, I had reached the root of all evil. I changed the nameserver DNS IPs to my usual ones, saved the file and fixed the permissions so only root can access/modify.

Mission accomplished!

To summarize the above thing to a mere straightforward solution if you didn’t wanna read my distress-filled words and scrolled down to get to the end, here’s what you gotta do if you’re facing the same problem:

Steps:

  1. Open /etc/resolvconf/resolv.conf.d/tail file in your text editor
  2. Change the nameserver information to the DNS IPs you want to (get it from your ISP, or use Google’s Public DNS: 8.8.8.4 and 8.8.8.8)
  3. Change the permissions of the file to 644 or 755 (sudo chmod 644 /etc/resolvconf/resolv.conf.d/tail)
  4. Restart your Internet
  5. If problem persists, then perhaps the resolv.conf file is not updated. Update it manually by opening /run/resolvconf/resolv.conf file in your text editor and changing the nameservers or open up your DNS settings and make changes over there.

So that was how I managed to get control of my system back from the evil hands of openDNS. Do tell me how you felt about the openDNS thing when it hit you. Were you comfortable? Did you struggle? Did you welcome it? or curse it and bumped into this blog in an attempt to find a solution?

Whatever it be, post a comment below and let me know.

Cheers!

comments powered by Disqus