记一次Squid代理出错的问题

代理搭好后,使用IP访问没问题,访问域名出错:

The requested URL could not be retrieved


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

The following error was encountered:

Unable to determine IP address from host name for www.qq.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 webmaster.


Generated Thu, 10 May 2018 09:08:49 GMT by win2003 (squid/2.7.STABLE8) 
 

登录到代理服务器,域名访问没问题。

那么问题就出在squid使用的dns上,文档中写:

# TAG: dns_nameservers
# Use this if you want to specify a list of DNS name servers
# (IP addresses) to use instead of those given in your
# /etc/resolv.conf file.
# On Windows platforms, if no value is specified here or in
# the /etc/resolv.conf file, the list of DNS name servers are
# taken from the Windows registry, both static and dynamic DHCP
# configurations are supported.
#
# Example: dns_nameservers 10.0.0.1 192.172.0.4
#
#Default:
# none

但是谁知道他喵的用的是什么DNS

于是搜了一下国内常用的dns解析服务器
dns_nameservers 114.114.114.114 223.5.5.5

加到squid.conf 中

over

posted @ 2018-05-10 18:59  Jarvan  阅读(3096)  评论(0编辑  收藏  举报