How to flush/clear dns cache?

Matthew Seaman matthew at
Wed Jun 15 16:35:23 UTC 2016

On 06/15/16 17:14, Bobb Shires wrote:
> What is the FreeBSD equivalent of the windows command ‘ipconfig /flushdns’?

It depends.

If you're running the local_unbound service[*], then you can achieve a
similar effect by:

  # service local_unbound restart

Otherwise: nothing. Unless you run some additional software specifically
for this purpose, FreeBSD doesn't keep a local cache of DNS lookups, so
there's nothing to do.

Unless you want to start chasing the operators of the recursive
resolvers you're using and ask them to flush their caches.  (Hint: the
answer will be 'no' unless you can show a good reason, like their caches
having been poisoned or old data affecting a service that a lot of
people use.)



[*] local_unbound is what is commonly used as it comes with the system
but there's a number of alternatives you could use from ports.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-questions mailing list