> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/zen-firewall/zen-features/blocking-vs-detection-mode-in-zen-firewall.md).

# Zen Firewall のブロックモードと検出モード

AikidoのZen Firewallには、攻撃パターンを処理するための2つの動作モードがあります： **検出モード** および **ブロックモード**. これらのモードは、SQLインジェクション、シェルインジェクション、パストラバーサル、SSRFのようなアプリケーション層の攻撃にのみ適用されます。

次のようなその他のセキュリティ機能： [ユーザーブロック](/docs/docs-ja/zen-firewall/zen-features/blocking-users-with-zen-firewall.md), [ボット対策](/docs/docs-ja/zen-firewall/zen-features/blocking-bot-traffic-with-zen-firewall.md), [Torブロック](/docs/docs-ja/zen-firewall/zen-features/blocking-tor-traffic-with-zen-firewall.md) および [国別ブロック](/docs/docs-ja/zen-firewall/zen-features/blocking-traffic-by-country-with-zen-firewall.md) は、それぞれの設定で個別に管理されます。

## モードの理解 <a href="#understanding-the-modes" id="understanding-the-modes"></a>

### 検出モード（デフォルト） <a href="#detection-mode-default" id="detection-mode-default"></a>

* 📝 攻撃の可能性をブロックせずに記録します
* 🔬 トラフィックに影響を与えずに脅威を監視できます
* 📊 ブロックを有効にする前にセキュリティパターンを評価するのに役立ちます

### ブロックモード <a href="#blocking-mode" id="blocking-mode"></a>

* 🛡️ 検出された攻撃パターンを積極的にブロックします
* 🚫 悪意のあるリクエストが実行される前にブロックします
* ⚡ 脅威に対してリアルタイムで保護します

## 設定オプション <a href="#configuration-options" id="configuration-options"></a>

### 環境変数を使用する <a href="#using-environment-variables" id="using-environment-variables"></a>

```
# ブロックモードを有効にする 
AIKIDO_BLOCK="true" 

# 検出モードを有効にする（デフォルト） 
AIKIDO_BLOCK="false"
```

### ダッシュボードを使用する <a href="#using-the-dashboard" id="using-the-dashboard"></a>

1. アプリのファイアウォール設定に移動します
2. 「**攻撃をブロック**」セクション
3. 「検出のみ」と「ブロックモード」を切り替えます

![Demoアプリで攻撃とTorトラフィックをブロックするためのファイアウォール設定。](/files/c687327b1b1cd978577902812f0d81a234329352)

{% hint style="info" %}
注：環境変数は初期モードを設定しますが、読み込まれた後はダッシュボードの設定が優先されます。
{% endhint %}

## 何がブロックされるのか？ <a href="#what-gets-blocked" id="what-gets-blocked"></a>

ブロックモードが影響するのは、次の攻撃タイプのみです：

* SQLインジェクションの試行
* NoSQLインジェクションの試行
* シェルインジェクション攻撃
* パストラバーサル攻撃
* SSRFの試行


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/zen-firewall/zen-features/blocking-vs-detection-mode-in-zen-firewall.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
