Find out what is actually hijacking your ports before you lose your mind

Networking & Firewall (Ss/Netstat/Iptables/Nftables/Curl)

Find out what is actually hijacking your ports before you lose your mind

🧩 The Challenge

Nothing beats the joy of trying to start a web service only to find out some random process is already sitting on port 80 or 443. You run netstat and get a wall of output that makes your eyes bleed while you hunt for that one stubborn PID.

💡 The Fix

Skip the ancient tools and use ss to filter exactly what is listening so you can kill the offending process in one shot. It’s way faster and won’t leave you digging through endless noise.

ss -lptn 'sport = :80 or sport = :443'

⚙️ Why It Works

By passing the sport filter directly to ss, you tell the kernel to only return the specific sockets you actually care about. Most people just pipe everything to grep, but this method is cleaner and stops you from seeing half of your system’s network state when you only need one port.

🚀 Pro-Tip: Alias this to something like ‘who-has-port’ and save your sanity next time you’re debugging a service restart.

Linux Tips & Tricks | © ngelinux.com | 11/19/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted