Skip to content

fix(security): stop publishing the API to the internet in cleartext - #49

Merged
kipavy merged 1 commit into
mainfrom
fix/bind-server-to-loopback
Sep 22, 2026
Merged

kipavy merged 1 commit into
mainfrom
fix/bind-server-to-loopback

Conversation

@kipavy

@kipavy kipavy commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

The problem

compose.prod.yml published 14372:8080 on all interfaces, and the VCN's default security list allowed TCP 14372 from 0.0.0.0/0. So http://<public ip>:14372 reached the production API directly — no TLS, no Cloudflare in front of it. Anything sent over that path, including a login, travelled in cleartext.

The host firewall allowed it too.

Why nothing needs it

The tunnel connector dials out to Cloudflare and reaches the server over the cloudflare docker network by name — the live ingress rule is api.voltius.app -> http://voltius-server:8080. The admin dashboard talks to https://api.voltius.app. The only other users of the port are the runbook curls against 127.0.0.1, which keep working.

The change

  • Publish on 127.0.0.1:14372 instead of 0.0.0.0.
  • Remove the 14372 ingress rule from the security list.

SSH and the two ICMP rules are untouched. The provider rewrites the rule list as a unit, so the plan reads 0 to add, 1 to change, 0 to destroy with four rules removed and three added back — verified rule by rule before applying.

Applying this needs a container recreate (a few seconds of downtime) and the host firewall rule dropped separately.

🤖 Generated with Claude Code

The server published 14372 on 0.0.0.0 and the VCN allowed it from
0.0.0.0/0, so http://<public ip>:14372 reached the API directly: no TLS, no
Cloudflare, and a login sent that way travelled in the clear.

Nothing needs it. The tunnel connector dials out and reaches the container
over the cloudflare network by name; the only other users of the port are
runbook curls on 127.0.0.1, which still work.

Publish on loopback, and drop the ingress rule. SSH and the ICMP rules are
untouched — the provider rewrites the whole list, so the plan shows four
rules removed and three added back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kipavy
kipavy merged commit 3025a2e into main Sep 22, 2026
2 checks passed
@kipavy
kipavy deleted the fix/bind-server-to-loopback branch September 22, 2026 16:31
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