|
|
我设置了squid 的代理!一切正常!
但设置了透明带就出问题了!
squid.conf设置如下:
http_accel_port 80
http_accel_winth_proxy on
http_accel_user_host_header on
http_accel_host virtual
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
第一次这样配置没有问题!透明代理成功!
接着我想在试一下!就把
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128 改为8080 了
结果什么也没提示!就不能上网了!
我用REBOOT了一下!! 结果又好了!!而且squid是停止的,还可以上网,但只要应用
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128这个规则就不能上网了!!
我想问: 1: 为什么我第一次配置透明代理是正常的,我再应用一次应用
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128这条规则就不能上网了?
2:为什么我不应用
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128这条规则,而且不启动squid就可以上网?
说明:启动squid,在客户端设置代理是正常的!!!
设置透明代理后的错误
ERROR
The requested URL could not be retrieved
--------------------------------------------------------------------------------
While trying to retrieve the URL: /forum/newthread.php?do=newthread&f=1
The following error was encountered:
Invalid URL
Some aspect of the requested URL is incorrect. Possible problems:
Missing or incorrect access protocol (should be `http://'' or similar)
Missing hostname
Illegal double-escape in the URL-Path
Illegal character in hostname; underscores are not allowed
Your cache administrator is root.
--------------------------------------------------------------------------------
Generated Thu, 19 Jan 2006 08:23:56 GMT by hongjuan.com (squid/2.5.STA
还有!透明代理设置成功了!
我用客户机上网!
再哪里可以看到日志啊?
在 /var/log/squid/access.conf中吗? |
|