2
I'm running a local server with dnsmasq
and unbound
. The unbound
is listening on 127.0.0.1:5300
on the server network.local
. The dnsmasq
is listening to 0.0.0.0:53
and has a config line stating server=127.0.0.1#5300
.
If I, on the server, query unbound
directly, I will get the same answer everytime (with changed TTL's due to caching). This includes the Authority section:
# dig @127.0.0.1 -p 5300 tomshardware.com
; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> @127.0.0.1 -p 5300 tomshardware.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60324
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;tomshardware.com. IN A
;; ANSWER SECTION:
tomshardware.com. 60 IN A 52.25.172.230
tomshardware.com. 60 IN A 54.69.85.242
tomshardware.com. 60 IN A 54.187.95.69
;; AUTHORITY SECTION:
tomshardware.com. 172800 IN NS ns-1533.awsdns-63.org.
tomshardware.com. 172800 IN NS ns-1591.awsdns-06.co.uk.
tomshardware.com. 172800 IN NS ns-185.awsdns-23.com.
tomshardware.com. 172800 IN NS ns-840.awsdns-41.net.
;; Query time: 1 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1)
;; WHEN: Mon Apr 11 14:54:54 CEST 2016
;; MSG SIZE rcvd: 230
And this answer is the same no matter how many queries I make. Asking the dnsmasq
will give different first answers. In particular, it strips the authority section.
# dig @127.0.0.1 tomshardware.com
; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> @127.0.0.1 tomshardware.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30492
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;tomshardware.com. IN A
;; ANSWER SECTION:
tomshardware.com. 2074 IN A 54.69.85.242
tomshardware.com. 2074 IN A 52.25.172.230
tomshardware.com. 2074 IN A 54.187.95.69
;; AUTHORITY SECTION:
tomshardware.com. 125528 IN NS ns-1533.awsdns-63.org.
tomshardware.com. 125528 IN NS ns-1591.awsdns-06.co.uk.
tomshardware.com. 125528 IN NS ns-185.awsdns-23.com.
tomshardware.com. 125528 IN NS ns-840.awsdns-41.net.
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Apr 11 14:56:20 CEST 2016
;; MSG SIZE rcvd: 230
Note the present authority section above. Running the exact same query again gives a reduced answer.
# dig @127.0.0.1 tomshardware.com
; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> @127.0.0.1 tomshardware.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48837
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;tomshardware.com. IN A
;; ANSWER SECTION:
tomshardware.com. 2073 IN A 54.187.95.69
tomshardware.com. 2073 IN A 52.25.172.230
tomshardware.com. 2073 IN A 54.69.85.242
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Apr 11 14:56:21 CEST 2016
;; MSG SIZE rcvd: 93
Why is this?
It seems to be pr. client. So after running the above (and still not getting the full answer), I can still get the authority section on my desktop - just not the second time around.