Admit a host-network proxy's port from a peer group alone #56
Labels
No labels
bug
cannot reproduce
duplicate
enhancement
help wanted
invalid
need info
need triage
need verification
not a bug
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
claudiomaradonna/castrum#56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.ymlhas applied the firewall, and no role's port file lets atenant admit that port from those peers alone.
Where
roles/firewall-applyand the port files it reads,<role>/vars/firewall.yml;docs/ARCHITECTURE.md§ Firewall. Seen onmainon 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 portmeets 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: trueforwebserver_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
webserversand setwebserver_portsto that port, but the rule thenadmits every source, where the need is the nodes alone.
Smallest fix
Let the webserver's rule be restricted: a
webserver_from_group, orwebserver_sources, that when set replacesopen: truewithfrom_grouporsourcesinwebserver_firewall_rules, with a moleculecase beside the existing ones. The tenant's inventory, which lives
outside this repository, then names the group and the port for its host.