彻底封杀讯雷下载,做好网络管理

为了封掉公司的迅雷,试过了layer7过滤,早失效了,还是用土办法来得干脆——封IP。用 tcpdump 抓到了所有的迅雷服务器IP。

 

--------------bock_thunder.sh-------------------------

#!/bin/sh

# create new chains
/sbin/iptables -F THUNDER_FW 2>> /dev/null
/sbin/iptables -F THUNDER_IN 2> /dev/null
/sbin/iptables -N THUNDER_FW 2> /dev/null
/sbin/iptables -N THUNDER_IN 2> /dev/null

# anchor to main chains
/sbin/iptables -D INPUT -j THUNDER_IN 2>/dev/null
/sbin/iptables -I INPUT -j THUNDER_IN
/sbin/iptables -D FORWARD -j THUNDER_FW 2>/dev/null
/sbin/iptables -I FORWARD -j THUNDER_FW

echo "Building deny rules for Thunder..."
while read i; do
        /sbin/iptables -I THUNDER_FW -s $i -j DROP
        /sbin/iptables -I THUNDER_FW -d $i -j DROP
        /sbin/iptables -I THUNDER_IN -s $i -j DROP
        /sbin/iptables -I THUNDER_IN -d $i -j DROP
done < /root/script/thunder_ip.txt
echo "Building deny rules for Thunder...DONE."

下面是IP列表,保存为:/root/script/thunder_ip.txt

116.18.220.173
116.21.170.34
116.227.24.132
117.88.214.74
121.10.105.151
121.10.105.152
121.11.69.108
121.14.76.213
121.205.192.202
121.229.149.54
121.32.155.52
121.33.246.172
121.9.209.3
121.9.209.7
124.227.192.180
124.236.92.176
124.40.134.114
124.72.193.116
125.115.86.151
125.119.26.125
125.126.172.156
125.71.23.136
125.77.153.47
125.91.133.252
125.91.203.86
125.91.93.157
192.111.4.26
202.38.64.8
203.91.44.162
218.0.130.247
218.18.113.239
218.18.17.48
218.22.71.166
218.60.11.2
218.6.128.32
218.78.192.166
218.92.216.59
218.94.36.224
219.129.229.252
219.129.83.2
219.130.213.20
219.134.255.45
219.136.244.101
220.166.36.18
220.173.136.250
220.173.136.252
220.173.222.202
220.181.12.208
220.181.12.209
220.184.188.39
221.225.154.48
221.239.147.215
221.239.153.203
222.137.116.12
222.181.117.80
222.182.82.239
222.185.248.36
222.187.198.2
222.191.242.60
222.209.42.121
222.212.55.88
222.216.3.245
222.240.178.20
222.240.205.187
222.244.207.20
222.244.227.118
222.67.138.89
222.69.172.211
222.78.213.143
222.82.118.17
222.85.135.35
222.85.179.28
222.90.252.37
222.93.131.121
239.255.255.250
58.210.181.143
58.211.230.85
58.211.98.252
58.212.139.20
58.216.213.50
58.251.60.34
58.251.63.113
58.34.152.31
58.39.95.57
58.60.67.252
58.61.39.208
58.61.39.209
58.61.39.211
58.61.39.212
58.61.39.213
58.61.39.214
58.61.39.216
58.61.39.225
58.61.39.231
58.62.225.226
59.36.97.33
59.37.235.139
59.41.235.120
59.45.106.97
59.49.198.52
59.49.74.155
59.52.5.103
59.56.82.54
60.165.214.1
60.171.159.172
60.176.120.145
60.176.127.173
60.176.47.194
60.178.56.210
60.186.239.81
60.191.14.67
60.191.211.18
60.28.14.158
60.28.14.45
60.28.232.13
60.28.232.21
61.146.118.99
61.153.6.178
61.154.122.212
61.172.120.238
61.173.123.26
61.177.75.244
61.183.55.218
61.183.55.225
65.55.137.200
78.61.39.211
121.9.209.15

你可能感兴趣的:(职场,网络管理,休闲,限速,封杀讯雷)