由 feng163 在 09-08-2004 16:38 发表:
在Slackware 10 下做SQUID代理服务的问题
如果在客户机浏览器设置代理服务器就可以上得到网,但如果做透明代理就不行,什么原因?但是客户机又通PING得通网址,真奇怪.按下面出错的提示应该是squid.conf的设置有问题吧,各位能否指点一二.
显示如下:
ERROR
The requested URL could not be retrieved
--------------------------------------------------------------------------------
While trying to retrieve the URL: /
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 webmaster.
--------------------------------------------------------------------------------
Generated Wed, 08 Sep 2004 08:12:34 GMT by SLW10.Supercool (squid/2.5.STABLE6)
我的squid.conf文件内容如下:
http_port 3128
cache_mem 64 MB
cache_dir ufs /var/squid/cache 2000 16 256
http_access allow all
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
下面是做NAT的设置:
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to 192.168.1.12
由 smile787 在 09-08-2004 18:05 发表:
错误贴详细些,好像修改过LOG?你说的设置代理服务器是指设置为SQUID吗?
由 feng163 在 09-08-2004 19:45 发表:
错误就是上面贴的,已经是一字不漏了
错误就是上面贴的,已经是一字不漏了。
设置代理服务器是指设置为SQUID
就是在浏览器里指定代理服务器就能上网。
透明代理就是不用在浏览器里做任何设置的,就上不了。
下面是做NAT的设置:
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to 192.168.1.12
由 smi