Admit a host-network proxy's port from a peer group alone #56

Closed
opened 2026-11-21 14:03:20 +01:00 by motoko · 0 comments
Collaborator

A host that runs a reverse-proxy forwarder on its own network, not
through a port Docker publishes, cannot be reached by its peers once
fortify.yml has applied the firewall, and no role's port file lets a
tenant admit that port from those peers alone.

Where

roles/firewall-apply and the port files it reads,
<role>/vars/firewall.yml; docs/ARCHITECTURE.md § Firewall. Seen on
main on 2026-11-21.

Evidence

The table filters traffic addressed to the host itself. A container on
the host's network (network_mode: host) listens there, so its port
meets the input chain, unlike a published port, which the table does not
see. The only port file for HTTP, roles/webserver/vars/firewall.yml,
declares open: true for webserver_ports, which admits every source.

Scenario

A compose host outside a Swarm runs a forwarder on its LAN address, on
one TCP port, that only the Swarm's nodes may reach: the cluster's
reverse proxy forwards to it. From a node, a request to that port times
out, and the proxy answers 504. The tenant can join the host to
webservers and set webserver_ports to that port, but the rule then
admits every source, where the need is the nodes alone.

Smallest fix

Let the webserver's rule be restricted: a webserver_from_group, or
webserver_sources, that when set replaces open: true with
from_group or sources in webserver_firewall_rules, with a molecule
case beside the existing ones. The tenant's inventory, which lives
outside this repository, then names the group and the port for its host.

A host that runs a reverse-proxy forwarder on its own network, not through a port Docker publishes, cannot be reached by its peers once `fortify.yml` has applied the firewall, and no role's port file lets a tenant admit that port from those peers alone. ## Where `roles/firewall-apply` and the port files it reads, `<role>/vars/firewall.yml`; `docs/ARCHITECTURE.md` § Firewall. Seen on `main` on 2026-11-21. ## Evidence The table filters traffic addressed to the host itself. A container on the host's network (`network_mode: host`) listens there, so its port meets the input chain, unlike a published port, which the table does not see. The only port file for HTTP, `roles/webserver/vars/firewall.yml`, declares `open: true` for `webserver_ports`, which admits every source. ## Scenario A compose host outside a Swarm runs a forwarder on its LAN address, on one TCP port, that only the Swarm's nodes may reach: the cluster's reverse proxy forwards to it. From a node, a request to that port times out, and the proxy answers 504. The tenant can join the host to `webservers` and set `webserver_ports` to that port, but the rule then admits every source, where the need is the nodes alone. ## Smallest fix Let the webserver's rule be restricted: a `webserver_from_group`, or `webserver_sources`, that when set replaces `open: true` with `from_group` or `sources` in `webserver_firewall_rules`, with a molecule case beside the existing ones. The tenant's inventory, which lives outside this repository, then names the group and the port for its host.
Sign in to join this conversation.
No description provided.