Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if it was possible to configure dnsmasq to send "server=" entries to multiple upstream servers?

so like this:


and have it pick which one based on it being available or not, as with resolv.conf? According to the man page, it looks like only one is allowed, but I wondered if there was a way to ask it to behave this way.

share|improve this question
up vote 3 down vote accepted

Well in your example you're only pointing out facebook, but I guess you would have the same need for every hostname you might visit

dnsmasq provides the option --all-servers


By default, when dnsmasq has more than one upstream server available, it will send queries to just one server. Setting this flag forces dnsmasq to send all queries to all available servers. The reply from the server which answers first will be returned to the original requestor.

Set a several DNS servers




And the fastest response will be considered

share|improve this answer

Sure just add multiple lines.


Man dnsmasq

   -S, --server=[/[<domain>]/[domain/]] ...
          ...  More than one -S  flag  is  allowed,  with
          repeated domain or ipaddr parts as required.
share|improve this answer
huh.... but is the behavior as per resolv.conf? – T. B. Apr 27 '13 at 2:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.