Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 DNSMASQ had any other options in it's configuration files than localnet?

I would like to define a DNS Server to use in the DNSMASQ configuration file.

Rather like this:


I am not sure if this would work. I am using Ubuntu 10.04 LTS.

share|improve this question
up vote 0 down vote accepted

If you are also using dnsmasq as your DHCP server, you can configure dnsmasq to send a list of DNS servers to the clients. For example, this line in /etc/dnsmasq.conf sends the primary DNS as and Google's Public DNS servers as secondary and tertiary:


share|improve this answer
Thanks for that! That solved it right away. – shymega Apr 16 '12 at 20:48
Is it needed to have the 6, in the line? Thanks. – shymega Apr 17 '12 at 18:47
Yes, the 6 specifies a feature of the DHCP protocol to use. For example, 1 is to specify netmask, 3 is gateway, 6 is DNS servers, 42 is NTP server. Read the comments around the dhcp-option lines in the dnsmasq.conf for some more info on them. – dobey Apr 18 '12 at 0:24

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.