dnsmasq without dns functionality
Solution 1
Found it. Just add the following line to /etc/default/dnsmasq
:
DNSMASQ_EXCEPT=lo
That's it.
Solution 2
Start it with -p0
. You need to add this option to /etc/default/dnsmasq
:
DNSMASQ_OPTS="-p0"
Info about port is from dnsmasq(8) man page
-p, --port=<port>
Listen on <port> instead of the standard DNS port (53). Setting this to zero
completely disables DNS function, leaving only DHCP and/or TFTP.
Related videos on Youtube
Comments
-
Sebastian Krysmanski over 1 year
So, I'm trying to run
dnsmasq
as a PXE-only server. For this, I'm trying to disable dnsmasq's DNS functionality. I've put the following line in/etc/dnsmasq.conf
:port=0
However, when starting
dnsmasq
, it registers itself as DNS server in/etc/resolv.conf
.This is apparently done by
/etc/init.d/dnsmasq
. The file contains some code to disable this resolvconf behavior by havinglo
in$DNSMASQ_EXCEPT
. But I can't figure out how I am suppose to put it in there (without editing the file).I tried putting the following line in
/etc/dnsmasq.conf
:except-interface=lo
But this doesn't help. Any ideas on how to solve this problem?
Update: I'm running Ubuntu Server 16.04.1.
-
Gnimmelf over 5 yearsWhy would this work? Won't this just disable dnsmasq on the local interface, and still enable DNS on other interfaces?
-
Sebastian Krysmanski over 5 years@phihag This works because of
port=0
(as stated in the question)