dnsmasq encaminhamento condicional com base no domínio

2

O resultado desejado é que eu preciso do dnsmasq para encaminhar as consultas recebidas com base no nome do host que ele precisa resolver.

  • O DNS é a única função necessária. Não dhcp, tftp, etc.
  • 192.168.1.2 é a máquina que está servindo dnsmasq
  • 192.168.1.7 é a máquina que está consultando o dnsmask.
  • Não é relevante ou exigido que o servidor em 192.168.1.2 siga estas restrições.

    Por exemplo, em 192.168.1.7 eu digito:

    nslookup something.mydomain.local

Ele deve encaminhar para um servidor dns de 10.0.1.1
enquanto um pedido para apple.com deve encaminhar para 8.8.8.8

meu arquivo dnsmasq tem a seguinte aparência:

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

mas a saída do log mostra que ele não está fazendo o que eu gostaria:

 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

Pensamentos?

Agradecemos antecipadamente

    
por spezticle 04.03.2016 / 17:21

0 respostas

Tags