Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

    $server=/internet/8.8.8.8

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

share|improve this question

1 Answer 1

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 10.0.0.1 and Google's Public DNS servers as secondary and tertiary:

dhcp-option=6,10.0.0.1,8.8.8.8,8.8.4.4

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

 
discard

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.