bin bash Create special MLDONKEY chain iptables -t filter -N MLDONKEY

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Create special MLDONKEY chain
iptables -t filter -N MLDONKEY
iptables -t filter -F MLDONKEY
# Create the logdrop chain to log & drop a packet
iptables -t filter -N MLDONKEY_LOGDROP
iptables -t filter -F MLDONKEY_LOGDROP
iptables -t filter -A MLDONKEY_LOGDROP -j LOG --log-prefix "MLDONKEY"
iptables -t filter -A MLDONKEY_LOGDROP -j DROP
# Jump to the special MLD chain at the end of the INPUT chain (commented out)
#iptables -t nat -A INPUT -j MLDONKEY
# List of ip ranges to ban
0.0.0.0-10.7.255.255
10.9.0.0-62.182.255.255
62.183.76.0-62.183.91.255
62.183.100.0-83.238.255.255
83.239.112.0-83.239.223.255
83.239.240.0-85.171.255.255
85.172.80.0-85.172.95.255
85.172.112.0-85.172.255.255
85.173.32.0-85.174.127.255
85.176.0.0-255.255.255.255