This idiotic programme can NOT be prevented from listening on all ports short of editing the code and recompiling it. The "bind-interfaces" option is useless, it will prevent any access from other machines on the intranet. I want it to be accessible on the intrAnet, but not the internet. But it insists on listening on udp6, which is obviously global. The description babbles something about
It then discards requests that it shouldn't reply to...
The question is just what how it defines "should". What it definitely should NOT do is allow access over ipv6 to every single moron who thinks it funny to connect to my dnsmasq server to use it as his DNS resolver. This programme is a HUGE security hole.
Plus, dnsmasq is listening on tcp + tcp6. What, something has changed in the last 2 minutes? Because DNS was an udp protocol two minutes ago when my browser queried google DNS to access this very site. But hey, maybe they changed that and DNS is tcp now.
So, anyway, first download the source:
https://thekelleys.org.uk/gitweb/?p=dnsmasq.git
Then, in network.c , function "make_sock", right at the beginning:
if (family == AF_INET6 || type == SOCK_STREAM) return 1;
Look, it listens on udp only now, and DNS gets resolved all right! Phew! I was afraid they changed the way DNS was working, lol.
netstat -an | grep :53
udp 0 0 0.0.0.0:53 0.0.0.0:*
lsof -c dnsmasq | grep IPv
dnsmasq 473 root 4u IPv4 24618 0t0 UDP *:domain