Last edit
Added:
> * note that I use the servers from resolv.conf except for dbc.dk-names.
Deleted:
< You should obviously put in your own dns-servers from resolv.conf or whatever.
< * fix {{{/etc/default/pdnsd}}} by setting {{{START_DAEMON=yes}}}
< * start it: {{{/etc/init.d/pdnsd start}}}
< * test it: {{{dig @localhost ibm.com}}}, note the time and try again
< * fix {{{/etc/resolv.conf}}} so it only contains:
< {{{
< nameserver 127.0.0.1
< }}}
< And remember to disable software that would update {{{resolv.conf}}}.
I want a local dns cache for two reasons:
I found this nice article on pdnsd on debian: Speedup DNS requests with a local cache, the following is based on that and the pdnsd man-pages: pdnsd
and pdnsd.conf
.
apt-get install pdnsd
(I picked the manual setup)/etc/pdnsd.conf
:global { perm_cache = 1024; cache_dir = "/var/cache/pdnsd"; run_as = "pdnsd"; server_ip = 127.0.0.1; // Use eth0 here if you want to allow other // machines on your network to query pdnsd. status_ctl = on; paranoid = on; min_ttl = 60m; // Retain cached entries at least NN minutes. max_ttl = 1w; // One week. timeout = 10; // Global timeout option (10 seconds). } server { label = "resolvconf"; timeout = 5; // default is 120 seconds uptest = query; exclude = ".dbc.dk"; } server { label = "dbc"; include = ".dbc.dk"; timeout = 1; // default is 120 seconds ip=172.20.1.62; ip=172.16.1.16; ip=193.111.162.131; } source { owner = localhost; file = "/etc/hosts"; } rr { name = localhost; reverse = on; a = 127.0.0.1; owner = localhost; soa = localhost,root.localhost,42,86400,900,86400,86400; } rr { name = kelut; cname = kelut.dbc.dk; } // ... lots of cnames here...