squid与DNS

Squid所在目录“/etc/squid” 。root用户直接squid start即可。当然默认连接是deny的。

核心配置文件是/etc/squid/squid.conf, 然该文件3K行,所以多用查找找到自己想修改的配置。

本次主要是DNS总是出错,解决方法 关于代理的DNS配置,注释如下:

Default:
# dns_defnames off#  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_nameservers 202.96.209.6 202.106.148.1 202.106.0.20 202.97.16.195,即代替了系统DNS配置。本质都一样。

如果想省事,直接配上http_access allow all

服务器启动,直接 squid start.

指定端口squid -a 8080,

关闭squid -k shutdown.

重新配置 squid -k reconfigure

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值