|
最近 一直在为怎样禁用 QQ苦恼 ,请高手指点 ,谢谢
sbin/iptables -A FORWARD -p tcp -d tcpconn.tencent.com --dport 80 -j DROP
/sbin/iptables -A FORWARD -p tcp -d tcpconn.tencent.com --dport 443 -j DROP
#关闭QQ常用8000\8001\4000\4001端口
/sbin/iptables -A FORWARD -p udp --dport 8000 -j DROP
/sbin/iptables -A FORWARD -p udp --dport 8001 -j DROP
/sbin/iptables -A FORWARD -p udp --dport 4000 -j DROP
/sbin/iptables -A FORWARD -p udp --dport 4001 -j DROP
/sbin/iptables -A FORWARD -p tcp --dport 8000 -j DROP
/sbin/iptables -A FORWARD -p tcp --dport 8001 -j DROP
/sbin/iptables -A FORWARD -p tcp --dport 4000 -j DROP
/sbin/iptables -A FORWARD -p tcp --dport 4001 -j DROP
/sbin/iptables -A FORWARD -p udp --sport 4000 -j DROP
/sbin/iptables -A FORWARD -p udp --sport 4001 -j DROP
#UDP 8000端口类18个:速度最快,服务器最多。QQ上线会向这些服务器发送UDP数据包,选择回复速度最快的一个作为连接服务器。
/sbin/iptables -A FORWARD -p tcp -d sz.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz2.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz3.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz4.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz5.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz6.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz7.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz8.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d sz9.tencent.com -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.156 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.150 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.146 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.145 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.141.194.224 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.141.194.203 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.141.194.200 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.45.15 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.216 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.236 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.221 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.209 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.170.166 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.170.164 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.170.163 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.254 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.253 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.252 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.251 -j DROP
#TCP HTTP连接服务器5个,使用HTTP 80 和443端口连接,这4个服务器名字均以tcpconn开头,域后缀是tencent.com,域名与IP对应为
/sbin/iptables -A FORWARD -p tcp -d tcpconn.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d tcpconn2.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d tcpconn3.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d tcpconn4.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d tcpconn5.tencent.com -j DROP
/sbin/iptables -A FORWARD -p tcp -d tcpconn6.tencent.com -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.209.23 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.153 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.141.194.227 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.171 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.221 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.217.106 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.95 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.97 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.157 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.177 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.73 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.189 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.153 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.209.23 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.253 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.209.42 -j DROP
#QQ会员VIP登陆服务器,使用HTTP 443安全连接
/sbin/iptables -t nat -A PREROUTING -d 218.17.209.42 -j DROP
#在用防火墙阻止用户使用QQ上网时,除了阻止tcp和udp的8000、8001端口外,还需阻断与QQ服务器的连接。下面列举了在试验中找到的和在网上查到的QQ服务器IP:
/sbin/iptables -t nat -A PREROUTING -d 121.14.77.107 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 65.54.229.253 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.172.249.135 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.156 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.155 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.149 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.146 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.144.238.145 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.141.194.223 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.141.194.207 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 61.141.194.203 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.97 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.95 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.92 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.91 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.90 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.89 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.73 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.21 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.189 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.177 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.157 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.15 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.115 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.114 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 219.133.40.113 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.66.59.233 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.165 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.18.95.153 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.217.66 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.217.106 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.217.103 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.209.42 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 218.17.209.23 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 211.248.99.252 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 211.157.38.38 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 210.22.12.126 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.170.166 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.170.164 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.170.163 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.140.8 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.140.18 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.140.12 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.96.140.119 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.254 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.253 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.252 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.251 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.129.151 -j DROP
/sbin/iptables -t nat -A PREROUTING -d 202.104.128.233 -j DROP
网上 这个 贴,我试了没成功 ,在squid里 也试了 还是 不行 |
|