[Pdns-users] local override question

Rory Toma rory at ooma.com
Thu Mar 22 21:44:38 UTC 2012


Sure, hadn't noticed that "reply" did not include list.
mysql info:

mysql> select * from records;
+----+-----------+------------+------+---------------------------+-------+------+-------------+
| id | domain_id | name       | type | content                   | ttl   
| prio | change_date |
+----+-----------+------------+------+---------------------------+-------+------+-------------+
|  1 |         1 | mgmt.ooma  | A    | 172.16.0.177              |   120 
| NULL |        NULL |
|  2 |         1 | ooma       | SOA  | localhost mail at ooma.com 1 | 86400 
| NULL |        NULL |
|  3 |         1 | mgmt       | A    | 172.16.0.177              |   120 
| NULL |        NULL |
|  4 |         1 | mgmt.ooma. | A    | 172.16.0.177              |   120 
| NULL |        NULL |
+----+-----------+------------+------+---------------------------+-------+------+-------------+
4 rows in set (0.00 sec)

mysql> select * from domains;
+----+------+--------+------------+--------+-----------------+---------+
| id | name | master | last_check | type   | notified_serial | account |
+----+------+--------+------------+--------+-----------------+---------+
|  1 | ooma | NULL   |       NULL | NATIVE |            NULL | NULL    |
+----+------+--------+------------+--------+-----------------+---------+
1 row in set (0.00 sec)


Here is my pdns.conf file: (for testing w/o recurse, I deleted the 
allow-recursion, allow-recursion-override, lazy-recursion, and recursor 
fields)

# Autogenerated configuration file template
#################################
# allow-axfr-ips        Allow zonetransfers only to these subnets
#
# allow-axfr-ips=0.0.0.0/0

#################################
# allow-recursion       List of subnets that are allowed to recurse
#
allow-recursion=0.0.0.0/0

#################################
# allow-recursion-override      Set this so that local data fully 
overrides the recursor
#
allow-recursion-override=yes

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

#################################
# chroot        If set, chroot to this directory for more security
#
# chroot=

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

#################################
# 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=no

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

#################################
# default-ttl   Seconds a result is valid if not set otherwise
#
# default-ttl=3600

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

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

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

#################################
# do-ipv6-additional-processing Do AAAA additional processing
#
# do-ipv6-additional-processing=no

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

#################################
# guardian      Run within a guardian process
#
# guardian=no

#################################
# 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 addresses to which we bind
#
local-address=172.16.0.56 172.16.10.102

#################################
# 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 DNS non-erroneous details
#
# log-dns-details=

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

#################################
# logfile       Logfile to use (Windows only)
#
# logfile=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/local/lib

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

#################################
# no-shuffle    Set this to prevent random shuffling of answers - for 
regression testing
#
# no-shuffle=off

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

#################################
# pipebackend-abi-version       Version of the pipe backend ABI
#
# pipebackend-abi-version=1

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

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

#################################
# 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

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

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

#################################
# send-root-referral    Send out old-fashioned root-referral instead of 
ServFail in case of no authority
#
# send-root-referral=no

#################################
# 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=

#################################
# 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-expire-default    Default SOA expire
#
# soa-expire-default=604800

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

#################################
# soa-refresh-default   Default SOA refresh
#
# soa-refresh-default=10800

#################################
# soa-retry-default     Default SOA retry
#
# soa-retry-default=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

#################################
# trusted-notification-proxy    IP address of incoming notification proxy
#
# trusted-notification-proxy=

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

#################################
# use-logfile   Use a log file (Windows only)
#
# use-logfile=no

#################################
# version-string        PowerDNS version in packets - full, anonymous, 
powerdns
or custom
#
# version-string=full

#################################
# webserver     Start a webserver for monitoring
#
# webserver=yes

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

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

#################################
# 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=

launch=gmysql

  gmysql-host=e164-proxy.pbeta.ooma.com
  gmysql-user=pdns
  gmysql-dbname=pdns
  gmysql-password=pdns_rocks123
  gmysql-basic-query=select content,ttl,prio,type,domain_id,name from 
ooma_records \
  where type='%s' and name='%s' and ((expires is NULL) or (expires > 
UNIX_TIMESTAMP()))
  gmysql-id-query=select content,ttl,prio,type,domain_id,name from 
ooma_records \
  where type='%s' and name='%s' and domain_id=%d and ((expires is NULL) 
or (expires > UNIX_TIMESTAMP()))
  gmysql-any-query=select content,ttl,prio,type,domain_id,name from 
ooma_records \
  where name='%s' and ((expires is NULL) or (expires > UNIX_TIMESTAMP()))
  gmysql-any-id-query=select content,ttl,prio,type,domain_id,name from 
ooma_records \
where name='%s' and domain_id=%d and ((expires is NULL) or (expires > 
UNIX_TIMESTAMP()))


On 3/22/12 2:39 PM, Peter van Dijk wrote:
> Can you post your pdns.conf and the two selects to the mailing list so we can continue there?
>
> On Mar 22, 2012, at 22:38 , Rory Toma wrote:
>
>> It generates:
>>
>> 2012-03-22 21:36:18 pdns2-beta Not authoritative for 'mgmt.ooma', sending servfa
>> il to 172.16.0.10 (recursion was desired)
>>
>>
>> In the past, when I've made domains auth in pdns, it ends up not recursing at all because it sends an authoritative fail, which is not what I want either.
>>
>> thx
>>
>> On 3/22/12 2:32 PM, Peter van Dijk wrote:
>>> Can you try disabling all recursor forwarding for a moment, and then asking your pdns_server for mgmt.ooma?
>>>
>>> On Mar 22, 2012, at 22:31 , Rory Toma wrote:
>>>
>>>> mysql>   select * from domains;
>>>> +----+------+--------+------------+--------+-----------------+---------+
>>>> | id | name | master | last_check | type   | notified_serial | account |
>>>> +----+------+--------+------------+--------+-----------------+---------+
>>>> |  1 | ooma | NULL   |       NULL | NATIVE |            NULL | NULL    |
>>>> +----+------+--------+------------+--------+-----------------+---------+
>>>> 1 row in set (0.00 sec)
>>>>
>>>>
>>>>
>>>>
>>>> thx
>>>> mysql>    select * from records;
>>>> +----+-----------+------------+------+---------------------------+-------+------+-------------+
>>>> | id | domain_id | name       | type | content                   | ttl   | prio | change_date |
>>>> +----+-----------+------------+------+---------------------------+-------+------+-------------+
>>>> |  1 |         1 | mgmt.ooma  | A    | 172.16.0.177              |   120 | NULL |        NULL |
>>>> |  2 |         1 | ooma       | SOA  | localhost mail at ooma.com 1 | 86400 | NULL |        NULL |
>>>> |  3 |         1 | mgmt       | A    | 172.16.0.177              |   120 | NULL |        NULL |
>>>> |  4 |         1 | mgmt.ooma. | A    | 172.16.0.177              |   120 | NULL |        NULL |
>>>> +----+-----------+------------+------+---------------------------+-------+------+-------------+
>>>> 4 rows in set (0.00 sec)
>>>>
>>>>> Kind regards,
>>> Kind regards,
> Kind regards,




More information about the Pdns-users mailing list