悪質な 163data.com.cn を拒否する(.htaccess,拒否リスト)

この記事は約12分で読めます。
スポンサーリンク

あるサイトに対する、無駄なアクセスが多いのは分かっている。

放置していたのだが、この機会に、少し追ってみる。

アクセスログを取っており、DB(MySQL)に格納しているので、

SELECT * FROM `log` WHERE `date` = ‘2014-05-XX’ ;

として、特定の1日分を抽出。

約7.2MB(非圧縮)のログをダウンロードし、解析開始。

■ PVが多杉

レコード数は、37,705件。

1PVが1レコードなので、PV=37,705となる。

コンテンツ的に、日に三万PVを出すようなサイトではないwww

■ トップページが大半

トップページへのPVは、37,705件中の35,426件。

つまり、PVの94%がトップページ。

だいたい、アクセスの大半がトップページというのは異常。

認証不要なサイトであり、どのページからも入れるので、普通は末端のページから検索エンジン経由で入ってくるはずだ。

■ 163data.com.cn

hostを見ていると、163data.com.cnが目立つので調べてみると、28,098件あった。

全体の75%wwwwwwwwww

さすがはSN。

IPアドレスを抽出し、重複を除去した上で、.htaccessのdenyにヴチ込む。

—–

order allow,deny
allow from all

deny from 110.84.194.102
deny from 110.85.105.250
deny from 110.85.106.249
deny from 110.85.107.127
deny from 110.85.107.145
deny from 110.85.113.210
deny from 110.85.113.82
deny from 110.85.125.52
deny from 110.85.69.241
deny from 110.85.69.53
deny from 110.85.70.227
deny from 110.85.71.252
deny from 110.85.71.28
deny from 110.85.74.168
deny from 110.86.164.90
deny from 110.86.167.96
deny from 110.86.185.88
deny from 110.86.186.125
deny from 110.86.187.227
deny from 110.87.40.69
deny from 110.89.10.147
deny from 110.89.11.128
deny from 110.89.11.236
deny from 110.89.12.104
deny from 110.89.12.161
deny from 110.89.12.196
deny from 110.89.34.120
deny from 110.89.34.149
deny from 110.89.34.193
deny from 110.89.34.196
deny from 110.89.34.83
deny from 110.89.35.14
deny from 110.89.35.27
deny from 110.89.36.234
deny from 110.89.36.237
deny from 110.89.37.133
deny from 110.89.49.193
deny from 110.89.60.187
deny from 110.89.61.127
deny from 110.89.61.157
deny from 110.89.61.48
deny from 110.89.61.98
deny from 110.89.62.146
deny from 110.89.8.203
deny from 110.89.8.34
deny from 110.89.8.39
deny from 117.25.48.110
deny from 117.26.116.232
deny from 117.26.117.36
deny from 117.26.118.25
deny from 117.26.192.143
deny from 117.26.193.0
deny from 117.26.193.29
deny from 117.26.200.134
deny from 117.26.202.70
deny from 117.26.222.54
deny from 117.26.41.8
deny from 117.26.77.177
deny from 117.26.77.215
deny from 117.26.79.23
deny from 117.26.85.110
deny from 117.26.86.52
deny from 117.27.64.129
deny from 117.29.217.178
deny from 117.29.44.223
deny from 120.32.36.224
deny from 120.32.37.248
deny from 120.33.245.6
deny from 120.37.206.182
deny from 120.37.206.241
deny from 120.37.206.39
deny from 120.37.206.42
deny from 120.37.206.55
deny from 120.37.207.130
deny from 120.37.207.166
deny from 120.37.207.179
deny from 120.37.207.81
deny from 120.37.208.193
deny from 120.37.208.4
deny from 120.37.209.63
deny from 120.37.210.121
deny from 120.37.228.171
deny from 120.37.229.59
deny from 120.37.230.85
deny from 120.37.231.109
deny from 120.37.231.217
deny from 120.37.232.115
deny from 120.37.232.160
deny from 120.37.232.93
deny from 120.37.233.133
deny from 120.37.233.168
deny from 120.37.233.192
deny from 120.37.233.227
deny from 120.37.236.41
deny from 120.37.237.217
deny from 120.37.238.125
deny from 120.37.241.142
deny from 120.37.241.195
deny from 120.37.241.196
deny from 120.37.242.4
deny from 120.37.243.36
deny from 120.43.10.176
deny from 120.43.11.102
deny from 120.43.21.143
deny from 120.43.27.204
deny from 120.43.4.159
deny from 120.43.4.213
deny from 120.43.5.179
deny from 120.43.6.138
deny from 120.43.8.182
deny from 120.43.9.250
deny from 120.43.9.92
deny from 121.204.38.108
deny from 121.204.38.133
deny from 121.204.39.244
deny from 121.204.39.84
deny from 121.205.196.75
deny from 121.205.198.8
deny from 121.205.199.127
deny from 121.205.212.26
deny from 121.205.213.134
deny from 121.205.213.46
deny from 121.205.214.248
deny from 121.205.238.254
deny from 121.205.240.80
deny from 121.205.243.95
deny from 121.205.247.146
deny from 121.205.247.199
deny from 121.205.249.99
deny from 218.86.50.104
deny from 218.86.50.139
deny from 218.86.50.15
deny from 218.86.50.254
deny from 222.77.202.226
deny from 222.77.204.2
deny from 222.77.205.189
deny from 222.77.205.229
deny from 222.77.207.119
deny from 222.77.212.125
deny from 222.77.212.160
deny from 222.77.212.161
deny from 222.77.213.105
deny from 222.77.213.164
deny from 222.77.213.85
deny from 222.77.215.191
deny from 222.77.225.143
deny from 222.77.225.159
deny from 222.77.225.207
deny from 222.77.226.215
deny from 222.77.227.254
deny from 222.77.229.111
deny from 222.77.229.25
deny from 222.79.5.53
deny from 27.150.196.221
deny from 27.150.198.48
deny from 27.150.198.68
deny from 27.150.199.127
deny from 27.150.199.210
deny from 27.150.221.102
deny from 27.150.221.58
deny from 27.150.223.19
deny from 27.150.229.90
deny from 27.150.230.156
deny from 27.150.231.71
deny from 27.150.240.165
deny from 27.150.240.169
deny from 27.150.240.248
deny from 27.150.240.86
deny from 27.150.241.151
deny from 27.150.241.174
deny from 27.150.242.114
deny from 27.151.108.213
deny from 27.151.111.25
deny from 27.153.160.80
deny from 27.153.161.115
deny from 27.153.163.19
deny from 27.153.184.95
deny from 27.153.186.127
deny from 27.153.186.201
deny from 27.153.187.194
deny from 27.153.203.46
deny from 27.153.204.12
deny from 27.153.204.171
deny from 27.153.205.123
deny from 27.153.205.131
deny from 27.153.207.205
deny from 27.153.207.66
deny from 27.153.208.62
deny from 27.153.208.89
deny from 27.153.209.102
deny from 27.153.209.161
deny from 27.153.211.24
deny from 27.153.211.4
deny from 27.153.216.85
deny from 27.153.217.148
deny from 27.153.218.11
deny from 27.153.218.163
deny from 27.153.218.47
deny from 27.153.219.6
deny from 27.153.232.8
deny from 27.153.233.36
deny from 27.153.233.45
deny from 27.153.235.171
deny from 27.153.236.202
deny from 27.153.248.143
deny from 27.153.249.58
deny from 27.153.250.174
deny from 27.153.251.74
deny from 27.156.56.161
deny from 27.156.57.20
deny from 27.156.58.199
deny from 27.156.58.25
deny from 27.156.60.139
deny from 27.156.60.168
deny from 27.156.63.122
deny from 27.159.217.182
deny from 27.159.217.182
deny from 27.159.219.185
deny from 27.159.220.28
deny from 27.159.221.52
deny from 27.159.223.194
deny from 27.159.225.6
deny from 27.159.226.146
deny from 27.159.226.30
deny from 27.159.228.240
deny from 27.159.228.89
deny from 27.159.230.221
deny from 27.159.231.94
deny from 27.159.233.71
deny from 27.159.235.83
deny from 27.159.236.25
deny from 27.159.238.195
deny from 27.159.238.47
deny from 27.159.239.44
deny from 59.58.113.135
deny from 59.58.136.96
deny from 59.58.159.113
deny from 59.58.159.115
deny from 59.58.159.19

—–

全てをallow(許可)し、その後、リストのIPをdenyする方法ね。

まぁ、リスト外のIPから来るとはじけないのは分かっているが…

関連:163data.com.cnからの謎のアクセス多数

サーバ構築の実際がわかる Apache[実践]運用/管理 (Software Design plus)
鶴長 鎮一
技術評論社
売り上げランキング: 74,922

タイトルとURLをコピーしました