:: Re: [DNG] how to clear DNS cache
Top Pagina
Delete this message
Reply to this message
Auteur: Rainer Weikusat
Datum:  
Aan: dng
Onderwerp: Re: [DNG] how to clear DNS cache
Hendrik Boom <hendrik@???> writes:
> On Wed, Jan 04, 2017 at 10:00:29PM +0000, Rainer Weikusat wrote:
>> I'm running a caching resolver locally because that "always works"
>> (unless blocked by the ISP which may become mandatory in the UK 'soon'
>> ...), even if an out-of-the-ordinary cache flush is called for because
>> of a 'recent' DNS information change.
>
> Which brings us around full circle to the original question -- how to
> do a cache flush!


For bind,

rndc flush

In case of a usual 'SOHO' setup, there will be a (presumably caching)
resolver running on 'the router' which provides its own address as name
server via DHCP. My setup is such that my 'work computer' gets a static
address assigned via DHCP with this address also being used as DHCP
nameserver address. The Debian default bind configuration can be used
as-is for running a caching, recursive resolver locally. Packages
desiring to mess with the resolver configuration usually use
resolvconf(8). This generates such a configuration and relies on
/etc/resolv.conf being a symlink to the generated file. Replacing the
symlink with a real file containing

nameserver 127.0.0.1
search [<domain to search> [ <other domain to search]+]

is sufficient to stop this from happening.

Flusing the resolver cache won't affect "misbehaving programs" (eg, web
browsers) doing their own, TTL-blind caching. These will usually need to
be restarted.

If you find the Not Suitable Caching Daemon (nscd) running on your
system, just deinstall it.