{{define "configure-firewall.html"}} {{template "base" .}} {{end}} {{define "content"}}
{{if .Loading}}
Downloading YANG schema from device… this takes a moment on first login.
{{template "configure-toolbar" .}}
{{else}} {{$d := .Desc}} {{if .Error}}
{{.Error}}
{{end}} {{if not .Active}}
Firewall

Firewall is not configured on this device.

{{else}}
{{/* ── Global settings ─────────────────────────────────────────────── */}}
Global Settings
Enabled{{template "field-info" (index $d "enabled")}}
Default zone{{template "field-info" (index $d "default")}}
Logging{{template "field-info" (index $d "logging")}} {{$log := .Logging}}
{{/* ── Zones ───────────────────────────────────────────────────────── */}}
Zones
{{range $i, $z := .Zones}} {{end}} {{if not .Zones}} {{end}} {{/* Hidden add-zone row */}}
Name{{template "field-info" (index $d "zone-name")}} Action{{template "field-info" (index $d "zone-action")}} Description{{template "field-info" (index $d "zone-description")}} Interfaces Address sets{{template "field-info" (index $d "zone-address-set")}}
{{if .Action}}{{.Action}}{{else}}reject{{end}} {{if .Description}}{{.Description}}{{else}}{{end}} {{.IfaceCount}} {{if .AddressSet}}{{.AddrSetsTxt}}{{else}}{{end}} {{if not .Immutable}} {{end}}
{{if .Immutable}}

This zone is system-defined and cannot be modified.

{{if .Interface}}

Interfaces: {{range $j, $iface := .Interface}}{{if $j}}, {{end}}{{$iface}}{{end}}

{{end}} {{if .Network}}

Networks: {{.NetworksTxt}}

{{end}} {{if .AddressSet}}

Address sets: {{.AddrSetsTxt}}

{{end}} {{if .Service}}

Services: {{.ServicesTxt}}

{{end}} {{else}}
{{if .Network}} {{else}} {{end}} {{if $.AddressSetNames}} {{end}}
Action{{template "field-info" (index $d "zone-action")}} {{$action := .Action}}
{{range $.ActionOptions}} {{end}}
Description{{template "field-info" (index $d "zone-description")}}
Networks {{.NetworksTxt}} Use Configure → Advanced to modify networks.
Interfaces{{template "field-info" (index $d "zone-interface")}} {{if $.AllInterfaces}}
{{range $.AllInterfaces}} {{end}}
{{else}} {{end}}
Address sets{{template "field-info" (index $d "zone-address-set")}}
{{if .AddressSet}}{{.AddrSetsTxt}}{{else}}(None){{end}}
{{range $.AddressSetNames}} {{end}}
Services{{template "field-info" (index $d "zone-service")}} {{if $.ServiceOptions}} {{else}} {{end}} Applied when action is reject or drop. Ctrl/⌘-click to select multiple.
{{/* Port forwarding (DNAT) — own forms, edits land directly. */}}
Port Forwarding
{{if .PortForward}} {{range .PortForward}} {{end}}
Port Proto To address To port
{{.Lower}}{{if gt .Upper .Lower}}-{{.Upper}}{{end}} {{.Proto}} {{if and .To .To.Addr}}{{.To.Addr}}{{else}}— local —{{end}} {{if and .To .To.Port}}{{.To.Port}}{{else}}same{{end}}
{{end}}
{{end}}
No zones configured
{{/* ── Policies ─────────────────────────────────────────────────────── */}}
Policies
{{range $i, $p := .Policies}} {{end}} {{if not .Policies}} {{end}} {{/* Hidden add-policy row */}}
Name{{template "field-info" (index $d "policy-name")}} Action{{template "field-info" (index $d "policy-action")}} Ingress{{template "field-info" (index $d "policy-ingress")}} Egress{{template "field-info" (index $d "policy-egress")}} Masquerade{{template "field-info" (index $d "policy-masquerade")}}
{{if .Action}}{{.Action}}{{else}}reject{{end}} {{if .IngressDisplay}}{{.IngressDisplay}}{{else}}{{end}} {{if .EgressDisplay}}{{.EgressDisplay}}{{else}}{{end}} {{.MasqDisplay}} {{if not .Immutable}} {{end}}
{{if .Immutable}}

This policy is system-defined and cannot be modified.

{{else}}
Action{{template "field-info" (index $d "policy-action")}} {{$action := .Action}}
Ingress zones{{template "field-info" (index $d "policy-ingress")}}
{{if .IngressDisplay}}{{.IngressDisplay}}{{else}}(None){{end}}
{{range $.ZoneNames}} {{end}}
Egress zones{{template "field-info" (index $d "policy-egress")}}
{{if .EgressDisplay}}{{.EgressDisplay}}{{else}}(None){{end}}
{{range $.ZoneNames}} {{end}}
Masquerade{{template "field-info" (index $d "policy-masquerade")}}
{{end}}
No policies configured
{{/* ── Custom Services ──────────────────────────────────────────────── */}}
Services

Define port/protocol bundles by name, e.g. myapp = tcp 8080. Custom services appear in the zone Services picker alongside the built-in ones.

{{range $i, $s := .Services}} {{end}} {{if not .Services}} {{end}} {{/* Hidden add-service row */}}
Name{{template "field-info" (index $d "service-name")}} Description{{template "field-info" (index $d "service-description")}} Ports Destination{{template "field-info" (index $d "service-destination")}}
{{if .Description}}{{.Description}}{{else}}{{end}} {{if .PortsDisplay}}{{.PortsDisplay}}{{else}}{{end}} {{if .Destination}}{{.Destination}}{{else}}any{{end}}
Description{{template "field-info" (index $d "service-description")}}
Destination{{template "field-info" (index $d "service-destination")}}
Ports {{range .Port}} {{end}} {{/* One blank row so the user can add another port without losing their session. */}}
Lower{{template "field-info" (index $d "service-port-lower")}} Upper{{template "field-info" (index $d "service-port-upper")}} Proto{{template "field-info" (index $d "service-port-proto")}}
Leave "Upper" blank for a single port. Blank "Lower" rows are ignored.
No custom services configured
{{/* ── Address Sets ─────────────────────────────────────────────────── */}}
Address Sets

Named sets of IP addresses and networks, usable as zone sources. Entries configured here are static; dynamic entries can be added at runtime from the CLI or over NETCONF/RESTCONF, see the Firewall status page for the live contents.

{{range $i, $s := .AddressSets}} {{end}} {{if not .AddressSets}} {{end}} {{/* Hidden add-address-set row */}}
Name{{template "field-info" (index $d "addrset-name")}} Description{{template "field-info" (index $d "addrset-description")}} Family{{template "field-info" (index $d "addrset-family")}} Timeout{{template "field-info" (index $d "addrset-timeout")}} Entries
{{if .Description}}{{.Description}}{{else}}{{end}} {{.Family}} {{if .Timeout}}{{.Timeout}} s{{else}}{{end}} {{len .Entry}}
Description{{template "field-info" (index $d "addrset-description")}}
Family{{template "field-info" (index $d "addrset-family")}} {{$fam := .Family}}
{{range $.FamilyOptions}} {{end}}
Timeout{{template "field-info" (index $d "addrset-timeout")}} seconds Timeout sets are dynamic-only: entries expire on their own and static entries cannot be configured.
Entries{{template "field-info" (index $d "addrset-entry")}}
No address-sets configured
{{end}} {{template "configure-toolbar" .}} {{end}}{{/* end {{else}} — schema ready */}} {{end}}