|
|
Squid已经配置好了,通过设定浏览器的代理可以上网,没有问题。我现在这个帖子就是在设定代理服务器的情况下写的。
iptables的设置如下
- [root@GW ~]# iptables-save
- # Generated by iptables-save v1.2.11 on Fri Sep 23 05:55:21 2005
- *filter
- :INPUT ACCEPT [1682024:1154186586]
- :FORWARD ACCEPT [599618:414869505]
- :OUTPUT ACCEPT [1661188:1241663149]
- -A INPUT -i ppp0 -p tcp -m tcp --dport 1:1024 -j DROP
- -A INPUT -i ppp0 -p udp -m udp --dport 1:1024 -j DROP
- -A INPUT -i eth0 -p udp -m udp --dport 1:1024 -j DROP
- -A INPUT -i eth0 -p tcp -m tcp --dport 1:1024 -j DROP
- COMMIT
- # Completed on Fri Sep 23 05:55:21 2005
- # Generated by iptables-save v1.2.11 on Fri Sep 23 05:55:21 2005
- *nat
- :PREROUTING ACCEPT [4161:350794]
- :POSTROUTING ACCEPT [6415:384420]
- :OUTPUT ACCEPT [6415:384420]
- -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
- -A POSTROUTING -s 192.168.0.0/255.255.255.0 -j MASQUERADE
- COMMIT
- # 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]
怎么回事?? |
|