[Pdns-users] pdns recursor forward zone to consul

prochazka at cortex.cz prochazka at cortex.cz
Tue Aug 6 07:30:43 UTC 2024


Hi,

i set forward-zone for consul domain in the recursor, but queries fail.

Tested consul nodes are 192.168.200.205-207.
Tested patroni nodes (vith consul agent) are 192.168.200.201-202, 
current master is test-patroni-02.sub.domain.tld (.202)
Tested recursor node 192.168.200.55

Working query via dnsmasq (local) test-patroni-01 node:

dnsmasq: using nameserver 192.168.200.205#8600 for domain consul
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 192.168.200.205#8600 for domain consul
dnsmasq: using nameserver 192.168.200.55#53
dnsmasq: read /etc/hosts - 8 names
dnsmasq: query[A] master.testcluster.service.consul from ::1
dnsmasq: forwarded master.testcluster.service.consul to 
192.168.200.205#8600
dnsmasq: reply master.testcluster.service.consul is <CNAME>
dnsmasq: reply test-patroni-02.sub.domain.tld is 192.168.200.202

I'm getting the same result using dig against local/remote consul as via 
dnsmasq.

Pdns-recursor config snippet:
...
forward-zones+=...
forward-zones+=...
forward-zones+=...
forward-zones+=consul=192.168.200.205:8600;192.168.200.206:8600;192.168.200.207:8600 
#tryied with forward-zones-recure too

Failing query via pdns-recursor, client to pdns:
09:00:28.995582 IP 192.168.200.201.39364 > 192.168.200.55.domain: 62027+ 
[1au] A? master.testcluster.service.consul. (74)
09:00:30.980241 IP 192.168.200.55.domain > 192.168.200.201.39364: 62027 
ServFail 0/0/1 (62)

Failing query via pdns-recursor, pdns to consul:
09:00:28.996364 IP 192.168.200.55.50085 > 192.168.200.205.8600: 36627+% 
[1au] A? master.testcluster.service.consul. (62)
09:00:29.007576 IP 192.168.200.205.8600 > 192.168.200.55.50085: 36627* 
2/0/1 CNAME test-patroni-02.intr.cortex.cz., A 192.168.200.202 (122)
09:00:29.021812 IP 192.168.200.55.33770 > 192.168.200.206.8600: 35806+% 
[1au] DS? service.consul. (43)
09:00:29.023654 IP 192.168.200.206.8600 > 192.168.200.55.33770: 35806 
NXDomain* 0/1/1 (93)
09:00:29.037301 IP 192.168.200.55.34295 > 192.168.200.207.8600: 64101+% 
[1au] DS? testcluster.service.consul. (55)
09:00:29.042391 IP 192.168.200.207.8600 > 192.168.200.55.34295: 64101* 
2/0/1 CNAME test-patroni-01.sub.domain.tld., A 192.168.200.201 (115)
09:00:29.048536 IP 192.168.200.55.59932 > 192.168.200.206.8600: 58685+% 
[1au] DS? service.consul. (43)
09:00:29.049277 IP 192.168.200.206.8600 > 192.168.200.55.59932: 58685 
NXDomain* 0/1/1 (93)
09:00:29.083938 IP 192.168.200.55.17764 > 192.168.200.206.8600: 57798+% 
[1au] DS? testcluster.service.consul. (55)
09:00:29.087032 IP 192.168.200.206.8600 > 192.168.200.55.17764: 57798* 
2/0/1 CNAME test-patroni-02.sub.domain.tld., A 192.168.200.202 (115)
09:00:30.907453 IP 192.168.200.55.61916 > 192.168.200.206.8600: 27508+% 
[1au] DS? service.consul. (43)
09:00:30.908477 IP 192.168.200.206.8600 > 192.168.200.55.61916: 27508 
NXDomain* 0/1/1 (93)
09:00:30.944741 IP 192.168.200.55.44601 > 192.168.200.206.8600: 21673+% 
[1au] DS? testcluster.service.consul. (55)
09:00:30.947549 IP 192.168.200.206.8600 > 192.168.200.55.44601: 21673* 
2/0/1 CNAME test-patroni-02.sub.domain.tld., A 192.168.200.202 (115)
09:00:30.961804 IP 192.168.200.55.40184 > 192.168.200.206.8600: 22082+% 
[1au] DS? service.consul. (43)
09:00:30.963022 IP 192.168.200.206.8600 > 192.168.200.55.40184: 22082 
NXDomain* 0/1/1 (93)

Where is problem?

Thank you.



More information about the Pdns-users mailing list