-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHI_Block.sh
31 lines (31 loc) · 861 Bytes
/
CHI_Block.sh
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
#!/bin/bash
# (c)J~Net 2021
# jnet.sytes.net
#
# https://jnet.forumotion.com/t1761-country-blocking-by-ip
#
c="China"
echo "Blocking Country: $c"
echo ""
#sudo iptables -A INPUT -m iprange --src-range 2xx.3x.1xx.0/24 -j DROP
#sudo iptables -A INPUT -m iprange --src-range 1.0.1.0/24 -j DROP
sudo iptables -A INPUT -s 1.0.1.0/24 -j DROP
sudo iptables -A INPUT -s 1.0.1.0/8 -j DROP
sudo iptables -A INPUT -s 1.0.1.0/24 -j DROP
sudo iptables -A INPUT -s 1.0.8.0/8 -j DROP
sudo iptables -A INPUT -s 1.0.32.0/8 -j DROP
sudo iptables -A INPUT -s 1.0.32.0/24 -j DROP
sudo iptables -A INPUT -s 1.1.0.0/8 -j DROP
sudo iptables -A INPUT -s 1.1.0.0/24 -j DROP
echo "Blocking Complete!"
echo ""
bash menu.sh
## CHINA
#
# Begin IP Address End IP Address
# 1.0.1.0 1.0.3.255
# 1.0.8.0 1.0.15.255
# 1.0.32.0 1.0.63.255
# 1.1.0.0 1.1.0.255
#
#