Cleaning Chrome DNS Cache

While playing with Mikrotik's DNS I accidentally made a regular expression statement overly broad. Error was clear: I had "ana" in the DNS Rexexp field instead of "^ana$". What this simple error did was to resolve everything with ana in the name to the machine on local network. I noticed that when I tried to access and got a timeout.

I fixed the erroneous entry and all was good when I checked it manually with nslookup. However, I still couldn't access the web site. Interestingly, if I tried using Internet Explorer instead of my favorite Chrome, access worked. Yep, Chrome has its own internal DNS cache.

Cleaning Chrome's cache is reasonably easy. Only thing needed is a visit to chrome://net-internals/#dns and hitting the Clear host cache button. However, my local erroneous address was back as soon as I tried accessing the site again.

Interestingly Windows themselves have also cached the incorrect IP address. Chrome using Windows API to resolve DNS name was catching the wrong one. Internet Explorer was unaffected as it made DNS query directly. Curious choices. :)

Cleaning Windows cache involved getting to elevated prompt. My favorite way is hitting Win+X and selecting Command Prompt (Admin) from the menu. Once in the prompt, we just execute:

> ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.

With this (and clearing Chrome's cache again) I could browse again.

PS: For curious, Mikrotik supports extended POSIX regular expressions.

Leave a Reply

Your email address will not be published. Required fields are marked *