View Single Post
  #4   (View Single Post)  
Old 5th February 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,132
Default

Small but essential correction. With the original zone file I posted this is the result of a query for the nameservers for the sub-domain:
Code:
$ dig +norecurse -t ns frankfurt.de.filo @192.168.222.20

; <<>> DiG 9.4.2-P2 <<>> +norecurse -t ns frankfurt.de.filo @192.168.222.20
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19990
;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;frankfurt.de.filo.             IN      NS

;; AUTHORITY SECTION:
frankfurt.de.filo.      86400   IN      NS      ns1.de.filo.de.filo.
frankfurt.de.filo.      86400   IN      NS      ns2.de.filo.de.filo.

;; Query time: 17 msec
;; SERVER: 192.168.222.20#53(192.168.222.20)
;; WHEN: Wed Feb  5 20:51:34 2014
;; MSG SIZE  rcvd: 79
Do you notice the double de.filo.de.filo.? I missed to add a '.' at the name of the sub-domain nameservers. After this modification and updating the serial number in the SOA record, it works better.
The corrected version:
Code:
; sub-domains

frankfurt       IN NS ns1.de.filo.
                IN NS ns2.de.filo.
freiburg        IN NS ns1.de.filo.
                IN NS ns2.de.filo.
Now the query works as intended:
Code:
$  dig +norecurse -t ns frankfurt.de.filo @192.168.222.20 

; <<>> DiG 9.4.2-P2 <<>> +norecurse -t ns frankfurt.de.filo @192.168.222.20
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63242
;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;frankfurt.de.filo.             IN      NS

;; AUTHORITY SECTION:
frankfurt.de.filo.      86400   IN      NS      ns1.de.filo.
frankfurt.de.filo.      86400   IN      NS      ns2.de.filo.

;; ADDITIONAL SECTION:
ns1.de.filo.            86400   IN      A       192.168.222.245
ns2.de.filo.            86400   IN      A       192.168.222.200

;; Query time: 1 msec
;; SERVER: 192.168.222.20#53(192.168.222.20)
;; WHEN: Wed Feb  5 20:56:56 2014
;; MSG SIZE  rcvd: 103
We all love BIND and its forgiving syntax, isn't ?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote