I just updated the DNS record (ns1, ns2, ns3.myhostingcompany.com) for a site I've got hosted, but I still get the domain registrar parking page. I'd like to see if the problem is Ubuntu's cached DNS records. Is there a way to clear Ubuntu's DNS cache? (if such a thing exists?)
For 11.10 and belowUbuntu doesn't cache dns records by default so unless you've installed a dns cache there isn't anything to clear. DNS records are likely cached by your provider's DNS servers so if you want to check if the DNS changes you made were successful you can interrogate a DNS server from your domain hosting service with dig:
It you want Ubuntu to start caching dns I recommend installing |
|||||
|
12.04Ubuntu 12.04 uses
There is also no need for any configuration of If you wanted to refresh your settings you could disable and then enable networking or run
This restarts If you are using a wired connection with dhcp |
||||
|
|
For 12.04:Ubuntu 12.04 does cache DNS using dnsmasq ( see
|
|||||||
|
|
http://www.ubuntugeek.com/howto-clearflush-dns-cache-in-ubuntu.html Also as a note you can check and see if your DNS changes have propagated using dig and looking up against someone else other than your default DNS servers. In this case google DNS.
|
|||||
|
|
Personally, I'd use OpenDNS and use their Cache Check function to force a refresh just to make sure the changes work but you can't guarantee they'll refresh for your users within 48 hours. DNS is a slow beast. Patience will keep you sane. |
|||||||
|
|
If you are using nscd:
It's worth mentioning that it might not be the OS that is caching it. Everyone likes to cache DNS... Some tests: Check to see if it's the new or old IP. Most browsers cache DNS as well, so if you haven't restarted Chromium or whatever you might not be seeing the latest.
Switch your local nameserver in the /etc/resolv.conf to another provider, google or level , examples:
And then ping again. Check to make sure your router isn't caching DNS in any form. (Varies by router/firmware/etc) Finally, patience. DNS can take a bit of time to propagate throughout the internet. |
|||||
|
|
I used the following command to flush the dns cache on my 12.10 ubuntu box and it worked fantastic.
Another helpful signal is the SIGUSR1 which dump a little statistic to syslog or as it is note from
|
||||
|
|

