各位大虾请帮帮忙啊!!

由 raymond 在 04-18-2003 09:07 发表:

各位大虾请帮帮忙啊!!

eth0:192.168.26.8

eth1:连拨号ADSL

现在已经实现透明代理

脚本如下:

#!/bin/sh

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -F

iptables -A FORWARD -s 192.168.26.0/24 -j ACCEPT

iptables -A FORWARD -i eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3128

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERA

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus