opnsense_update_alias_entries
Add or remove IPs, networks, or hostnames from an OPNsense alias to immediately update firewall blocking. Per-entry results show partial failures when modifications can't be applied.
Instructions
Add or remove entries in an alias table.
Requires OPNSENSE_ALLOW_WRITE=true. Unlike rule edits, these changes take effect immediately: the entry is written into the running pf table without an apply step and without a savepoint to roll back to. That makes this the right tool for blocking an address quickly, and the wrong tool for anything you have not verified, because adding a network to an alias that a block rule references can cut off traffic you depend on.
Entries are applied one at a time; the result reports each outcome separately so a partial failure is visible rather than silent.
Args: params (UpdateAliasEntriesInput): Validated input containing: - name (str): Alias name - action (str): "add" or "delete" - entries (list[str]): 1-100 IPs, networks or hostnames - response_format (ResponseFormat): 'markdown' or 'json'
Returns: str: Per-entry outcome, or JSON with this schema: { "alias": str, "action": str, "results": [{"entry": str, "status": str, "detail": str}], "succeeded": int, "failed": int }
Error Handling: - Returns a write-disabled explanation when OPNSENSE_ALLOW_WRITE is not set - Reports per-entry failures without aborting the remaining entries
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |