lundi 16 février 2015

How do I really (dig) flush the DNS cache on OS X 10.9?


I'm on OS X 10.9, according to support.apple.com I can flush the cache with



sudo killall -HUP mDNSResponder


Unfortunately this does not really refresh my DNS cache at all, also not like this:



dscacheutil -flushcache; sudo killall -HUP mDNSResponder


E.g.



$ dig www.example.com|grep CNAME
www.example.com. 83955 IN CNAME example.com.


If cache were cleared it would be showing a number close to 86400, 3600, 300 or 60 are the TTL values offered by my domain name provider).


If I add @dns-host to dig it works as expected:



$ dig @ns0.transip.net www.example.com|grep CNAME
www.example.com. 60 IN CNAME GITHUBACCOUNT.github.io.


I also tried the other commands on that page. In the meantime I work around this by ssh'ing onto one of my servers and check things there. But I'd like a proper way to really refresh all DNS cache on my Mac. How can I do that?





Aucun commentaire:

Enregistrer un commentaire