# pdnsd.conf error

## maverick6664

Hi,

I have a LAN of 4 computers.  One is the router and I want  to run pdnsd on this machine.   However, I have a difficulty in making pdnsd.conf.  I copied /etc/pdnsd/pdnsd.conf.sample and edit.  My pdnsd.conf is as follows:

```
global {

   perm_cache=1024;

   cache_dir="/var/cache/pdnsd";

#   pid_file = /var/run/pdnsd.pid;

   run_as="pdnsd";

   server_ip = 192.168.0.66;  # Use eth0 here if you want to allow other

            # machines on your network to query pdnsd.

   status_ctl = on;

#   paranoid=on;       # This option reduces the chance of cache poisoning

                      # but may make pdnsd less efficient, unfortunately.

   query_method=udp_tcp;

   min_ttl=15m;       # Retain cached entries at least 15 minutes.

   max_ttl=1w;        # One week.

   timeout=10;        # Global timeout option (10 seconds).

}

# The following section is most appropriate if you have a fixed connection to

# the Internet and an ISP which provides good DNS servers.

server {

   label= "myisp";

   ip = 218.176.253.65;  # Put your ISP's DNS-server address(es) here.

#   proxy_only=on;     # Do not query any name servers beside your ISP's.

                      # This may be necessary if you are behind some

                      # kind of firewall and cannot receive replies

                      # from outside name servers.

   timeout=4;         # Server timeout; this may be much shorter

            # that the global timeout option.

   uptest=if;         # Test if the network interface is active.

   interface=eth0;    # The name of the interface to check.

   interval=10m;      # Check every 10 minutes.

   purge_cache=off;   # Keep stale cache entries in case the ISP's

            # DNS servers go offline.

}

blah blah....(no change from pdnsd.conf.sample)

```

eth0 is connected to the Internet and eth1 to LAN.  This machine gets global IP address by dhcp (pump) and on the LAN side it has 192.168.0.66.  I'm sure the ip address of my isp.

However, when I try to run it, it says:

```
# dig www.yahoo.com

; <<>> DiG 9.4.3-P5 <<>> www.yahoo.com

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 18281

;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;www.yahoo.com.         IN   A

;; Query time: 8 msec

;; SERVER: 192.168.0.66#53(192.168.0.66)

;; WHEN: Mon Sep 13 04:00:54 2010

;; MSG SIZE  rcvd: 31

```

No answer section.

What's the matter?

Thanks in advance!

----------

## dmpogo

Try with uptest=none

----------

## maverick6664

Thank you for the suggestion, but in vain.....what's wrong?

----------

## dmpogo

Don't know,  your config is exactly as mine.   Interesting, you caught me at the moment when I was abandoning pdnsd in favour of regular named.

I thought pdnsd would be just right as a caching nameserver with would accelerate DNS enquiries with my ISP rather slow and sometimes flaky DNS servers.

But yesterday, my ISP DNS servers died for a while, and I noticed that it takes pdnsd 10 seconds to reply to each enquiry. It seems it uses the cache only

after external request timeouts (10 sec was exactly my timeout,  by changing I was varying how fast the answers were coming it).

So it seems pdnsd first tries providers DNS server, and only after it timeouts, it uses its cache.  In contrast named returns the answer immediately when it finds it in the cache, which is what I need.

----------

