[squid-users] dns_nameservers with port?

Amos Jeffries squid3 at treenet.co.nz
Mon Feb 16 00:43:11 UTC 2026


On 16/02/2026 04:05, listy wrote:
> Hi guys.
> 
> Can _dns_nameservers_ take port number?

Unfortunately, no.


> with:
> _dns_nameservers 10.9.4.7:5350_
> Squid starts but when I try to use it, Squid logs:
> 
> ...
> WARNING: idnsSendQuery: Can't send query, no DNS nameservers known!
>      current master transaction: master56
> ...
> 
> What is (not)happening here?


The Squid dns_* directives exist to manually provide replacements for 
(some) /etc/resolv.conf settings. Per 
<https://www.man7.org/linux/man-pages/man5/resolv.conf.5.html>, the 
"nameserver" syntax only allows an IPv4, IPv6, or hostname - without port.


Cheers
Amos



More information about the squid-users mailing list