Right now I've got the following line in dnsmasq.conf, which handles well all requests (/#/
matches any domain; this is required):
address=/#/127.0.0.1
Yet, there are some domains which require to be resolved to IP addresses other than 127.0.0.1
.
As temporary solution they have been added to /etc/hosts
:
209.85.148.95 ajax.googleapis.com
207.97.227.245 underscorejs.org
72.21.194.31 s3.amazonaws.com
Unfortunately this is a very temporary solution: it will stop working as soon the IP address of any target domain changes.
My question is: how to enforce dnsmasq to use an upstream dns server for resolving the IP addresses of some (specified) domain names?
Best Answer
You can do this by using the
server=
directive e.g.would query the google public DNS server for the ajax.googleapis.com domain, similarly
would query Level3's public DNS server for the amazonaws.com domain.
You can group multiple domains together
Would send the .co.uk and .com domains to the DNS server at 8.8.4.4
You can have multiple
server=
directives too