184 lines
5.3 KiB
JSON
184 lines
5.3 KiB
JSON
{
|
|
"client_requirement": "client_is_viewer+",
|
|
"items": [
|
|
{
|
|
"type": "header_page_title",
|
|
"items": [
|
|
{
|
|
"type": "h1",
|
|
"text": "Inter-VLAN Exceptions"
|
|
},
|
|
{
|
|
"type": "p",
|
|
"text": "Firewall rules that permit specific traffic to cross VLAN boundaries."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "table",
|
|
"datasource": "config:inter_vlan_exceptions",
|
|
"empty_message": "No inter-VLAN exceptions configured. All cross-VLAN traffic is blocked by default.",
|
|
"columns": [
|
|
{
|
|
"label": "Description",
|
|
"field": "description"
|
|
},
|
|
{
|
|
"label": "Protocol",
|
|
"field": "protocol",
|
|
"class": "col-mono col-narrow"
|
|
},
|
|
{
|
|
"label": "Source",
|
|
"field": "src_ip_or_subnet",
|
|
"class": "col-mono"
|
|
},
|
|
{
|
|
"label": "Destination",
|
|
"field": "dst_ip_or_subnet",
|
|
"class": "col-mono"
|
|
},
|
|
{
|
|
"label": "Port Start",
|
|
"field": "dest_port_start",
|
|
"class": "col-mono col-narrow"
|
|
},
|
|
{
|
|
"label": "Port End",
|
|
"field": "dest_port_end",
|
|
"class": "col-mono col-narrow"
|
|
},
|
|
{
|
|
"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/intervlan/table_delete",
|
|
"method": "post",
|
|
"text": "Delete",
|
|
"class": "btn-danger btn-sm"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "card",
|
|
"id": "add-form",
|
|
"label": "Add Exception",
|
|
"client_requirement": "client_is_administrator+",
|
|
"items": [
|
|
{
|
|
"type": "form",
|
|
"action": "/action/intervlan/addexception_add",
|
|
"method": "post",
|
|
"items": [
|
|
{
|
|
"type": "hidden",
|
|
"name": "row_index",
|
|
"value": ""
|
|
},
|
|
{
|
|
"type": "field",
|
|
"label": "Description",
|
|
"name": "description",
|
|
"input_type": "text",
|
|
"placeholder": "e.g. Allow Chromecast"
|
|
},
|
|
{
|
|
"type": "field_row",
|
|
"cols": 2,
|
|
"items": [
|
|
{
|
|
"type": "field",
|
|
"label": "Source",
|
|
"name": "src_ip_or_subnet",
|
|
"input_type": "text",
|
|
"validate": "VALIDATION_IPV4_CIDR",
|
|
"placeholder": "e.g. 192.168.20.100 or 192.168.20.0/24",
|
|
"hint": "You may allow either a single device IP or an entire subnet to contact dest."
|
|
},
|
|
{
|
|
"type": "field",
|
|
"label": "Destination",
|
|
"name": "dst_ip_or_subnet",
|
|
"input_type": "text",
|
|
"validate": "VALIDATION_IPV4_CIDR",
|
|
"placeholder": "e.g. 192.168.10.200 or 192.168.10.0/24",
|
|
"hint": "You may allow either a single device IP or an entire subnet to be reached by source."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_row",
|
|
"cols": 3,
|
|
"items": [
|
|
{
|
|
"type": "field",
|
|
"label": "Protocol",
|
|
"name": "protocol",
|
|
"input_type": "select",
|
|
"options": "%PROTOCOL_OPTIONS%"
|
|
},
|
|
{
|
|
"type": "field",
|
|
"label": "Dest Port Range Start",
|
|
"name": "dest_port_start",
|
|
"input_type": "number",
|
|
"min": 1,
|
|
"max": 65535
|
|
},
|
|
{
|
|
"type": "field",
|
|
"label": "Dest Port Range End",
|
|
"name": "dest_port_end",
|
|
"input_type": "number",
|
|
"min": 1,
|
|
"max": 65535
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "raw_html",
|
|
"html": "<p class=\"form-hint\" style=\"margin-top:-1rem\">This exception only applies to traffic matching the selected protocol and destination port range.</p>"
|
|
},
|
|
{
|
|
"type": "raw_html",
|
|
"html": "<br>"
|
|
},
|
|
{
|
|
"type": "field",
|
|
"label": "Enabled",
|
|
"name": "enabled",
|
|
"input_type": "checkbox"
|
|
},
|
|
{
|
|
"type": "button_row",
|
|
"items": [
|
|
{
|
|
"type": "button_primary",
|
|
"action": "/action/intervlan/addexception_add",
|
|
"method": "post",
|
|
"text": "Add Exception"
|
|
},
|
|
{
|
|
"type": "button_cancel",
|
|
"text": "Cancel"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|