Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 44

Thread: HOWTO: Persistant DNS Caching with pdnsd.

  1. #21
    Join Date
    Aug 2006
    Location
    stockholm, sweden
    Beans
    2
    Distro
    Ubuntu 6.06

    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.

  2. #22
    Join Date
    Apr 2006
    Beans
    147

    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
    Last edited by helpdeskdan; April 6th, 2008 at 06:14 PM. Reason: More info.

  3. #23
    Join Date
    Oct 2007
    Beans
    192

    Re: HOWTO: Persistant DNS Caching with pdnsd.

    Quote Originally Posted by helpdeskdan View Post
    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!

  4. #24
    Join Date
    Oct 2007
    Location
    On da screen lookin at ya
    Beans
    16

    Re: HOWTO: Persistant DNS Caching with pdnsd.

    Quote Originally Posted by Excalibre View Post
    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?

  5. #25
    Join Date
    Aug 2006
    Location
    SW France
    Beans
    90
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Persistant DNS Caching with pdnsd.

    Quote Originally Posted by Excalibre View Post
    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:
    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).

  6. #26
    Join Date
    Aug 2006
    Location
    SW France
    Beans
    90
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Persistant DNS Caching with pdnsd.

    Quote Originally Posted by aladinonl View Post
    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.

  7. #27
    Join Date
    Oct 2007
    Beans
    192

    Re: HOWTO: Persistant DNS Caching with pdnsd.

    Quote Originally Posted by bmt View Post
    From the original post:
    Yeah, I fixed it. I was just complaining because the package manager should have handled that automatically.

  8. #28
    Join Date
    Nov 2007
    Location
    SLC
    Beans
    200
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Persistant DNS Caching with pdnsd.

    Anyone compare the results of this to that of using BIND?

  9. #29
    Join Date
    Apr 2006
    Beans
    147

    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.
    Last edited by helpdeskdan; October 11th, 2008 at 12:28 AM. Reason: New Info

  10. #30
    Join Date
    Oct 2008
    Beans
    6

    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?

Page 3 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •