如何屏蔽禁止中国ip段

order allow,deny
# 禁止一个ip地址
deny from 123.125.125.147

# 屏蔽一个ip段
deny from 210.145.95.0/255

# 或者你需要在这ip段中允许部分ip
allow from 210.145.95.123

# 除此之外一切均可以访问
allow from all

这里有一份2008年中国IP段资料:

# This blocklist was last updated on Saturday, 17-May-2008 09:43:34 MDT
# 最新更新时间:2008-05-17
order deny,allow
# Chinese IP addresses follow:
# 中国ip地址
deny from 58.22.0.0/15 58.56.0.0/15 58.58.0.0/16 58.59.0.0/17 58.60.0.0/14 58.82.0.0/15 58.208.0.0/12 58.246.0.0/15 58.248.0.0/13 59.32.0.0/13 59.40.0.0/15 59.42.0.0/16 59.56.0.0/13 60.12.0.0/16 60.28.0.0/15 60.160.0.0/11 60.194.0.0/15 60.208.0.0/13 60.216.0.0/15 61.4.64.0/20 61.48.0.0/13 61.128.0.0/10 61.135.0.0/16 61.145.73.208/28 61.179.0.0/16 61.183.0.0/16 61.184.0.0/16 61.185.219.232/29 61.188.0.0/16 61.232.0.0/14 61.236.0.0/15 118.132.0.0/14 119.18.192.0/20 121.32.0.0/14 123.4.0.0/14 124.42.64.0/18 124.236.0.0/14 125.40.0.0/13 159.226.0.0/16 202.66.0.0/16 202.96.0.0/12 202.96.128.0/18 202.108.0.0/16 203.69.0.0/16 203.169.160.0/19 210.5.0.0/19 210.14.128.0/19 210.21.0.0/16 210.51.0.0/16 210.192.96.0/19 211.76.96.0/20 211.78.208.0/20 211.90.0.0/15 211.136.0.0/13 211.233.70.0/24 211.144.12.0/22 211.144.160.0/20 211.152.14.0/24 211.154.128.0/19 211.157.32.0/19 211.161.24.128/26 218.0.0.0/11 218.56.0.0/13 218.64.0.0/11 218.88.0.0/13 218.96.0.0/14 218.102.0.0/16 218.104.136.128/25 218.242.0.0/16 219.128.0.0/11 219.232.0.0/19 220.160.0.0/11 220.181.0.0/16 220.192.0.0/12 220.228.70.0/24 220.248.0.0/14 220.250.0.0/19 220.252.0.0/16 221.10.0.0/16 221.11.0.0/16 221.192.0.0/14 221.208.0.0/14 221.212.0.0/16 221.216.0.0/13 221.224.0.0/13 221.228.0.0/14 221.238.0.0/15 222.32.0.0/11 222.76.0.0/14 222.80.0.0/12 222.136.0.0/13 222.166.0.0/16 222.168.0.0/15 222.172.222.0/24 222.184.0.0/13

发表评论

电子邮件地址不会被公开。 必填项已用*标注