REFERENCE

v6.11.0

Port Forward

Smart port-forward wizard: dst-nat + forward accept + hairpin NAT in one call, with preview-before-apply.

Tools

forward_port

Forward a Port (Smart Wizard) · Risk: dangerous

Exposes an internal service correctly and completely in one call: the DST-NAT rule that forwards external_port to internal_host:internal_port, the matching forward-chain accept (so it passes a default-drop firewall), and — when lan_subnet is given — the hairpin/loopback srcnat so the service also works when reached from inside the LAN via the public IP. DEFAULTS TO A DRY RUN (apply=false) showing every rule; set apply=true to create them. All rules are tagged 'port-forward:'. Returns the plan or a build report.

ParameterRequiredDefinition
protocolYes{"default":"tcp","type":"string","enum":["tcp","udp"]}
external_portYes{"type":"integer","minimum":1,"maximum":65535}
internal_hostYesLAN IP of the service, e.g. '192.168.1.10' {"type":"string"}
internal_portNoDefaults to external_port {"type":"integer","minimum":1,"maximum":65535}
wan_interfaceNoRestrict the forward to this WAN interface {"type":"string"}
lan_subnetNoLAN subnet for hairpin NAT, e.g. '192.168.1.0/24' {"type":"string"}
commentNo{"type":"string"}
applyYesfalse = preview (default); true = create {"default":false,"type":"boolean"}

On this page