Server firewall opens more ports than needed #14

Open
opened 2026-11-16 10:39:02 -05:00 by polen · 0 comments
Owner

Problem

networking.firewall.allowedTCPPorts on the server opens much more than the reverse proxy needs:

Port Service Note
9090 Prometheus no authentication
3000 Grafana already behind Caddy
8096 Jellyfin already behind Caddy
9000 Mealie already behind Caddy
8123 Home Assistant already behind Caddy
8088 SearXNG openFirewall = true, bind_address = "0.0.0.0"
10222 taskchampion-sync-server host = "0.0.0.0"
9091, 9191, 8989, 2222 — nothing on the server listens there

These ports are reachable from every LAN device, and from the internet if the ISP hands out global IPv6 addresses and the router does not filter them.

Fix

  • Bind every service that Caddy fronts to 127.0.0.1.
  • Reduce allowedTCPPorts to 80 and 443 (22 is opened by the openssh module). Keep 10222 only if clients sync over the LAN directly.
  • Remove the stale entries.
## Problem `networking.firewall.allowedTCPPorts` on the server opens much more than the reverse proxy needs: | Port | Service | Note | |---|---|---| | 9090 | Prometheus | no authentication | | 3000 | Grafana | already behind Caddy | | 8096 | Jellyfin | already behind Caddy | | 9000 | Mealie | already behind Caddy | | 8123 | Home Assistant | already behind Caddy | | 8088 | SearXNG | `openFirewall = true`, `bind_address = "0.0.0.0"` | | 10222 | taskchampion-sync-server | `host = "0.0.0.0"` | | 9091, 9191, 8989, 2222 | — | nothing on the server listens there | These ports are reachable from every LAN device, and from the internet if the ISP hands out global IPv6 addresses and the router does not filter them. ## Fix - Bind every service that Caddy fronts to 127.0.0.1. - Reduce `allowedTCPPorts` to 80 and 443 (22 is opened by the openssh module). Keep 10222 only if clients sync over the LAN directly. - Remove the stale entries.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
polen/nixos#14
No description provided.