-
Notifications
You must be signed in to change notification settings - Fork 2
port forwards
GitHub Action edited this page Jul 20, 2026
·
1 revision
The Port Forwards feature lets you add and remove port forwarding rules on your GL.iNet router. Forwarded ports route external traffic from the WAN to a specific internal host and port.
To enable this feature, check the Firewall option under Enabled Features in the integration configuration or options flow.
-
Option key:
firewall
Disabling this feature also removes the
Port forwardssensor and the related firewall rule entities.
| Entity | Description | API Source |
|---|---|---|
| Port forwards | Count of active port forwarding rules. | firewall/get_port_forwards |
The following services are registered under the glinet_router domain when the Firewall feature is enabled:
Adds a port forwarding rule.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Descriptive name. |
src |
string | Yes | Source zone (usually wan). |
src_dport |
string | Yes | External port. |
proto |
string | Yes | Protocol (tcp, udp, tcpudp). |
dest |
string | Yes | Destination zone (usually lan). |
dest_ip |
string | Yes | Internal IP address. |
dest_port |
string | Yes | Internal port. |
enabled |
boolean | No | Whether the rule is active. Defaults to true. |
mac |
string | No | Target a specific router by MAC address. |
Example:
action: glinet_router.add_port_forward
data:
name: Web server
src: wan
src_dport: "8443"
proto: tcp
dest: lan
dest_ip: 192.168.8.50
dest_port: "443"Removes a port forwarding rule. If remove_all is true, all port forwarding rules are removed and rule_id is ignored.
| Field | Type | Required | Description |
|---|---|---|---|
rule_id |
string | No | The ID of the rule to remove. |
remove_all |
boolean | No | If true, removes all port forwarding rules. |
mac |
string | No | Target a specific router by MAC address. |
- Firewall Rules — Add and remove custom firewall rules.
- DMZ — Toggle the DMZ feature.
- WAN Access — Toggle WAN ping, HTTPS, and SSH access.
- Firewall parent page