> 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. 「検知のみ」と「ブロッキングモード」を切り替えます

![デモアプリにおける、攻撃とTor通信をブロックするためのファイアウォール設定。](https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-52b00f4a64b0ece4e2931aaf977572b4da9afa0c%2FScreenshot%202025-08-13%20at%2017.29.23.png?alt=media)

{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
