由于SQUID Server安装程序,Internet速度变慢

最近我为我们的办公室安装了一个鱿鱼服务器。

我有电脑(A)

  • 两个以太网卡,一个用于互联网,另一个用于本地networking
  • 它有安装了squid-server和dhcp3-server的Ubuntu服务器操作系统
  • 我添加了几个iptable规则,像路由器一样工作,并将所有httpstream量redirect到3128端口

这个链接是我的参考。

一切正常工作2天。 突然之间,互联网速度急剧下降。 当我连接互联网电缆到我的笔记本电脑来testing互联网的速度,这很好。 当我重新连接到计算机时,一切都是正常的。 这一周发生了四次。 任何人都可以在这里请帮助我,为什么互联网速度正在下降,当我重新连接电缆,这是正常的。

编辑:
重新启动系统(电脑A)没有什么区别。 我已经改变了iptables,使得httpstream量不再redirect到3128端口,仍然没有改变互联网的速度。 我认为这个问题不是鱿鱼,而是其他的东西。 这是我的iptable规则

SQUID_SERVER="10.1.1.1" INTERNET="eth1" LAN_IN="eth0" SQUID_PORT="3128" PROXYSERVERS=(Atlanta Baltimore Boston Chicago Dallas Denver Houston KansasCity LosAngeles Miami NewYork Philadelphia Phoenix SanAntonio SanDiego SanJose Seattle Washington) SERVERLEN=${#PROXYSERVERS[*]} I=0 iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X modprobe ip_conntrack modprobe ip_conntrack_ftp echo 1 > /proc/sys/net/ipv4/ip_forward iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT iptables -A INPUT -i $INTERNET -m state --state ESTABLISHED,RELATED -j ACCEPT iptables --table nat --append POSTROUTING --out-interface $INTERNET -j MASQUERADE iptables --append FORWARD --in-interface $LAN_IN -j ACCEPT iptables -A INPUT -i $LAN_IN -j ACCEPT iptables -A OUTPUT -o $LAN_IN -j ACCEPT while [ $I -lt $SERVERLEN ]; do iptables -t nat -A PREROUTING -i $LAN_IN -p tcp -d ${PROXYSERVERS[$I]}.wonderproxy.com --dport 80 -j ACCEPT let I++ done iptables -t nat -A PREROUTING -i $LAN_IN -p tcp --dport 80 -j DNAT --to $SQUID_SERVER:$SQUID_PORT iptables -A INPUT --protocol tcp --dport 80 -j ACCEPT iptables -A INPUT --protocol tcp --dport 443 -j ACCEPT iptables -A INPUT --protocol tcp --dport 22 -j ACCEPT iptables -A INPUT -j LOG iptables -A INPUT -j DROP 

我也会寻找一个DNS问题,以防万一…

当速度下降时,您可以尝试刷新Squidcaching,以检查问题是否与caching对于您的盒子太大有关:

 squid -k shutdown mv /var/squid/cache /var/squid/cache.old squid -z squid rm /var/squid/cache.old 

(用你的Squidcaching目录replace/ var / squid / cache)

这应该清理您的caching,并允许您确保您的性能问题与该框无关,如果这不能解决问题。 否则,这意味着你可能需要更多的内存(Squid的性能直接取决于可用内存)。