我试图在红帽机器上build立一个鱿鱼代理服务器,基于一个正常的数据中心,通过这个代理发送我所有的stream量。
我已经configuration了鱿鱼,以允许每个请求(只是为了当然testing:)),这里是我的小configuration:
debug_options ALL,1 33,2 28,9 acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl CONNECT method CONNECT http_access allow all icp_access allow all http_port 3128 hierarchy_stoplist cgi-bin ? access_log /var/log/squid/access.log squid acl QUERY urlpath_regex cgi-bin \? cache deny QUERY refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 acl apache rep_header Server ^Apache broken_vary_encoding allow apache
问题是,当我进入服务器的IP和鱿鱼端口3128到Firefox,我得到一个超时…
正如你所看到的,我在debugging模式下运行squid,但是cache.log和access.log文件甚至都没有显示出任何请求。 我认为acl是问题,但如果是这样的话,应该有一个限制访问的条目,对吗?
我也尝试了squidclient,它像一个魅力。 所以我猜猜问题是,我无法连接到服务器出于某种原因…
经过一些额外的检查,很明显,你的iptables防火墙阻止来自主机的连接。 根据RedHat文档添加规则以允许SQUIDstream量: http : //docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html
规则本身应该是这样的:
-A INPUT -s <your.internal.network>/<netmask> -p tcp -m tcp --dport 3128 -j ACCEPT -A OUTPUT -d <your.internal.network>/<netmask> -p tcp -m tcp --sport 3128 -j ACCEPT
最后一条规则只有在输出stream量也被过滤时才需要(我没有RHEL框来检查默认设置)。 只能从您的内部networking设置访问对于安全来说也是非常重要的。 或者你可以configuration你的鱿鱼只听内部接口
http_port your.internal.ip.address:3128