Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to use only dnsmasq to forward all dns requests to google's dns server and disable dhcp...

How can I achieve this result?

share|improve this question
add comment

2 Answers

Just comment out the dhcp-related lines in your dnsmasq.conf file and then restart dnsmasq.

share|improve this answer
add comment
up vote 2 down vote accepted

dnsmasq has dhcp server disabled by default. To enable it you have to uncomment dhcp-related lines in /etc/dnsmasq.conf

to forward all requests to 208.67.222.222 it's sufficient to add (without touching dnsmasq config) in /etc/resolv.conf:

nameserver 127.0.0.1 
# In order to configure dnsmasq to act as cache for the host on which  it
# is  running, put [as the first line] "nameserver  127.0.0.1" in /etc/resolv.conf to force
# local processes to send queries to dnsmasq. [...]
# dnsmasq is smart enough to ignore this line and forward all queries appropriately, 
# while all other applications will send all their queries to dnsmasq. 
nameserver 208.67.222.222

That's it :)

share|improve this answer
add comment

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.