<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 28, 2024 at 11:40 AM Chris Green <<a href="mailto:cl@isbd.net">cl@isbd.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I did try stopping dnsmasq and then nothing was listening on port 53.<br>
However, just to prove it:-<br>
root@backup:~# ss -tulpn sport = 53<br>
<br>
    Netid State  Recv-Q Send-Q Local Address:Port  Peer Address:Port Process                            <br>
    udp   UNCONN 0      0            <a href="http://0.0.0.0:53" rel="noreferrer" target="_blank">0.0.0.0:53</a>         0.0.0.0:*     users:(("dnsmasq",pid=1826,fd=4)) <br>
    udp   UNCONN 0      0               [::]:53            [::]:*     users:(("dnsmasq",pid=1826,fd=6)) <br>
    tcp   LISTEN 0      32           <a href="http://0.0.0.0:53" rel="noreferrer" target="_blank">0.0.0.0:53</a>         0.0.0.0:*     users:(("dnsmasq",pid=1826,fd=5)) <br>
    tcp   LISTEN 0      32              [::]:53            [::]:*     users:(("dnsmasq",pid=1826,fd=7))<br></blockquote><div><br></div><div>That's the nature of how dnsmasq binds by default. You need two config lines to actually bind only to localhost: </div><div><br></div><div>listen-address=127.0.0.1</div><div>bind-interfaces</div><div><br></div><div>The listen-address config will make it only reply to queries to localhost, but doesn't prevent wildcard binding. bind-interfaces makes it bind explicitly to the listen-address. See the bind-interfaces section of the man page for details. </div><div><a href="https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html">https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html</a><br></div><div><br></div></div></div>