[Pdns-users] Getting started with pdns

Gerald Britton gerald.britton at gmail.com
Thu Jan 18 16:47:44 UTC 2007


Hi -- I'm just getting started with pdns on ubuntu edgy.  I installed
it using synaptic, which also starts the daemon.  I tried a bunch of
stuff, e.g. using firefox to visit several websites, then stopped
firefox, lauched it again and did the same thing again.  Finally, I
did this:

pkill -SIGUSR1 pdns

After doing so, the output of

tail /var/log/syslog

is:

Jan 18 11:42:25 localhost pdns_recursor[9264]: stats: 3 questions, 41
cache entries, 2 negative entries, 0% cache hits
Jan 18 11:42:25 localhost pdns_recursor[9264]: stats: throttle map: 0,
ns speeds: 0
Jan 18 11:42:25 localhost pdns_recursor[9264]: stats: outpacket/query
ratio 225%, 0% throttled, 0 no-delegation drops
Jan 18 11:42:25 localhost pdns_recursor[9264]: stats: 0 outgoing tcp
connections, 0 queries running, 0 outgoing timeouts

So I guess it is not really working, since there are no cache hits.

Naturally I want to get it to work, so I'm wondering:

1. Where is the cache stored? Can I vew it?

2. Why am I not getting any cache hits?

Here is the pdns.conf file:

# Autogenerated configuration file template
#################################
# allow-axfr-ips        If disabled, DO allow zonetransfers from these
IP addresses
#
# allow-axfr-ips=

#################################
# allow-recursion       List of netmasks that are allowed to recurse
#
allow-recursion=127.0.0.1

#################################
# allow-recursion-override   Local data even about hosts that don't exist will
#                            override the internet. (on/off)
#
# allow-recursion-override=

#################################
# cache-ttl     Seconds to store packets in the PacketCache
#
# cache-ttl=20

#################################
# chroot        If set, chroot to this directory for more security
#
# chroot=/var/spool/powerdns

#################################
# config-dir    Location of configuration directory (pdns.conf)
#
config-dir=/etc/powerdns

#################################
# config-name   Name of this virtual configuration - will rename the
binary image
#
# config-name=

#################################
# control-console       Debugging switch - don't use
#
# control-console=no

#################################
# daemon        Operate as a daemon
#
daemon=yes

#################################
# default-soa-name      name to insert in the SOA record if none set
in the backend
#
# default-soa-name=a.misconfigured.powerdns.server

#################################
# disable-axfr  Disable zonetransfers but do allow TCP queries
#
disable-axfr=yes

#################################
# disable-tcp   Do not listen to TCP queries
#
# disable-tcp=no

#################################
# distributor-threads   Default number of Distributor (backend) threads to start
#
# distributor-threads=3

#################################
# fancy-records Process URL and MBOXFW records
#
# fancy-records=no

#################################
# guardian      Run within a guardian process
#
guardian=yes

#################################
# launch        Which backends to launch and order to query them in
#
# launch=

#################################
# lazy-recursion        Only recurse if question cannot be answered locally
#
lazy-recursion=yes

#################################
# load-modules  Load this module - supply absolute or relative path
#
# load-modules=

#################################
# local-address Local IP address to which we bind
#
local-address=0.0.0.0

#################################
# local-ipv6    Local IP address to which we bind
#
# local-ipv6=

#################################
# local-port    The port on which we listen
#
local-port=53

#################################
# log-dns-details       If PDNS should log failed update requests
#
# log-dns-details=

#################################
# log-failed-updates    If PDNS should log failed update requests
#
# log-failed-updates=

#################################
# logfile       Logfile to use
#
# logfile=/var/log/pdns.log

#################################
# logging-facility      Log under a specific facility
#
# logging-facility=

#################################
# loglevel      Amount of logging. Higher is more. Do not set below 3
#
# loglevel=4

#################################
# master        Act as a master
#
# master=no

#################################
# max-queue-length      Maximum queuelength before considering situation lost
#
# max-queue-length=5000

#################################
# max-tcp-connections   Maximum number of TCP connections
#
# max-tcp-connections=10

#################################
# module-dir    Default directory for modules
#
module-dir=/usr/lib/powerdns

#################################
# negquery-cache-ttl    Seconds to store packets in the PacketCache
#
# negquery-cache-ttl=60

#################################
# only-soa      Make sure that no SOA serial is less than this number
#
# only-soa=org

#################################
# out-of-zone-additional-processing     Do out of zone additional processing
#
# out-of-zone-additional-processing=no

#################################
# query-cache-ttl       Seconds to store packets in the PacketCache
#
# query-cache-ttl=20

#################################
# query-logging Hint backends that queries should be logged
#
# query-logging=no

#################################
# queue-limit   Maximum number of milliseconds to queue a query
#
# queue-limit=1500

#################################
# query-local-address   The IP address to use as a source address for sending
#                       queries.
# query-local-address=

#################################
# receiver-threads      Number of receiver threads to launch
#
# receiver-threads=1

#################################
# recursive-cache-ttl   Seconds to store packets in the PacketCache
#
# recursive-cache-ttl=10

#################################
# recursor      If recursion is desired, IP address of a recursing nameserver
#
# recursor=

#################################
# setgid        If set, change group id to this gid for more security
#
setgid=pdns

#################################
# setuid        If set, change user id to this uid for more security
#
setuid=pdns

#################################
# skip-cname    Do not perform CNAME indirection for each query
#
# skip-cname=no

#################################
# slave Act as a slave
#
# slave=no

#################################
# slave-cycle-interval  Reschedule failed SOA serial checks once every
.. seconds
#
# slave-cycle-interval=60

#################################
# smtpredirector        Our smtpredir MX host
#
# smtpredirector=a.misconfigured.powerdns.smtp.server

#################################
# soa-minimum-ttl       Default SOA mininum ttl
#
# soa-minimum-ttl=3600

#################################
# soa-serial-offset     Make sure that no SOA serial is less than this number
#
# soa-serial-offset=0

#################################
# socket-dir    Where the controlsocket will live
#
socket-dir=/var/run

#################################
# strict-rfc-axfrs      Perform strictly rfc compliant axfrs (very slow)
#
# strict-rfc-axfrs=no

#################################
# urlredirector Where we send hosts to that need to be url redirected
#
# urlredirector=127.0.0.1

#################################
# use-logfile   Use a log file
#
# use-logfile=yes

#################################
# webserver     Start a webserver for monitoring
#
# webserver=no

#################################
# webserver-address     IP Address of webserver to listen on
#
# webserver-address=127.0.0.1

#################################
# webserver-password    Password required for accessing the webserver
#
# webserver-password=

#################################
# webserver-port        Port of webserver to listen on
#
# webserver-port=8081

#################################
# webserver-print-arguments     If the webserver should print arguments
#
# webserver-print-arguments=no

#################################
# wildcard-url  Process URL and MBOXFW records
#
# wildcard-url=no

#################################
# wildcards     Honor wildcards in the database
#
# wildcards=

#################################
# version-string   What should PowerDNS return for version
#                  allowed methods are anonymouse / powerdns / full / custom
version-string=powerdns

include=/etc/powerdns/pdns.d


Here is the recursor.conf file:

# Autogenerated configuration file template
#################################
# aaaa-additional-processing    turn on to do AAAA additional processing (slow)
#
# aaaa-additional-processing=off

#################################
# allow-from    If set, only allow these comma separated netmasks to recurse
#
# allow-from=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12,
::1/128, fe80::/10

#################################
# auth-can-lower-ttl    If we follow RFC 2181 to the letter, an
authoritative server can lower the TTL of NS records
#
# auth-can-lower-ttl=off

#################################
# auth-zones    Zones for which we have authoritative data, comma
separated domain=file pairs
#
# auth-zones=

#################################
# chroot        switch to chroot jail
#
# chroot=

#################################
# client-tcp-timeout    Timeout in seconds when talking to TCP clients
#
# client-tcp-timeout=2

#################################
# config-dir    Location of configuration directory (recursor.conf)
#
# config-dir=/etc/powerdns/

#################################
# daemon        Operate as a daemon
#
daemon=yes

#################################
# delegation-only       Which domains we only accept delegations from
#
delegation-only=com,net

#################################
# export-etc-hosts      If we should serve up contents from /etc/hosts
#
# export-etc-hosts=off

#################################
# fork  If set, fork the daemon for possible double performance
#
# fork=no

#################################
# forward-zones Zones for which we forward queries, comma separated
domain=ip pairs
#
# forward-zones=

#################################
# hint-file     If set, load root hints from this file
#
# hint-file=

#################################
# local-address IP addresses to listen on, separated by spaces or commas
#
local-address=127.0.0.1

#################################
# local-port    port to listen on
#
local-port=53

#################################
# log-common-errors     If we should log rather common errors
#
# log-common-errors=yes

#################################
# max-cache-entries     If set, maximum number of entries in the main cache
#
# max-cache-entries=0

#################################
# max-negative-ttl      maximum number of seconds to keep a negative
cached entry in memory
#
# max-negative-ttl=3600

#################################
# max-tcp-clients       Maximum number of simultaneous TCP clients
#
# max-tcp-clients=128

#################################
# max-tcp-per-client    If set, maximum number of TCP sessions per
client (IP address)
#
# max-tcp-per-client=0

#################################
# no-shuffle    Don't change
#
# no-shuffle=off

#################################
# query-local-address   Source IP address for sending queries
#
# query-local-address=0.0.0.0

#################################
# query-local-address6  Source IPv6 address for sending queries
#
# query-local-address6=

#################################
# quiet Suppress logging of questions and answers
#
quiet=yes

#################################
# remotes-ringbuffer-entries    maximum number of packets to store
statistics for
#
# remotes-ringbuffer-entries=0

#################################
# serve-rfc1918 If we should be authoritative for RFC 1918 private IP space
#
# serve-rfc1918=

#################################
# server-id     Returned when queried for 'server.id' TXT, defaults to hostname
#
# server-id=

#################################
# setgid        If set, change group id to this gid for more security
#
# setgid=

#################################
# setuid        If set, change user id to this uid for more security
#
# setuid=

#################################
# single-socket If set, only use a single socket for outgoing queries
#
# single-socket=off

#################################
# soa-minimum-ttl       Don't change
#
# soa-minimum-ttl=0

#################################
# soa-serial-offset     Don't change
#
# soa-serial-offset=0

#################################
# socket-dir    Where the controlsocket will live
#
# socket-dir=/var/run/

#################################
# spoof-nearmiss-max    If non-zero, assume spoofing after this many near misses
#
# spoof-nearmiss-max=20

#################################
# trace if we should output heaps of logging
#
# trace=off

#################################
# version-string        string reported on version.pdns or version.bind
#
# version-string=PowerDNS Recursor 3.1 $Id: pdns_recursor.cc 838
2006-05-19 14:35:27Z ahu


More information about the Pdns-users mailing list