LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 567|回复: 2

想用squid+iptables做透明** 出错 求助

[复制链接]
发表于 2009-4-29 14:19:59 | 显示全部楼层 |阅读模式
squid已启动

iptables将80端口重定向到3128
客户端上网时出现下面的错误

  1. ERROR
  2. The requested URL could not be retrieved

  3. --------------------------------------------------------------------------------

  4. The following error was encountered while trying to retrieve the URL: /

  5. Invalid URL

  6. Some aspect of the requested URL is incorrect.

  7. Some possible problems are:

  8. Missing or incorrect access protocol (should be http:// or similar)

  9. Missing hostname

  10. Illegal double-escape in the URL-Path

  11. Illegal character in hostname; underscores are not allowed.

  12. Your cache administrator is root.



  13. --------------------------------------------------------------------------------

复制代码

上面的测试是用http://ip 来访问的

这个错误提示是否表明端口定向已经起作用了
上不了网的原因是squid.conf的问题呢?
 楼主| 发表于 2009-4-29 16:28:59 | 显示全部楼层
在新版squid中
/etc/squid/squid.conf中

  1. httpd_accel_port 80
  2. httpd_accel_host virtual
  3. httpd_accel_with_proxy on
  4. httpd_accel_single_host off
  5. httpd_accel_uses_host_header on
复制代码

已废除

只需在/etc/squid/squid.conf中添加
http_port 3128 transparent
即可
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-29 16:31:31 | 显示全部楼层
添加了squid透明**之后
相比直接使用nat上网

在内网客户端
第一次打开某网页的时候 速度变的好慢
第二次打开相同网页的时候速度会快很多

不知道为啥第一次打开网页速度会变慢呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表