您的位置:首页 > 运维架构 > 反向代理

记一次Squid代理出错的问题

2020-02-16 20:28 323 查看

代理搭好后,使用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

转载于:https://www.cnblogs.com/xxx-xxx/p/9021203.html

  • 点赞
  • 收藏
  • 分享
  • 文章举报
a1751326 发布了0 篇原创文章 · 获赞 0 · 访问量 244 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: