記一次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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM