望ましい結果は、解決する必要があるホスト名に基づいて受信したクエリを渡すためにdnsmasqが必要であることです。
- DNSは必要な唯一の機能です。 dhcp、tftpなどはありません。
- 192.168.1.2 は dnsmasq サービスを提供するマシンです。
- 192.168.1.7 は dnsmask を照会するシステムです。
192.168.1.2 のサーバーがこれらの制限を遵守することは、関連性がなくても必要ありません。
たとえば、192.168.1.7に次のように入力します。
nslookup some.mydomain.local
10.0.1.1のDNSサーバーに転送する必要があり
、apple.comへの要求は8.8.8.8に転送する必要があります。
私のdnsmasqファイルは次のとおりです。
server=/mydomain.local/10.0.1.1
server=/mydomain.local/10.0.1.2
server=/mydomain.local/10.0.1.3
server=/mydomain.local/10.0.1.4
server=/mydomain.com/10.0.1.1
server=/mydomain.com/10.0.1.2
server=/mydomain.com/10.0.1.3
server=/mydomain.com/10.0.1.4
server=8.8.8.8
server=8.8.4.4
listen-address=0.0.0.0
bind-interfaces
しかし、ログ出力には、私が望む操作が行われていないとマークされています。
mypc dnsmasq: query[PTR] 2.1.168.192.in-addr.arpa from 192.168.1.7
mypc dnsmasq: cached 192.168.1.2 is mypc.mydomain.local
mypc dnsmasq: query[A] apple.com.mydomain.local from 192.168.1.7
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.1
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.2
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.4
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.3
mypc dnsmasq: reply apple.com.mydomain.local is NXDOMAIN-IPv4
mypc dnsmasq: query[AAAA] apple.com.mydomain.local from 192.168.1.7
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.1
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.2
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.4
mypc dnsmasq: forwarded apple.com.mydomain.local to 10.0.1.3
mypc dnsmasq: reply apple.com.mydomain.local is NXDOMAIN-IPv6
mypc dnsmasq: query[A] apple.com.mydomain.com from 192.168.1.7
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.1
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.2
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.4
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.3
mypc dnsmasq: reply apple.com.mydomain.com is NXDOMAIN-IPv4
mypc dnsmasq: query[AAAA] apple.com.mydomain.com from 192.168.1.7
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.1
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.2
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.4
mypc dnsmasq: forwarded apple.com.mydomain.com to 10.0.1.3
mypc dnsmasq: reply apple.com.mydomain.com is NXDOMAIN-IPv6
mypc dnsmasq: query[A] apple.com.dc1.mydomain.com from 192.168.1.7
mypc dnsmasq: forwarded apple.com.dc1.mydomain.com to 8.8.8.8
mypc dnsmasq: forwarded apple.com.dc1.mydomain.com to 8.8.4.4
mypc dnsmasq: forwarded apple.com.dc1.mydomain.com to 10.0.1.1
mypc dnsmasq: forwarded apple.com.dc1.mydomain.com to 10.0.1.2
mypc dnsmasq: forwarded apple.com.dc1.mydomain.com to 10.0.1.4
mypc dnsmasq: forwarded apple.com.dc1.mydomain.com to 10.0.1.3
mypc dnsmasq: reply apple.com.dc1.mydomain.com is NXDOMAIN-IPv4
mypc dnsmasq: query[AAAA] apple.com.dc1.mydomain.com from 192.168.1.7
mypc dnsmasq: forwarded apple.com.dc1.mydomain.com to 8.8.4.4
mypc dnsmasq: reply apple.com.dc1.mydomain.com is NXDOMAIN-IPv6
mypc dnsmasq: query[A] apple.com from 192.168.1.7
mypc dnsmasq: forwarded apple.com to 8.8.4.4
mypc dnsmasq: reply apple.com is 17.172.224.47
mypc dnsmasq: reply apple.com is 17.178.96.59
mypc dnsmasq: reply apple.com is 17.142.160.59
mypc dnsmasq: query[AAAA] apple.com from 192.168.1.7
mypc dnsmasq: forwarded apple.com to 8.8.4.4
mypc dnsmasq: reply apple.com is NODATA-IPv6
アイデア?
よろしくお願いします。