{ "client_requirement": "client_is_viewer+", "items": [ { "type": "header_page_title", "items": [ { "type": "h1", "text": "Port Forwarding" }, { "type": "p", "text": "DNAT rules that forward inbound WAN traffic to internal hosts." } ] }, { "type": "table", "datasource": "config:port_forwarding", "empty_message": "No port forwarding rules configured.", "columns": [ { "label": "Description", "field": "description" }, { "label": "Protocol", "field": "protocol", "class": "col-mono" }, { "label": "Ext Port", "field": "dest_port", "class": "col-mono" }, { "label": "NAT IP", "field": "nat_ip", "class": "col-mono" }, { "label": "NAT Port", "field": "nat_port", "class": "col-mono" }, { "label": "Rule State", "field": "enabled", "render": "badge_enabled_disabled" } ], "row_actions": [ { "client_requirement": "client_is_administrator+", "method": "js_edit", "target": "add-form", "text": "Edit", "class": "btn-ghost btn-sm" }, { "client_requirement": "client_is_administrator+", "action": "/action/portforwarding/rules_delete", "method": "post", "text": "Delete", "class": "btn-danger btn-sm" } ] }, { "type": "card", "id": "add-form", "label": "Add Rule", "client_requirement": "client_is_administrator+", "items": [ { "type": "form", "action": "/action/portforwarding/addrule_add", "method": "post", "items": [ { "type": "hidden", "name": "row_index", "value": "" }, { "type": "field", "label": "Description", "name": "description", "input_type": "text", "placeholder": "e.g. Minecraft server" }, { "type": "field", "label": "Protocol", "name": "protocol", "input_type": "select", "options": "%PROTOCOL_OPTIONS%" }, { "type": "field", "label": "Ext Port", "name": "dest_port", "input_type": "text", "validate": "VALIDATION_PORT", "placeholder": "e.g. 25565" }, { "type": "field", "label": "NAT IP", "name": "nat_ip", "input_type": "text", "validate": "VALIDATION_IPV4_FORMAT|VALIDATION_UNRESTRICTED", "placeholder": "e.g. 192.168.1.50" }, { "type": "field", "label": "NAT Port", "name": "nat_port", "input_type": "text", "validate": "VALIDATION_PORT", "placeholder": "e.g. 25565" }, { "type": "field", "label": "Enabled", "name": "enabled", "input_type": "checkbox" }, { "type": "button_row", "items": [ { "type": "button_primary", "action": "/action/portforwarding/addrule_add", "method": "post", "text": "Add Rule" }, { "type": "button_cancel", "text": "Cancel" } ] } ] } ] } ] }