0

How to start Ubuntu dnsmasq DNS server with custom options? I simply started it as:

dnsmasq --log-async --log-queries

However, I can't access google drive any more:

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

I guess there are some Ubuntu default dnsmasq options should be provided as well, right? Then how? Thx.

1 Answer 1

0

Found the correct way,

$ 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .