Port forwarding
Port forwarding
Limitations
|
|
Service
port_forwarding
AsusRouter >= 0.19.0 | < 0.23.0
Control mode-only service
This service is available only if the device control option of AsusRouter is set to true. Refer to the Operation mode section for more info on how to change this option.
Details:
Set / remove port forwarding rules.
Attributes
Priority
The first in this priority list is used, if many are provided for
remove_ipaction:ipsip
action
Type:
stringPossible values:
set- internet access is blockedremove- remove rules with selected parametersremove_ip- remove all the rules for this IP address(es). Only available via YAML
Details:
Action to be performed
ips
Type:
list[string]Details:
List of IP addresses to apply
remove_ipaction. This parameter is available only via YAMLExample:
ips: - 192.168.1.12 - 192.168.1.77
ip
Type:
stringDetails:
Local IP address
protocol
Type:
stringPossible values:
TCPUDPBOTH
Details:
Communication protocol. Can be both upper and lowercase
port
Type:
integerDetails:
Local port
ip_external
Type:
stringDetails:
Limit connection to the only external IP address
port_external
Type:
stringDetails:
External port(s) for connection. Can be single ports separated with comma
,, ranges using colon:, or their combinations
name
Type:
stringDetails:
Rule name to be used in the rules list
Switch
{device}_port_forwarding
AsusRouter >= 0.19.0
Default entity state:
EnabledDetails:
The current state of the port forwarding.
Attributes
list
Type:
list(dict())Details:
The list of all the port forwarding rules. Each list element is a dictionary with 6 pairs key-value:
name- name of the rule (optional)ip- state of the ruleport- port of the local device (optional)protocol- communication protocol (TCP,UDP,BOTH)ip_external- allow connection only from specific IP addressport_external- external port for connection