Networking & Firewall (Ss/Netstat/Iptables/Curl)
Stop getting blinded by mysterious connection resets
🧩 The Challenge
Dealing with connections that just randomly drop in the middle of a request is the absolute worst, especially when the logs show nothing. It usually feels like someone is yanking the network cable out right when things get interesting.
💡 The Fix
Use the –tos flag with ss to inspect the socket metadata or pipe your output into a filter to track specific state changes in real time. It saves you from staring at a blinking cursor hoping to catch a socket in the act of dying.
ss -tnp state established | grep :80
⚙️ Why It Works
This pulls every active connection on port 80 and shows you the associated PID, which lets you match those flaky requests to the actual binary causing the mess. Seeing the state flag is the difference between guessing what happened and knowing exactly why the kernel killed the stream.
🚀 Pro-Tip: Pipe it into watch if you really want to see the socket disappear before your eyes.
Linux Tips & Tricks | © ngelinux.com | 9/4/2026
