FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Docker Port Exposing: My Real Production Mistake
How-ToWeb Development

Docker Port Exposing: My Real Production Mistake

via Dev.to WebdevPrashanta Chakraborty1mo ago

I’m developing a Bangladesh-based healthcare system, Gooddoktor. Recently, I deployed my backend in a VPS using Docker. I don’t have hardcore DevOps knowledge. I mostly: learn → try → break → fix . I set up nginx for the subdomain, all is ok. So yesterday I randomly tried a port scan on my own server. And guess what? I found multiple OPEN PORTS. Even worse… I could access my project using: http://SERVER_IP:PORT . No domain, no SSL, Nothing. Anyone on the internet could directly access my services. My First Thought I asked ChatGPT: GPT gave firewall rules → I applied them → still accessible. Then I Googled → again firewall → again same result. So clearly, the issue was not the firewall. That means something else was exposing the port. The Real Problem (Docker Did It) In my docker-compose I wrote: ports: - "2525:2525" Looks normal, right? But this line is VERY dangerous in production. What actually happens Docker doesn’t just run inside your machine. When you map a port like this: 2525:2

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
21 views

Related Articles

The Feature Took 2 Hours to Build — and 2 Weeks to Fix
How-To

The Feature Took 2 Hours to Build — and 2 Weeks to Fix

Medium Programming • 3d ago

Blog 15: SDLC Phase 4 — Testing
How-To

Blog 15: SDLC Phase 4 — Testing

Medium Programming • 3d ago

Before We Write a Single Data Structure, We Need to Talk
How-To

Before We Write a Single Data Structure, We Need to Talk

Medium Programming • 3d ago

How-To

How to implement the Outbox pattern in Go and Postgres

Lobsters • 3d ago

The Hidden Algorithm Behind Google Maps Traffic!!!!
How-To

The Hidden Algorithm Behind Google Maps Traffic!!!!

Medium Programming • 3d ago

Discover More Articles