[Pdns-users] PowerDNS Recursor Question

Clint Martin clintm at laplink.com
Wed Jan 14 20:34:26 UTC 2004


Hello

I have setup and installed PowerDNS 2.9.13 with the recursor on FreeBSD
5.1 Using MySQL.  The server answers queries wonderfully. I REALLY like
it
However I'm seeing some behavior, which I'm not sure is caused by me
mis-configuring PDns or if I'm just not understanding what I'm being
told..

I have setup a domain: clint.nt  (recordset to follow)
querying this domain results with the data from the database, as I would
expect. however if I query for a host that is not in the domain,
The query is handed off to the recursor.  The end result is that the
query comes back with no records, but should it ever be handed off to 
the recursor in the first place?  The PDNS server is setup to be a
MASTER for the zone, so shouldn't queries for non-existent hosts just
return
NXDOMAIN directly?

Please let me know if you need more information

Clint Martin



Example outputs:
------------------------------------------------------------------------
-----


clintm at amnesiac:/home/clintm$dig clint.nt AXFR
; <<>> DiG 8.3 <<>> clint.nt AXFR
$ORIGIN clint.nt.
@                       1H IN SOA       ns02.laplink.com.
clintm.laplink.com. (
                                        1               ; serial
                                        3H              ; refresh
                                        1H              ; retry
                                        1W              ; expiry
                                        1H )            ; minimum

                        1H IN MX        10 mail
                        1H IN A         127.0.0.1
                        1H IN NS        ns02.laplink.com.
www                     1H IN A         127.0.0.1
@                       1H IN NS        ns02.laplink.com.
mail                    1H IN A         127.0.0.1
localhost               1H IN A         127.0.0.1
@                       1H IN SOA       ns02.laplink.com.
clintm.laplink.com. (
                                        1               ; serial
                                        3H              ; refresh
                                        1H              ; retry
                                        1W              ; expiry
                                        1H )            ; minimum

;; Received 3 answers (9 records).
;; FROM: amnesiac.laplink.com to SERVER: 127.0.0.1
;; WHEN: Wed Jan 14 12:18:21 2004

--- PDNS log
Jan 14 12:18:21 amnesiac pdns[95913]: AXFR of domain 'clint.nt'
initiated by 127.0.0.1
Jan 14 12:18:21 amnesiac pdns[95913]: Query: select
content,ttl,prio,type,domain_id,name from records where type='SOA' and
name='clint.nt'
Jan 14 12:18:21 amnesiac pdns[95913]: gmysql Connection succesful
Jan 14 12:18:21 amnesiac pdns[95913]: Query: select
content,ttl,prio,type,domain_id,name from records where type='SOA' and
name='clint.nt'
Jan 14 12:18:21 amnesiac pdns[95913]: Query: select
content,ttl,prio,type,domain_id,name from records where domain_id='10'
Jan 14 12:18:21 amnesiac pdns[95913]: AXFR of domain 'clint.nt' to
127.0.0.1 finished





----- This is the query for the non-existant host:
clintm at amnesiac:/home/clintm$dig badhost.clint.nt

; <<>> DiG 8.3 <<>> badhost.clint.nt
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUERY SECTION:
;;      badhost.clint.nt, type = A, class = IN

;; AUTHORITY SECTION:
.                       1D IN SOA       A.ROOT-SERVERS.NET.
NSTLD.VERISIGN-GRS.COM. (
                                        2004011400      ; serial
                                        30M             ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum


;; Total query time: 84 msec
;; FROM: amnesiac.laplink.com to SERVER: default -- 127.0.0.1
;; WHEN: Wed Jan 14 12:19:11 2004
;; MSG SIZE  sent: 34  rcvd: 109

-- PDNS Log
Jan 14 12:18:50 amnesiac pdns[95913]: Query: select
content,ttl,prio,type,domain_id,name from records where type='SOA' and
name='clint.nt'
Jan 14 12:19:11 amnesiac pdns[95913]: Query: select
content,ttl,prio,type,domain_id,name from records where
name='badhost.clint.nt'
Jan 14 12:19:11 amnesiac pdns[95913]: Query: select
content,ttl,prio,type,domain_id,name from records where
name='*.clint.nt'
Jan 14 12:19:11 amnesiac pdns[95913]: Query: select
content,ttl,prio,type,domain_id,name from records where name='*.nt'
Jan 14 12:19:11 amnesiac pdns_recursor[82653]: [3538] question for
'badhost.clint.nt|A' from 127.0.0.1
Jan 14 12:19:11 amnesiac pdns_recursor[82653]: [3538] answer to question
'badhost.clint.nt|A': 0 answers, 0 additional, took 1 packets, 0
throttled, rcode=3

------------------------------------------------------------------------
------------------------
MySQL Data

SELECT * FROM `domains` WHERE name='clint.nt'
+----+--------------+--------------+-----------------+---------------+--
------------------+-------------+
| id | name        | master    | last_check | type         |
notified_serial | account |
+----+--------------+--------------+-----------------+---------------+--
------------------+-------------+
| 10 | clint.nt     | [NULL]    |     [NULL]    | MASTER |
1     | [NULL]  |
+----+--------------+--------------+-----------------+--------------+---
------------------+-------------+

# [amnesiac] Query Window
# Connection: amnesiac
# Host: 172.16.126.47
# Saved: 2004-01-14 12:27:27
# 
# Query:
# SELECT *
# FROM `records`
# WHERE domain_id = 10
# 
'id','domain_id','name','type','content','ttl','prio','change_date'
'852','10','clint.nt','SOA','ns02.laplink.com clintm at laplink.com
1','3600','0','1074110422'
'853','10','clint.nt','NS','ns02.laplink.com','3600','0','1074110422'
'854','10','clint.nt','NS','ns02.laplink.com','3600','0','1074110422'
'855','10','www.clint.nt','A','127.0.0.1','3600','0','1074110422'
'856','10','clint.nt','A','127.0.0.1','3600','0','1074110422'
'857','10','mail.clint.nt','A','127.0.0.1','3600','0','1074110422'
'858','10','localhost.clint.nt','A','127.0.0.1','3600','0','1074110422'
'859','10','clint.nt','MX','mail.clint.nt','3600','10','1074110422'

-----------------------------------------------
pdns config file:

allow-axfr-ips=172.16.126.0/22,127.0.0.1/32
allow-recursion=172.16.126.0/22,127.0.0.1/32
chroot=./
config-dir=/usr/local/etc
daemon=yes
default-soa-name=a.misconfigured.powerdns.server
distributor-threads=3
fancy-records=no
guardian=yes
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=pdns
gmysql-dbname=dns
lazy-recursion=yes
local-port=53
log-dns-details=yes
log-failed-updates=yes
logfile=pdns.log
loglevel=9
master=yes
query-logging=yes
recursor=127.0.0.1:1053
setgid=bind
setuid=bind
slave=yes
slave-cycle-interval=60
webserver=yes
webserver-address=127.0.0.1
webserver-port=8081



--------------------------------------
Recursor config file:

#
# power DNS recursor config file

config-dir=/usr/local/etc/
daemon
local-address=127.0.0.1
local-port=1053



More information about the Pdns-users mailing list