DEV Community

Faruk
Faruk

Posted on • Originally published at Medium

How I Accidentally Left a Port Open on My Linux Server (And How I Caught It) | by Faruk Ahmed | May, 2025

Member-only story

How I Accidentally Left a Port Open on My Linux Server (And How I Caught It)

--

Share

✍️ Full Blog Content:

Intro:

It started as a small mistake — a test service I was using for 10 minutes. But I forgot to close it. Days later, I found it still running, exposed to the internet, quietly inviting trouble. This is the story of how I caught it, how I fixed it, and what I now check regularly to make sure it never happens again.

What Happened:

I had opened port 8080 temporarily to test a Node.js web app. I meant to close it the same day — but forgot. No alerts were triggered. Days passed.

Then I ran:

sudo ss -tuln
Enter fullscreen mode Exit fullscreen mode

And there it was:

LISTEN 0 128 0.0.0.0:8080 0.0.0.0:*
Enter fullscreen mode Exit fullscreen mode

✅ Open on all interfaces, not just localhost. ✅ Bound to a test script still running in the background. ✅ Fully accessible from the public IP.

How I Caught It:

✅ 1. Weekly port scan from outside my network:

nmap -Pn your-server-ip
Enter fullscreen mode Exit fullscreen mode

✅ 2. Local port review:

sudo ss -tuln
Enter fullscreen mode Exit fullscreen mode

👉 Read Full Blog on Medium Here

Top comments (0)