NAPTR Catch-all

Doug doug at wd.co.za
Mon Jan 9 12:37:58 UTC 2012


Hi Everyone.

I've been trying to get a solution working where by I need to supply a
response based on a NAPTR query. The problem is, the domain section of
the NAPTR needs to be "dynamic", as this could be different per query. I
based my config on the following url, and all works well for A record
lookups, however NAPTR lookups fail:

http://doc.pfsense.org/index.php/Creating_a_DNS_Black_Hole_for_Captive_Portal_Clients

Below is my config:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@    IN    SOA    . root.localhost. (
                   201201051527     ; Serial
             604800        ; Refresh
              86400        ; Retry
            2419200        ; Expire
             604800 )    ; Negative Cache TTL
;
@    IN    NS    .
.    IN    A    99.99.99.5
*.    IN    A    99.99.99.5


7.7.7.5.2.1.4.4.9.9.8.1.2.    IN    NAPTR    100    10    "u"   
"E2U+sip"    "!(^.*$)!sip:2799820784000132" .    ; Testing


If i do the query for 7.7.7.5.2.1.4.4.9.9.8.1.2. - I get the correct
response, however, if I add onto the query as such:

7.7.7.5.2.1.4.4.9.9.8.1.2.microsoft.com

I get the following response:

; <<>> DiG 9.7.0-P1 <<>> 7.7.7.5.2.1.4.4.9.9.8.1.2.microsoft.com
@127.0.0.1 -t NAPTR
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21413
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;7.7.7.5.2.1.4.4.9.9.8.1.2.microsoft.com. IN NAPTR

;; AUTHORITY SECTION:
.            604800    IN    SOA    . root.localhost. 3632555911 604800
86400 2419200 604800

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Jan  9 14:36:50 2012
;; MSG SIZE  rcvd: 105


I checked a few items on the web, but could not find out if what I'm
doing was impossible.

Your valued input would be greatly appreciated.

Many thanks
Doug



More information about the bind-users mailing list