Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pmoves/docker-compose.core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ services:
- ${NATS_BIND:-0.0.0.0}:${NATS_PORT:-4222}:4222
- ${NATS_BIND:-0.0.0.0}:${NATS_MONITORING_PORT:-9223}:8222
networks:
# pmoves_bus is internal:true (isolated in-stack mesh bus). A container on an
# internal-only network gets NO published-port DNAT rules from Docker, so the
# ports above are recorded but never plumbed — Tailscale mesh peers can't reach
# 4222/9223 cross-node. Multi-home nats onto the non-internal pmoves_external so
# its published ports actually bind, while keeping pmoves_bus for in-stack comms.
- pmoves_bus
- pmoves_external

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep unauthenticated NATS monitoring off the mesh

When this service is attached to pmoves_external, Docker starts plumbing both published ports above, including ${NATS_MONITORING_PORT:-9223}:8222. The NATS HTTP monitoring server enabled by -m 8222 is not protected by the --user/--pass client auth, so any host that uses the default NATS_BIND=0.0.0.0 now exposes /varz, /connz, /subsz, and JetStream metadata to the tailnet/public interface; the same issue is duplicated in the monolithic compose file. Please either stop publishing the monitoring port or bind it separately to localhost/a monitoring-only network while only making 4222 mesh-reachable.

Useful? React with 👍 / 👎.

environment:
- DOCKED_MODE=${DOCKED_MODE:-true}
- TOPOLOGY_MODE=${TOPOLOGY_MODE:-docked}
Expand Down
6 changes: 6 additions & 0 deletions pmoves/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,13 @@ services:
- ${NATS_BIND:-0.0.0.0}:${NATS_PORT:-4222}:4222
- ${NATS_BIND:-0.0.0.0}:${NATS_MONITORING_PORT:-9223}:8222
networks:
# pmoves_bus is internal:true (isolated in-stack mesh bus). A container on an
# internal-only network gets NO published-port DNAT rules from Docker, so the
# ports above are recorded but never plumbed — Tailscale mesh peers can't reach
# 4222/9223 cross-node. Multi-home nats onto the non-internal pmoves_external so
# its published ports actually bind, while keeping pmoves_bus for in-stack comms.
- pmoves_bus
- pmoves_external
environment:
- DOCKED_MODE=${DOCKED_MODE:-true}
- TOPOLOGY_MODE=${TOPOLOGY_MODE:-docked}
Expand Down
Loading