Skip to content

fix: bind service ports to localhost only - #127

Merged
stephdl merged 4 commits into
mainfrom
bind-localhost
Nov 19, 2026
Merged

stephdl merged 4 commits into
mainfrom
bind-localhost

Conversation

@stephdl

@stephdl stephdl commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Synapse, PostgreSQL, Cinny and Element listened on every interface of the node. Only the node firewall kept them private, so PostgreSQL was reachable from the network as soon as firewalld was off or the module port range was opened. NethServer/dev#7648

I bound them to 127.0.0.1. Nothing else changes: Traefik already reaches every service on 127.0.0.1, and Synapse reaches PostgreSQL and matrix2acrobits there too. Element leaves the host network and publishes its port on 127.0.0.1, because its image has no setting for the listen address. The image runs as a non-root user, so it listens on 8080 inside the container.

matrix2acrobits stays on the host network. It only reads a port, not an address, and it reaches Synapse through the public domain, which a rootless bridge network may not route back to the node. Adding a listen address setting upstream would fix it.

How to test

Install or update the module with Element and Cinny enabled. On the node, ss -ltn shows the Synapse, Element, Cinny and PostgreSQL ports on 127.0.0.1 only. Element, Cinny and the Matrix API still work through their domains.

See also

#126 documents the network setup and will be updated to match this change.

Synapse, PostgreSQL, Cinny and Element listened on every interface.
Only firewalld kept them private. Traefik and Synapse reach them on
127.0.0.1, so nothing needs a wider bind.

Element leaves the host network: its image has no setting for the
listen address. It runs as non-root, so it listens on 8080 inside the
container.
@stephdl stephdl self-assigned this Nov 19, 2026
@stephdl
stephdl merged commit b2f3758 into main Nov 19, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant