opn_add_nat_rule
Create a temporary NAT port forwarding rule to redirect an external port to an internal host, with automatic rollback in 60 seconds unless changes are confirmed.
Instructions
Create a NAT port forwarding rule with savepoint protection.
Use this when you need to forward an external port to an internal host. Changes auto-revert in 60 seconds unless confirmed with opn_confirm_changes.
Parameters:
destination_port: external port to forward (e.g. '8080', '3000-3010') — required
target_ip: internal IP address to forward to (e.g. '192.168.1.100') — required
interface: source interface (default 'wan')
protocol: 'TCP', 'UDP', or 'TCP/UDP' (default 'TCP')
target_port: internal port (default: same as destination_port)
description: human-readable description
Returns: dict with 'revision' (str), 'uuid' (str), and 'result' (str).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| destination_port | No | ||
| target_ip | No | ||
| interface | No | wan | |
| protocol | No | TCP | |
| target_port | No | ||
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||