QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 518|回复: 0

iptables+squid下联众的问题?

[复制链接]
发表于 2003-7-2 21:09:28 | 显示全部楼层 |阅读模式
系统为Redhat9 带的iptables+squid透明代理最多带100多台机,上网正常,就是在玩联众时,当客户机较少时基本正常,但是当客户机>30台时,联众就会出现掉线、服务器被复位等情况,5-10分钟一次,以前用ipchains时就没有这种情况,此外我试过用BBIagent也有这种情况,百思不得其解?
现贴上iptables规则,敬请各位大虾指点一下,到底问题出在那里??

eth0=192.168.0.1    接内网
eth1=192.168.1.*    接外网(dhcp)

#!/bin/sh
Disable ICMP Redirect Acceptance
for FILE in /proc/sys/net/ipv4/conf/*/accept_redirects; do
        echo 0 > $FILE
done
# Disable Source Routed Packets
for FILE in /proc/sys/net/ipv4/conf/*/accept_source_route; do
        echo 0 > $FILE
done
# Log Spoofed Packets, Source Routed Packets, Redirect Packets
for FILE in /proc/sys/net/ipv4/conf/*/log_martians; do
        echo 1 > $FILE
done
echo "1" >/proc/sys/net/ipv4/ip_forward
iptables -F
iptables -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# localhost and ethernet.
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -N block
# Let em through.
iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A block -i eth0 -j ACCEPT
iptables -A block -p 47 -i eth1 -j ACCEPT
iptables -A block -p 50 -i eth1 -j ACCEPT
iptables -A block -p tcp --source-port 67:68 --destination-port 67:68 -i eth1 -j ACCEPT
iptables -A block -p udp --source-port 67:68 --destination-port 67:68 -i eth1 -j ACCEPT
iptables -A block -p icmp -i eth1 -d 192.168.1.0/255.255.255.0 -j ACCEPT
iptables -A INPUT -j block
iptables -A INPUT -j LOG
iptables -A INPUT -j REJECT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -o eth1 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -i eth1 -j ACCEPT
iptables -A FORWARD -m state --state NEW -o eth1 -j ACCEPT
iptables -A FORWARD -j LOG
iptables -A FORWARD -j REJECT
iptables -t nat -F
iptables -t nat -X
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-16 08:50 , Processed in 0.036813 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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