Re: HOWTO: Persistant DNS Caching with pdnsd.
Thanks for the HOWTO! :)
I initially had some problems with pdnsd seemingly failing about a minute after starting. If I did nslookup or dig on a hostname I noticed I always got a SERVFAIL from 127.0.0.1 and then the normal dns-server was used. I guess pdnsd lost connection to the OpenDNS servers. If anyone else notices the same thing then try this config instead, in pdnsd.conf. (it has the long default timeouts and uses empty queries instead of pings as uptest)
Code:
server {
label=OpenDNS;
ip=208.67.222.222;
ip=208.67.220.220;
# timeout=30;
# interval=30;
uptest=query;
# ping_timeout=50;
purge_cache=off;
}
Btw, interval=30 seems a bit low? The default is 900 seconds, so it means 30 times more (mostly useless) pings for the OpenDNS servers to handle.
Re: HOWTO: Persistant DNS Caching with pdnsd.
It seems as though hardy heron beta has better support for pdnsd. Install resolvconf at the same time you install pdnsd.
sudo apt-get install pdnsd resolvconf
When it prompts, tell it to get it's configuration from resolvconf. If you accidentally pick something else, do:
sudo dpkg-reconfigure pdnsd
That's all it takes - it will get the DNS servers from your ISP. You can still manually edit the file, just be sure to check the status with:
sudo pdnsd-ctl status
Re: HOWTO: Persistant DNS Caching with pdnsd.
Quote:
Originally Posted by
helpdeskdan
It seems as though hardy heron beta has better support for pdnsd. Install resolvconf at the same time you install pdnsd.
sudo apt-get install pdnsd resolvconf
When it prompts, tell it to get it's configuration from resolvconf. If you accidentally pick something else, do:
sudo dpkg-reconfigure pdnsd
That's all it takes - it will get the DNS servers from your ISP. You can still manually edit the file, just be sure to check the status with:
sudo pdnsd-ctl status
Right, but that doesn't actually work.
Does anyone know how to get this working, and test it to see if it's actually doing something? Because here's what happened to me: no difference, until I added that line in resolv.conf -- but once I add that, EVERYTHING returns "0 ms" when I do a dig, even domains that I haven't visited before. And obviously (since it's clearly not set up properly) it doesn't make my web browsing any faster.
Also, when I removed the packages it didn't automatically copy /etc/resolv.conf.dpkg-old back into place, so I couldn't resolve any domain names for a minute. Good job, Ubuntu!
Re: HOWTO: Persistant DNS Caching with pdnsd.
Quote:
Originally Posted by
Excalibre
Right, but that doesn't actually work.
Does anyone know how to get this working, and test it to see if it's actually doing something? Because here's what happened to me: no difference, until I added that line in resolv.conf -- but once I add that, EVERYTHING returns "0 ms" when I do a dig, even domains that I haven't visited before. And obviously (since it's clearly not set up properly) it doesn't make my web browsing any faster.
Also, when I removed the packages it didn't automatically copy /etc/resolv.conf.dpkg-old back into place, so I couldn't resolve any domain names for a minute. Good job, Ubuntu!
Hi, I got the same problem. Everything needs 0 ms to llokup even with ones I tried the first time. Ridiculous! I really want to use this tool. Can anyone offer help?
Re: HOWTO: Persistant DNS Caching with pdnsd.
Quote:
Originally Posted by
Excalibre
Also, when I removed the packages it didn't automatically copy /etc/resolv.conf.dpkg-old back into place, so I couldn't resolve any domain names for a minute. Good job, Ubuntu!
From the original post:
Quote:
Uninstallation:
...
Restore original backup file for /etc/dhcp3/dhclient.conf (or add the # to the beginning of the 'prepend' line).
Restore original backup file for /etc/resolv.conf (or remove the 'nameserver 127.0.0.1' line).
Re: HOWTO: Persistant DNS Caching with pdnsd.
Quote:
Originally Posted by
aladinonl
Can anyone offer help?
I'm afraid I'm still using Gutsy (where it still works fine, using the original instructions), but any Hardy users are welcome to step in here.
Re: HOWTO: Persistant DNS Caching with pdnsd.
Quote:
Originally Posted by
bmt
From the original post:
Yeah, I fixed it. I was just complaining because the package manager should have handled that automatically.
Re: HOWTO: Persistant DNS Caching with pdnsd.
Anyone compare the results of this to that of using BIND?
Re: HOWTO: Persistant DNS Caching with pdnsd.
Still working great for me. Post an nslookup of google and a sudo pdnsd-ctl status and I'll tell you what is wrong.
I just set it up on a computer with a static IP. Here are the steps I used to get it working with opendns:
sudo apt-get install pdnsd resolvconf
(select manual this time)
edit the /etc/pdnsd.conf
comment out line so (may already be commented out):
/*
server {
label="resolvconf";
}
*/
Add this right after:
server {
label=OpenDNS;
ip=208.67.222.222;
ip=208.67.220.220;
timeout=30;
interval=30;
uptest=ping;
ping_timeout=50;
purge_cache=off;
}
Do a:
sudo /etc/init.d/pdnsd restart
And it should work. Last time I tried my previous instructions, it worked - not sure why they don't work now. Perhaps I'll look into it later, I don't use DHCP right now because my cheap linksys is horrible. Note also that my /etc/resolv.conf is blank.
Re: HOWTO: Persistant DNS Caching with pdnsd.
to get this working on intrepid/8.10 using dhcp I did:
Code:
sudo apt-get install pdnsd resolvconf
choose the resolveconf option (I think, accidentally chose manual initially then went back into the dialog using dan's sudo dpkg-reconfigure pdnsd).
then put the dns servers in my dhcp setup:
Code:
sudo vi /etc/dhcp3/dhclient.conf
....
#prepend domain-name-servers 127.0.0.1;
prepend domain-name-servers 127.0.0.1, 208.67.222.222, 208.67.220.222, 208.67.220.220;
request subnet-mask,....
configure pdnsd commenting out resolvconf and adding the opendns entry (per the default commented-out sample and here):
Code:
sudo vi /etc/pdnsd.conf
....
/*
server {
label="resolvconf";
}
*/
server {
label=OpenDNS;
ip=208.67.222.222, 208.67.220.222, 208.67.220.220;
timeout=5;
uptest=query;
interval=30m; // test every half hr
ping_timeout=300; // 30 sec
purge_cache=off;
exclude = .localdomain;
policy = included;
preset = off;
}
reboot and it seems to work. is there anything I should've done differently?