LinuxSir.cn,穿越时空的Linuxsir!

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

iptables+Squid做透明代理出现问题

[复制链接]
发表于 2005-9-23 06:03:23 | 显示全部楼层 |阅读模式
Squid已经配置好了,通过设定浏览器的代理可以上网,没有问题。我现在这个帖子就是在设定代理服务器的情况下写的。
iptables的设置如下
  1. [root@GW ~]# iptables-save
  2. # Generated by iptables-save v1.2.11 on Fri Sep 23 05:55:21 2005
  3. *filter
  4. :INPUT ACCEPT [1682024:1154186586]
  5. :FORWARD ACCEPT [599618:414869505]
  6. :OUTPUT ACCEPT [1661188:1241663149]
  7. -A INPUT -i ppp0 -p tcp -m tcp --dport 1:1024 -j DROP
  8. -A INPUT -i ppp0 -p udp -m udp --dport 1:1024 -j DROP
  9. -A INPUT -i eth0 -p udp -m udp --dport 1:1024 -j DROP
  10. -A INPUT -i eth0 -p tcp -m tcp --dport 1:1024 -j DROP
  11. COMMIT
  12. # Completed on Fri Sep 23 05:55:21 2005
  13. # Generated by iptables-save v1.2.11 on Fri Sep 23 05:55:21 2005
  14. *nat
  15. :PREROUTING ACCEPT [4161:350794]
  16. :POSTROUTING ACCEPT [6415:384420]
  17. :OUTPUT ACCEPT [6415:384420]
  18. -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
  19. -A POSTROUTING -s 192.168.0.0/255.255.255.0 -j MASQUERADE
  20. COMMIT
  21. # Completed on Fri Sep 23 05:55:21 2005
复制代码

也查看了一些关于透明代理的文章,没发现有什么区别啊?
但是访问时就会出现[PHP]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 root.

Generated Thu, 22 Sep 2005 21:55:33 GMT by GW.Star.org (squid/2.5.STABLE6)[/PHP]

怎么回事??
 楼主| 发表于 2005-9-23 06:18:08 | 显示全部楼层
注明:
我的我的网关服务器为RHEL AS4
Selinux已经关闭
不使用透明代理时,直接通过iptables的MASQUERADE上网没有问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-23 18:40:32 | 显示全部楼层
哪位帮忙看看哦
回复 支持 反对

使用道具 举报

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

本版积分规则

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