做英文共享软件的作者,为了防止软件被破解,经常需要设置禁用中国地区的IP地址,但很多人不知道怎么进行设置。
如何在apache主机上设置禁用中国的IP地址访问,其实很简单,修改apache的.htaccess文件,在文件中加入下面的语句,即可阻止大部分中国用户的访问。当然,这份IP过滤表有些旧,某些新的IP会漏网,可以适当进行一些修改。
当然,英文网站大多不需要中文用户,如果想阻止中国的搜索引擎对其网站进行索引,也可以利用下面的语句。
deny from 61.52
deny from 61.53
deny from 61.54
deny from 61.131
deny from 61.132
deny from 61.133
deny from 61.134
deny from 61.135
deny from 61.136
deny from 61.137
deny from 61.138
deny from 61.139
deny from 61.140
deny from 61.141
deny from 61.142
deny from 61.143
deny from 61.144
deny from 61.145
deny from 61.146
deny from 61.147
deny from 61.148
deny from 61.149
deny from 61.150
deny from 61.151
deny from 61.152
deny from 61.153
deny from 61.154
deny from 61.155
deny from 61.156
deny from 61.157
deny from 61.158
deny from 61.159
deny from 61.160
deny from 61.161
deny from 61.172
deny from 61.173
deny from 61.174
deny from 61.175
deny from 61.176
deny from 202.4.252
deny from 202.4.253
deny from 202.4.254
deny from 202.4.255
deny from 202.97
deny from 202.98
deny from 202.99
deny from 202.100
deny from 202.101
deny from 202.102
deny from 202.103
deny from 202.104
deny from 202.105
deny from 202.106
deny from 202.107
deny from 202.108
deny from 202.109
deny from 202.110
deny from 202.111
deny from 202.112
deny from 202.113
deny from 202.114
deny from 202.115
deny from 202.130.224
deny from 202.130.225
deny from 202.130.226
deny from 202.130.227
deny from 202.130.228
deny from 202.130.229
deny from 202.130.245
deny from 211.81
deny from 211.82
deny from 211.90
deny from 211.91
deny from 211.102
deny from 211.149
deny from 211.150
deny from 211.151
deny from 211.152
deny from 211.153
deny from 211.154
deny from 211.155
deny from 211.156
deny from 211.157
deny from 211.158
deny from 211.159
deny from 211.160
deny from 211.161
deny from 211.162
deny from 211.163
deny from 218.5
deny from 218.21
deny from 218.28
deny from 218.29
deny from 218.71
deny from 218.72
deny from 218.73
deny from 218.74
deny from 218.75
deny from 218.76
deny from 218.77
deny from 218.78
deny from 218.79
deny from 218.80
deny from 218.81
deny from 218.82
deny from 218.83
deny from 218.84
deny from 218.242