由 冷雪 在 08-09-2003 20:38 发表:
我想用SQUID做透明代理,出现这样的问题,请高手过来看看
RH 9
eth0:192.168.0.8
我用的是杭州网通,通过拨号出去的:
这是我的squid.conf 配置文件:
http_port 192.168.0.8:3128
cache_mem 32 MB
cache_swap_low 90
cache_swap_high 95
cache_mgr [email protected]
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl good src 192.168.0.1-192.168.0.50/24
acl all src 0.0.0.0/0
http_access allow good
http_access deny all
客户端在IE 里设置代理服务器:192.168.0.8:3128 可以访问internet,QQ,MSN同样设置,也可以上,现在就是想不用这样设,实现透明代理。
运行: iptables -A PREROUTING -t nat -i eth0 -p tcp --dpor 80 -j REDIRECT --to-port 3128
出现这样提示:iptables: No chain/target/match by that name
这是什么问题,我该怎么做?
还有就是,我在/etc/rc.d/rc.local加入下面几行想实现透明代理,结果没办法实现:
echo 1 > /proc/sys/net/ipv4/ip_forword
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE
我这样设置有什么问题吗?
由 mmm 在 08-09-2003 22:35 发表:
加载iptable模块
modprobe ip_tables
modprobe i