使用concur和dnsmasq反向dns查找

使用concur和dnsmasq反向dns查找,dns,dnsmasq,consul,Dns,Dnsmasq,Consul,我已经设置了concur()和dnsmasq,这样我就可以拥有自己的内部dns解析。我已经使用dig测试了Consor支持反向dns查找: $ dig @127.0.0.1 -p 8600 +noall +answer -x 11.0.16.69 69.16.0.11.in-addr.arpa. 0 IN PTR ip-11-0-16-69.node.dc1.consul. 但是,通过dnsmasq进行反向dnslookups失败。如何配置dnsmasq以将反向查

我已经设置了concur()和dnsmasq,这样我就可以拥有自己的内部dns解析。我已经使用dig测试了Consor支持反向dns查找:

$ dig @127.0.0.1 -p 8600 +noall +answer -x  11.0.16.69
69.16.0.11.in-addr.arpa. 0      IN      PTR     ip-11-0-16-69.node.dc1.consul.
但是,通过dnsmasq进行反向dnslookups失败。如何配置dnsmasq以将反向查找条目转发给领事

我目前正在使用默认配置运行concur。每个节点都有一个领事代理,其启动方式如下:

consul agent -data-dir=/tmp/consul -bind <ip> -node <short hostname>
最后,我在
/etc/resolve.conf
中添加了一个条目,指向localhost,因此使用了dnsmasq:

search us-gov-west-1.compute.internal
nameserver 127.0.0.1
nameserver 11.0.0.2
我在AWS上,重要的是我仍然可以利用他们在他们的环境中提供的dns服务以及我自己的内部dns方案

添加行:

server=/16.0.11.in-addr.arpa/127.0.0.1#8600
/etc/dnsmasq.d/some_name

16.0.11代表cidr中的任何ip
11.0.16/24

因此,该范围内的IP将被转发到第二部分(在端口8600处运行的领事代理dns)

server=/16.0.11.in-addr.arpa/127.0.0.1#8600