Stop curl from lying to you about silent connection failures
Networking & Firewall (Ss/Netstat/Iptables/Nftables/Curl)
Stop curl from lying to you about silent connection failures
🧩 The Challenge
You are trying to debug a weird connectivity issue between microservices and curl just sits there blinking or gives a generic error that tells you absolutely nothing. I have spent way too much time staring at blank screens when the firewall is actually silently dropping my packets.
💡 The Fix
Start using the verbose flag combined with a trace output to see exactly where the TCP handshake stalls out. It forces curl to show you the guts of the network exchange instead of just hiding the misery behind an exit code.
curl -v --trace-time --trace-ascii /dev/stderr https://your-service-endpoint.internal
⚙️ Why It Works
Adding the trace-ascii flag dumps the raw data flow alongside timestamps, which makes it blindingly obvious if the connection is hanging on the SYN packet or getting reset halfway through the TLS negotiation.
🚀 Pro-Tip: Pipe it into grep if you are dealing with massive headers so you don’t lose your mind scrolling.
Linux Tips & Tricks | © ngelinux.com | 8/13/2026
