做英文共享軟體的作者,為了防止軟體被破解,經常需要設定禁用中國地區的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
Nginx 禁止某個IP或者IP段訪問的方法
在 執行過程中,我們有的時候需要對某個ip或者ip段進行封禁,禁止ip訪問本伺服器,如果伺服器的環境用的是nginx,下面我們來看看nginx如何禁止某個ip訪問!首先在nginx的conf目錄下建立名為blocksip.conf配置檔案 然後用vim開啟blocksip.conf檔案,寫入以下規則...
nginx禁止限制某個IP位址或網段訪問伺服器
nginx配置訪問ip需要修改nginx.conf檔案,只需要在server中新增allow跟deny的ip即可,如下 upstream novel server error page 500502 503504 50x.html location 50x.html ps 上面的配置中allow必須...
Tomcat網域名稱或IP位址訪問方式配置方法
其中docbase中的內容就是你希望的開啟您的網域名稱 www.com 的時候對映到的目錄和預設的網頁 如 index.jsp 4 啟動tomcat伺服器,就可以直接敲入網域名稱訪問你要訪問的位址了。2 配置ip位址方式訪問 不需要專案名 最近遇到乙個朋友,他提出配置在tomcat下的專案不要用以往...