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
