# Firewall Configuration

You add and remove policies for your protocol by interacting with the [Firewall](/firewall/smart-contracts/firewall.sol.md) contract.

## Global Policies

Global Policies apply to all of your protocol's transactions, regardless of the method that was triggered.

1. To add a global policy, call the [addGlobalPolicy()](/firewall/smart-contracts/firewall.sol.md#addglobalpolicy) method.
2. To remove a global policy, call the [removeGlobalPolicy()](/firewall/smart-contracts/firewall.sol.md#removeglobalpolicy) method.

## Per-Method Policies

Per-Method Policies apply to specific method on your contract, based on the contract's name and the method's signature hash. These are useful in cases where you want to apply a policy on a select set of methods.

1. To add a per-method policy, call the [addPolicy()](/firewall/smart-contracts/firewall.sol.md#addpolicy) method.
2. To remove a per-method policy, call the [removePolicy()](/firewall/smart-contracts/firewall.sol.md#removepolicy) method.


---

# Agent Instructions: 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:

```
GET https://docs.ironblocks.com/firewall/configuration/firewall-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
