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?
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?
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
:That's it :)
Just comment out the dhcp-related lines in your dnsmasq.conf file and then restart dnsmasq.
To disable DHCP, comment out all of the "dhcp-range" settings in the dnsmaq.conf file, and remove all "--dhcp-range" command line options used when starting the "dnsmasq" executable program/daemon.
Example filename: /etc/dnsmasq.conf
Example commented out line:
Source: dnsmasq doc
On Ubuntu [18.04]: comment out all
lines in both files:
and
Then just restart the service:
sudo systemctl restart dnsmasq