add_nat_rule
Creates source, destination, or combined NAT policy rules in the candidate configuration, ready for commit. Use it to stage new NAT translations on PAN-OS firewalls.
Instructions
[MODIFIES CONFIG] Creates a new NAT policy rule (source NAT, destination NAT, or both). Staged in candidate config — requires 'commit' to activate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"from_zones": "<from_zones>",
"to_zones": "<to_zones>",
"source": "<source>",
"destination": "<destination>",
"service": "<service>"
},
"name": "add_nat_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | NAT rule name | |
| source | Yes | Source addresses or 'any' | |
| service | Yes | Service (e.g. 'any', 'service-http') | |
| disabled | No | Create rule in disabled state | |
| firewall | No | Target firewall name (from firewalls.json). Required when multiple firewalls are configured; optional otherwise. | |
| to_zones | Yes | Destination zones | |
| dnat_port | No | Destination NAT translated port | |
| snat_type | No | Source NAT type | |
| from_zones | Yes | Source zones | |
| description | No | Optional description | |
| destination | Yes | Destination addresses or 'any' | |
| dnat_address | No | Destination NAT translated address | |
| snat_address | No | Source NAT translated address (address object or IP) | |
| snat_interface | No | Source NAT interface (for dynamic-ip-and-port with interface) |