router_add_port_forwarding
Create a NAT port forwarding rule on a TP-Link router to map an external WAN port or range to an internal LAN IP and port.
Instructions
Creates a new NAT virtual server port forwarding rule on the router.
Args: name: Service or descriptive name (e.g. 'web', 'ssh', 'minecraft'). external_port: Incoming WAN port or port range (e.g. '8080' or '8000-8010'). internal_ip: LAN destination IP address (e.g. '192.168.1.150'). internal_port: LAN destination port (defaults to external_port if omitted). protocol: Transport protocol ('TCP', 'UDP', or 'ALL'). confirm: Confirmation flag to add rule. force: Set to True to bypass Network Guard safety check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| force | No | ||
| confirm | No | ||
| protocol | No | ALL | |
| internal_ip | Yes | ||
| external_port | Yes | ||
| internal_port | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |