From 7c1282c73a77e5e3043b2a19e66d8bfe3409b9d2 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Wed, 18 Nov 2026 13:46:25 +0100 Subject: [PATCH] Explain the firewall rule columns in tooltips The paragraph under the table gives way to a hint; each heading says what its column is. Co-Authored-By: Claude Sonnet 5.5 --- pkgs/router-webui/static/style.css | 14 ++++++++++++++ pkgs/router-webui/templates/firewall.html | 21 +++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/pkgs/router-webui/static/style.css b/pkgs/router-webui/static/style.css index c226b8c..58ff0a1 100644 --- a/pkgs/router-webui/static/style.css +++ b/pkgs/router-webui/static/style.css @@ -60,6 +60,20 @@ section { margin: 0 0 1.5rem; } section.busy, section.pending { padding: .75rem 1rem; border-radius: var(--radius); background: var(--warn); } .upload-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); padding: 1rem; } .upload-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0, 0, 0, .35); padding: 1.25rem 1.5rem; width: min(30rem, 100%); } +/* A heading that explains itself when the mouse rests on it. */ +th[title] { cursor: help; text-decoration: underline dotted; text-underline-offset: .25em; text-decoration-color: var(--tick); } +/* A diff as GitLab shows it: line numbers of both sides, red and green rows. */ +.diff { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; margin: 0 0 1rem; } +.diff .drow { display: flex; min-width: max-content; } +.diff .ln { flex: none; width: 3.2rem; padding: 0 .5rem; text-align: right; color: var(--muted); background: var(--zebra); user-select: none; border-right: 1px solid var(--line); } +.diff .mk { flex: none; width: 1.4rem; text-align: center; user-select: none; } +.diff code { flex: 1; white-space: pre; padding-right: 1rem; background: none; } +.diff .add { background: color-mix(in srgb, var(--good) 14%, var(--surface)); } +.diff .add .ln { background: color-mix(in srgb, var(--good) 28%, var(--surface)); } +.diff .del { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); } +.diff .del .ln { background: color-mix(in srgb, var(--bad) 28%, var(--surface)); } +.diff .gap { background: var(--head); color: var(--muted); padding: .1rem 0; } +.diff .gaptext { padding-left: 7.5rem; user-select: none; } .dialog-question { margin: 0; font-size: 1.05rem; } .dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; } .upload-card.wide { width: min(48rem, 100%); } diff --git a/pkgs/router-webui/templates/firewall.html b/pkgs/router-webui/templates/firewall.html index e468f5d..ad2390f 100644 --- a/pkgs/router-webui/templates/firewall.html +++ b/pkgs/router-webui/templates/firewall.html @@ -40,7 +40,19 @@
- + + + + + + + + + + + + + {{range $i, $r := .Rows}}
From zoneFrom addressFrom portTo zoneTo addressTo portProtocolForwarded onlyLogRate limitRemove
From zoneFrom addressFrom portTo zoneTo addressTo portProtocolForwarded onlyLogRate limitRemove
-

Fill in the last row to add a rule. Addresses (several separated by commas) are IPv4 or IPv6, single or CIDR; - to address is one address or network. Ports (tcp and udp only): 22, 443, 5000-5100. - From wan (the internet) a rule must name the address inside, the protocol and the ports, and only lets - traffic through; a port forward is set up below. Forwarded only limits a rule to connections that a - port forward translated. To zone local is the router itself (SSH, the web UI): no address needed, but protocol and ports are. A port forward on the same port wins. Rate limit caps new connections per sender, like 10/minute.

+

Fill in the last row to add a rule. Hover over a column heading to see what it means. A rule from + wan only lets traffic through; a port forward is set up below.