Score:0

BIND9 isolated master not supplying service (SRV) records as expected

ba flag

I have a problem getting SRV records to respond correctly from new BIND9 server. It seems to respond as expected for every test I can hit is with except adding the "additional section" that includes the internet address of the srv hosts.

Windows nslookup utility

Windows server that is working correctly.

> set type=srv
> _sip._udp.subdomain.example.com
Server:  servername.activedir.example.com
Address:  10.1.2.8

_sip._udp.subdomain.example.com       SRV service location:
          priority       = 0
          weight         = 0
          port           = 5060
          svr  srvname   =  srv1.example.com
_sip._udp.subdomain.example.com       SRV service location:
          priority       = 1
          weight         = 0
          port           = 5060
          svr  srvname   =  srv2.example.com
 srv1.example.com   internet address = 192.168.1.100
 srv2.example.com   internet address = 192.168.2.100

changed server to Bind9 that isn't working correctly

> server 10.1.2.17
Default Server:  [10.1.2.17]
Address:  10.1.2.17

> _sip._udp.subdomain.example.com
Server:  [10.1.2.17]
Address:  10.1.2.17

_sip._udp.subdomain.example.com       SRV service location:
          priority       = 0
          weight         = 0
          port           = 5060
          svr  srvname   = srv1.example.com
_sip._udp.subdomain.example.com       SRV service location:
          priority       = 1
          weight         = 0
          port           = 5060
          svr  srvname   = srv2.example.com

Dig utility for same lookups as nslookup above on Windows DNS server that is working correctly.

named$ dig @10.1.2.8 _sip._udp.subdomain.example.com SRV

; <<>> DiG 9.16.1-Ubuntu <<>> @10.1.2.8 _sip._udp.subdomain.example.com SRV
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38735
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;_sip._udp.subdomain.example.com.     IN      SRV

;; ANSWER SECTION:
_sip._udp.subdomain.example.com. 3600 IN      SRV     1 0 5060 srv2.example.com.
_sip._udp.subdomain.example.com. 3600 IN      SRV     0 0 5060 srv1.example.com.

;; ADDITIONAL SECTION:
srv2.example.com.          3600    IN      A       192.168.57.120
srv1.example.com.          3600    IN      A       192.168.58.100

;; Query time: 0 msec
;; SERVER: 10.1.2.8#53(10.1.2.8)
;; WHEN: Wed Mar 08 17:11:17 MST 2023
;; MSG SIZE  rcvd: 152

This is Ubuntu Bind9 Server that isn't working correctly.

named$ dig @10.1.2.17 _sip._udp.subdomain.example.com SRV

; <<>> DiG 9.16.1-Ubuntu <<>> @10.1.2.17 _sip._udp.subdomain.example.com SRV
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62383
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 8b63436638b439ca0100000064092431bd2f2b3cd32542b5 (good)
;; QUESTION SECTION:
;_sip._udp.subdomain.example.com.     IN      SRV

;; ANSWER SECTION:
_sip._udp.subdomain.example.com. 300  IN      SRV     1 0 5060 srv2.example.com.
_sip._udp.subdomain.example.com. 300  IN      SRV     0 0 5060 srv1.example.com.

;; Query time: 0 msec
;; SERVER: 10.1.2.17#53(10.1.2.17)
;; WHEN: Wed Mar 08 17:11:29 MST 2023
;; MSG SIZE  rcvd: 148

A simple dig for the hostname works immediately and both forward and reverse zones are loading.

; <<>> DiG 9.16.1-Ubuntu <<>> @10.1.2.17 srv1.example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22271
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: c68aa2c1d84416b8010000006409ffbaee89c08cb05f8de4 (good)
;; QUESTION SECTION:
;srv1.example.com.                 IN      A

;; ANSWER SECTION:
srv1.example.com.          300     IN      A       192.168.58.100

;; Query time: 0 msec
;; SERVER: 10.1.2.17#53(10.1.2.17)
;; WHEN: Thu Mar 09 08:48:10 MST 2023
;; MSG SIZE  rcvd: 86

Here are my bind files

cat named.conf
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.log";
// include "/etc/bind/named.conf.default-zones"

cat named.conf.local
//
        zone "subdomain.example.com" {
             type master;
             file "/etc/bind/zones/db.subdomain.example.com"; # zone file path
             allow-transfer {"none";};
};

        zone "example.com" {
             type master;
             file "/etc/bind/zones/db.example.com"; # zone file path
             allow-transfer {"none";};
};

zone "1.10.in-addr.arpa" {
        type primary;
        file "/etc/bind/zones/db.10.1";  # 10.1.2.0/24 subnet
};

zone "168.192.in-addr.arpa" {
        type primary;
        file "/etc/bind/zones/db.192.168";  # 192.168.57 and 192.168.58 subnets
};

cat named.conf.options

options {
        directory "/var/cache/bind";

        recursion no;                 # enables recursive queries
        // allow-recursion { any; };      # allows recursive queries from "trusted" clients
        listen-on { any; };
        allow-transfer { none; };      # disable zone transfers by default
        dnssec-validation no;
        allow-query { any; };
        allow-query-cache { none; };
        listen-on-v6 { none; };

        // If there is a firewall between you and nameservers you want  // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };

        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
};

cat db.subdomain.example.com
; BIND data file for local IPv4 interface 10.1.2.17
;
$TTL    300
$ORIGIN subdomain.example.com.
@       IN      SOA     fqdn-dns1.subdomain.example.com. postmaster.subdomain.example.com. (
                       23030802         ; Serial
                            300         ; Refresh
                            300         ; Retry
                            300         ; Expire
                            300 )       ; Negative Cache TTL
;
; name server RR for the domain
subdomain.example.com.       IN      NS      fqdn-dns1.subdomain.example.com.
; the server where everything will run
fqdn-dns1 IN  A   10.1.2.17
; server1            IN     AAAA   2001:DB8:1000:2000::19 //IPv6 disabled//
;
; Use different names for each service.
; Don't use CNAMEs, the SRV records (further down)
; can't point to CNAME records.
;
;  DNS SRV and NAPTR records for SIP
;
@ 300 IN NAPTR  0 0 "S" "SIP+D2U" "" _sip._udp.subdomain.example.com.
;
_sip._udp.subdomain.example.com. IN SRV    0 0 5060 srv1.example.com.
_sip._udp.subdomain.example.com. IN SRV    1 0 5060 srv2.example.com.

cat db.example.com
; BIND data file for local IPv4 interface 10.1.2.26
;
$TTL    300
$ORIGIN example.com.
@       IN      SOA     fqdn-dns1. admin.example.com. (
                       23030803         ; Serial
                            300         ; Refresh
                            300         ; Retry
                            300         ; Expire
                            300 )       ; Negative Cache TTL
;
; name server RR for the domain
@                    IN NS  fqdn-dns1.example.com.
; the server where everything will run
fqdn-dns1.example.com. IN A   10.1.2.17
srv1.example.com.       IN A   192.168.58.100
srv2.example.com.       IN A   192.168.57.120

cat db.10.1
;
; BIND reverse data file for local loopback interface
;
$TTL    300
@       IN      SOA     fqdn-dns1.example.com. root.example.com. (
                       23030804         ; Serial
                            300         ; Refresh
                            300         ; Retry
                            300         ; Expire
                            300 )       ; Negative Cache TTL
; NS record for DNS server IPv4
@       IN      NS      fqdn-dns1.example.com.
; PTR Record for reverse to NS
17.2    IN      PTR     fqdn-dns1.example.com.    ; 10.1.2.17
17.2    IN      PTR     fqdn-dns1.subdomain.example.com  ; 10.1.2.17

cat db.192.168
;
; BIND reverse data file for 192.168. subnet
;
$TTL    300
@       IN      SOA     fqdn-dns1.example.com. root.example.com. (
                              4         ; Serial
                            300         ; Refresh
                            300         ; Retry
                            300         ; Expire
                            300 )       ; Negative Cache TTL
;
; NS record for DNS server IPv4
        IN      NS      fqdn-dns1.example.com.
; PTR Record for reverse to Site Fabric Metaswitch subnets
120.57  IN      PTR     srv2.example.com.  ; 192.168.57.120
100.58  IN      PTR     srv1.example.com.  ; 192.168.58.100
nube101 avatar
ba flag
I think I solved by question. If I change the FQDN of the two SRV servers to the subdomain, I can include those A records in the db.subdomain.example.com file, this now resolves the IP addresses of the SRV record for the sip servers. For some reason even though stated in the db.subdomain.example.com that the SRV servers were in a different (root) domain, it wouldn't resolve from the other db file for the primary domain.??
Score:0
ba flag

DB file for one domain can't respond with data for another domain. Solved my own problem. I think I solved by question. If I change the FQDN of the two SRV servers to the subdomain, I can include those A records in the db.subdomain.example.com file, this now resolves the IP addresses of the SRV record for the sip servers. For some reason even though stated in the db.subdomain.example.com that the SRV servers were in a different (root) domain, it wouldn't resolve from the other db file for the primary domain.?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.