我试图configuration我的dnsmasq转发请求到不同的DNS服务器取决于域。
服务器= / a.example.org / 192.168.aa
服务器= / b.example.org / BBBB
服务器= / c.example.org / 8.8.8.8
现在caching不适用于a和b。 我总是得到完整的TTL。
192.168.aa和bbbb是相同的DNS服务器。 bbbb是example.org的授权DNS服务器,因此8.8.8.8在那里转发请求。
当我看什么dnsmasq在做什么,我看到这个:
tcpdump -ni任何src端口53而不是dst 127.0.0.1
07:14:45.680354 IP 192.168.aa53> dnsmasq.36892:400 * – 1/0/1 A xxxx(70)
07:14:45.713410 IP bbbb53> dnsmasq.50966:8767 * – 1/0/1 A xxxx(70)
07:14:45.770882 IP 8.8.8.8.53> dnsmasq.35365:3482 1/0/1 A xxxx(70)07:14:55.850404 IP 192.168.aa53> dnsmasq.20329:11717 * – 1/0/1 A xxxx(70)
07:14:55.885077 IP bbbb53> dnsmasq.39750:21076 * – 1/0/1 A xxxx(70)07:15:05.965831 IP 192.168.aa53> dnsmasq.21312:34541 * – 1/0/1 A xxxx(70)
07:15:06.000209 IP bbbb53> dnsmasq.48898:28729 * – 1/0/1 A xxxx(70)
所以dnsmasq只caching谷歌第一次的请求。 我在这里错过了什么? 为什么dnsmasq不caching对a和b的请求?