Skip to content

Explicitly specify loopback IP when exposing container ports#34

Open
ok300 wants to merge 1 commit into
mainfrom
ok300-patch-1
Open

Explicitly specify loopback IP when exposing container ports#34
ok300 wants to merge 1 commit into
mainfrom
ok300-patch-1

Conversation

@ok300

@ok300 ok300 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The common way ports are exposed in docker 8001:8001 is actually equivalent to 0.0.0.0:8001:8001, which binds the port to all of the host's IPs.

Since docker bypasses local firewalls like ufw and iptables (docker/for-linux#690) , a user that would follow try to run these containers on a VPS VM could inadvertently expose each container's mapped ports to the internet.

To follow security best practices, this PR switches to a port notation that explicitly binds it to the host's loopback IP.

Related to pubky/pubky-core#288, pubky/pubky-nexus#676

Updated port mappings to bind to localhost instead of all interfaces.
@SpontaneousOverthrow

SpontaneousOverthrow commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

could you check please that stack is working, make sure to test registration workflow using pubky ring
we have couple of local addresses that are used, for example for accessing nexus,httprelay and homeserver, because this services only exposed on localhost they wont be reachable.

@SpontaneousOverthrow SpontaneousOverthrow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subj

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.

2 participants