Squid 无法完成外部 DNS 查询

Squid 无法完成外部 DNS 查询

我已下载并配置了一个最小配置文件。我在 Windows 机器上运行 Squid 2.7。我已将客户端计算机的浏览器配置为使用我的代理服务器,但所有外部 DNS 查询均不起作用(即 www.google.com 不起作用,但本地名称可以正常工作)。这是我收到的错误页面:

The requested URL could not be retrieved

While trying to retrieve the URL: http://www.google.com/

The following error was encountered:

    Unable to determine IP address from host name for www.google.com 

The dnsserver returned:

Refused: The name server refuses to perform the specified operation. 

This means that:

The cache was not able to resolve the hostname presented in the URL. 
Check if the address is correct. 

Your cache administrator is ##################.
Generated Thu, 12 Jan 2012 22:34:15 GMT by ######## (squid/2.7.STABLE8)

我认为我的网络设置不寻常,如下所示:

                           router
                       ____/    \____
                      /              \
internet ---- my proxy server      client PC

我的设置与此有关吗?有什么建议可以解决这个问题吗?谢谢

答案1

在 Windows 机器上,如果 squid.conf 中没有指定 squid 使用特定的名称服务器,它应该通过查询注册表来使用系统名称服务器。在 cache.log 中搜索“添加名称服务器”时可以看到这一点。

如果由于某种原因这不起作用(有时它会错误地选择自己作为名称服务器 - 127.0.0.1),您可以在 squid.conf 中添加特定的名称服务器:

dns_nameservers 8.8.8.8 208.67.222.222

相关内容