# Cloudflare: プロキシ機能、サーバセキュリティ、Certbot DNS-01チャレンジ、WARP Client

**URL:** https://forum.ficusonline.com/t/topic/494
**Category:** Server
**Tags:** cloudflare, security, dns, certbot
**Created:** [2023 年 10 月 3 日午前 8:00 UTC](https://forum.ficusonline.com/t/topic/494 "2023-10-03T08:00:55Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2023 年 11 月 26 日午後 3:29 UTC](https://forum.ficusonline.com/t/topic/494/3 "2023-11-26T15:29:58Z")

</div>

## Web Application Firewall (WAF)

Cloudflareによるファイヤーウォール

> **[Cloudflare Web Application Firewall](https://developers.cloudflare.com/waf/)**
>
> The Cloudflare Web Application Firewall (WAF) provides automatic protection from vulnerabilities and the flexibility to create custom rules.

### Security → Security Rules

各種条件設定してアクセスのフィルタリング

> **[Work with custom rulesets in the dashboard](https://developers.cloudflare.com/waf/account/custom-rulesets/create-dashboard/)**
>
> Create and manage account-level custom rulesets in the dashboard.

### Security → Settings → Bot Fight Mode

Cloudflareの **「Bot Fight Mode (ボット戦闘モード)」** とは、機械学習を用いて、あなたのサーバーに到達しようとする「悪質なボット」を自動的に検出し、チャレンジ（パズル）を課したりブロックしたりする強力な無料機能です。

### Overview → Quick Actions

デフォルトでは無効のため、必要であればトグルスイッチで有効化。

> **[Under Attack mode](https://developers.cloudflare.com/fundamentals/reference/under-attack-mode/)**
>
> Turn on Cloudflare Under Attack mode to mitigate layer 7 DDoS attacks by challenging suspicious visitors with an interstitial page.

* * *

### 有効化を推奨

 ![Screenshot from 2026-08-28 15-16-06](https://forum.ficusonline.com/uploads/default/original/2X/8/823821e1767329f64510ee6e53224b0ca940b6bd.png)

**Add security headers**  
XSS対策などの基本的なセキュリティ関連レスポンスヘッダー(`X-Content-Type-Options`, `X-Frame-Options`, `Referrer-Policy` など)を自動付与します。ほぼデメリットがなく、通常のウェブサイトで有効にしておくべき設定です。

**Remove “X-Powered-By” headers**  
サーバー側の技術スタック情報(例: `X-Powered-By: PHP/8.2` など)を隠します。攻撃者に使用技術のヒントを与えないための基本的な対策で、有効化を推奨します。

#### 状況次第で検討

**Add leaked credentials checks header**  
ログインフォーム(WordPress管理画面、Directus管理画面など)がある場合、入力された認証情報が過去の漏洩データベースに含まれていないかチェックするヘッダーを付与できます。管理画面やユーザー認証機能があるサイトなら有効化を検討する価値があります。

**Add “True-Client-IP” header**  
`X-Forwarded-For` に加えて `True-Client-IP` という単一の値のヘッダーで実IPを渡す設定です。Nginxなど一部のアプリ/ミドルウェアでは `X-Forwarded-For` よりこちらの方が扱いやすい場合があります。今回のNginx構成では `X-Forwarded-For` を使っているのでどちらでも動きますが、念のため実IPを2系統確保したいなら有効化しても害はありません。

---

_[View the full topic](https://forum.ficusonline.com/t/topic/494)._
