LoginSignup
1
1

More than 1 year has passed since last update.

迷惑or怪しいVPNやProxy、魚拓系サービスを弾く防弾htaccessの定番

Last updated at Posted at 2022-10-05

著作権侵害や迷惑行為、炎上に使われるだけで、投稿者側には全くメリットがない魚拓系サービス。
そして、発信者情報を伏せたくなるような怪しい人にはそもそもアクセスしてもらいたくないという立場から、私の運営しているDMU労働労務相談所個人事務所のいずれにも、VPN、Proxy、そして魚拓系サービスを全てブロックする内容の.htaccessを導入しています。

そもそもいくつかのプラグインを使った上で、それでも漏れてしまうものを個別に弾いているのですが、内容が段々充実してきたので公開させていただきます。
ブロックしてメリットしかない先が揃っているので効果抜群だと思います。

みんなでインターネットを迷惑行為から守りましょう😂

.htaccess

# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule \.litespeed_conf\.dat - [F,L]

### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###

### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###

### marker DROPQS start ###
CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga
### marker DROPQS end ###

</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE

# BEGIN WordPress
# "BEGIN WordPress" から "END WordPress" までのディレクティブ (行) は
# 動的に生成され、WordPress フィルターによってのみ修正が可能です。
# これらのマーカー間にあるディレクティブへのいかなる変更も上書きされてしまいます。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


Header always append X-Frame-Options SAMEORIGIN
deny from 46.166.136.0/21
deny from 78.46.0.0/15
deny from 78.108.176.0/20
deny from 139.162.192.0/19
deny from 146.0.72.0/24
deny from 146.0.75.0/24
deny from 178.62.128.0/17
deny from 104.16.0.0/12
# archivebotblock
SetEnvIf User-Agent "archive.org_bot" denybot
SetEnvIf User-Agent "ia_archiver" denybot
<RequireAll>
Require all Granted
Require not env denybot
</RequireAll>

#任意のblock
deny from 119.245.30.
deny from 219.102.193.
deny from 124.6.8.
deny from 106.128.122.
deny from 183.180.78.
#your-server.de
deny from 95.216.

#proxysite.com
deny from 147.135.
deny from 217.182.
deny from 145.239.
deny from 188.165
deny from 5.135.
deny from 176.31.
deny from 178.33.
deny from 46.105.
deny from 51.91.
deny from 164.132.
deny from 141.94.
deny from 51.178.
#us
deny from 68.235.
deny from 167.114.
deny from 198.50.
deny from 54.39.
deny from 51.79.

#20220917 5ch
deny from 106.128.120.
deny from 106.128.121.
deny from 106.128.122.
deny from 106.128.123.
deny from 106.128.124.
deny from 106.128.125.
deny from 106.128.126.
deny from 60.73.41.
deny from 219.100.52.

#20220918 5ch
deny from 72.10.
deny from 122.100.31.
deny from 45.152.
deny from 146.70.
deny from 49.239.65.
deny from 217.138.
deny from 163.49.201.
deny from 133.159.149.
deny from 210.138.178.
deny from 133.159.152.

#suspisious
#4everproxy
deny from 94.97.
deny from 192.119.
deny from 5.181.
deny from 185.80.
deny from 107.189.
deny from 139.99.
deny from 87.98.
deny from 188.165.
deny from 137.74.
deny from 178.32.
deny from 198.98.
deny from 51.75.
deny from 5.39.
deny from 94.23.
deny from 144.217.
deny from 107.189.
deny from 5.45.
deny from 205.185.
deny from 139.99.
deny from 51.210.
deny from 193.70.

# BEGIN wccp_pro_image_protection
# END wccp_pro_image_protection

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1