Zone-based firewall page, per-sensor temperatures, 15 minute default
The firewall page now manages zones (assign each LAN or tunnel, add and remove zones) and rules with zone, address and port on both sides plus the protocol. router.firewall.zones declares zones without members and rules take sourcePorts. The temperature chart draws every thermal zone and hwmon sensor; the overview defaults to 15 minutes, 1h stays an option. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
@@ -142,7 +142,7 @@ let
|
||||
);
|
||||
|
||||
wgs = lib.attrValues cfg.wireguard;
|
||||
zoneNames = lib.unique (map (l: l.zone) lans ++ map (w: w.zone) wgs);
|
||||
zoneNames = lib.unique (map (l: l.zone) lans ++ map (w: w.zone) wgs ++ cfg.firewall.zones);
|
||||
|
||||
isV6 = lib.hasInfix ":";
|
||||
v4Cidr = s: lib.hasInfix "/" s && ipv4.parseNet s != null;
|
||||
@@ -227,7 +227,11 @@ let
|
||||
message = "router: ${where}: ports are only valid with protocol tcp or udp.";
|
||||
}
|
||||
{
|
||||
assertion = lib.all portOk r.ports;
|
||||
assertion = r.sourcePorts == [ ] || ((r.protocol == "tcp" || r.protocol == "udp") && !r.dnat);
|
||||
message = "router: ${where}: sourcePorts are only valid with protocol tcp or udp, and not on a port forward.";
|
||||
}
|
||||
{
|
||||
assertion = lib.all portOk (r.ports ++ r.sourcePorts);
|
||||
message = "router: ${where}: a port or port range is out of range (1-65535, ranges need low < high).";
|
||||
}
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user