Some people find it less than intuitive to do on DNSMasq and by default DNSMasq is available on 0.0.0.0 which could even be your LAN or Public IP.
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 2139/dnsmasq
The default that most will do is edit /etc/dnsmasq.conf and then set this
listen-address=127.0.0.1
But all that is needed is actuallly the "bind-interfaces" option and in fact if you don't have that option, it will still listen on 0.0.0.0 which may not be what you want.
Note that even interface= will not help, especially if you don't have the bind-interfaces option as we show below.
So just add this to /etc/dnsmasq.conf
bind-interfaces
Then restart dnsmasq and check:
ctive Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2230/dnsmasq
dnsmasq, ips, interfaces, localhostsome, intuitive, default, lan, ip, active, connections, servers, established, proto, recv, pid, tcp, listens, localhost, edit, etc, conf, actuallly, quot, bind, interface, restart, ctive,