Iniciando o servidor DNS dnsmasq do Ubuntu com opções personalizadas

0

Como iniciar o servidor DNS dnsmasq do Ubuntu com opções personalizadas? Eu simplesmente comecei como:

dnsmasq --log-async --log-queries

No entanto, não consigo mais acessar o Google Drive:

This site can’t be reached
drive.google.com’s server DNS address could not be found.

$ dig drive.google.com

; <<>> DiG 9.10.3-P4-Ubuntu <<>> drive.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 44767
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;drive.google.com.              IN      A

;; Query time: 0 msec
;; SERVER: 192.168.2.102#53(192.168.2.102)
;; WHEN: Sat Sep 30 13:30:35 EDT 2017
;; MSG SIZE  rcvd: 34

Eu acho que existem algumas opções de dnsmasq padrão do Ubuntu também, certo? Então como? THX.

    
por xpt 30.09.2017 / 19:39

1 resposta

0

Encontrado o caminho correto,

$ printf 'log-queries\nlog-async\nmax-cache-ttl=10800\n' | sudo tee /etc/dnsmasq.d/dnsmasq.cache.conf
log-queries
log-async
max-cache-ttl=10800

$ sudo /etc/init.d/dnsmasq restart
[ ok ] Restarting dnsmasq (via systemctl): dnsmasq.service.

$ dig drive.google.com
;; QUESTION SECTION:
;drive.google.com.              IN      A

;; ANSWER SECTION:
drive.google.com.       299     IN      A       172.217.2.110

;; Query time: 37 msec
;; SERVER: 192.168.2.102#53(192.168.2.102)
;; WHEN: Thu Oct 05 22:26:45 EDT 2017
;; MSG SIZE  rcvd: 61
    
por 06.10.2017 / 04:28