Port 0: The Port That Does Not Exist
NewCzech
55 points
25 comments
November 07, 2026
Related Discussions
Found 5 related stories in 121.5ms across 12,324 title embeddings via pgvector HNSW
- Show HN: Port Zero – how I learned to stop worrying and love PORT=0 octopoc · 15 pts · July 27, 2026 · 63% similar
- That post never existed. Stop listening to that thing wglb · 145 pts · July 20, 2026 · 43% similar
- Apple Music 404 Not Found frizlab · 694 pts · October 23, 2026 · 43% similar
- Nothing Doing surprisetalk · 38 pts · August 21, 2026 · 41% similar
- OpenSSH Ships on Every Mac, Linux Server and Windows. Its Creator Trusts No One zbruceli · 21 pts · October 05, 2026 · 41% similar
Discussion Highlights (9 comments)
skinfaxi
Seems hugged?
greggsy
I saw the URL and immediately thought it was about Acid Pro DAW or Vegas video editor is used to use back in the early 00’s.
embedding-shape
I'm not sure how I'd do acceptance/E2E testing without the magic of port 0. As long as you have a way of capturing what port it ended up using (which most languages are able to out of the box more or less), parallelizing testing workloads becomes such a breeze without having to manage ports and all that jazz, just fire everything up with N parallism and let the OS figure out what the free ports are, pass the references down and stuff just works. Thanks Linux :)
afn
https://web.archive.org/web/20261106234640/https://acid.vega...
wrayjustin
I tried submitting this multiple times yesterday using the original title. Each submission appeared to go through without error, but the post never appeared in New or on my profile. I was using Harmonic for Hacker News ( https://play.google.com/store/apps/details?id=com.simon.harm... ), so it's possible the issue was with the app rather than HN itself. I later found a separate submission ( https://news.ycombinator.com/item?id=50399587 ) in New that had received some votes but hadn't generated any discussion. Regardless, this isn't the first time researchers have explored TCP port 0, and it certainly won't be the last. A few examples from a quick Google search: * https://www.cyber-threat-intelligence.com/publications/IFIPN... * https://z3r0trust.medium.com/socket-programming-the-bizarre-... * https://arxiv.org/pdf/2004.03653 None of these earlier publications diminish the value of the current research. If anything, they highlight how easily lessons involving obscure protocol behaviors and edge cases can be overlooked or forgotten. Personally, I find network stack manipulation a particularly interesting area of security research, and one that doesn't always receive the attention it deserves. There's understandably significant focus on application-layer vulnerabilities, but that emphasis can lead us to take the behavior and security of the underlying network stack for granted. The TCP/IP stack is mature, but maturity shouldn't be confused with an absence of exploitable behavior. Between implementation differences, ambiguous specifications, legacy protocol assumptions, and unexpected interactions across layers, there are undoubtedly more edge cases, vulnerabilities, and attack surfaces worth investigating.
99harry
Sometimes I have scripts that automatically assign ports starting from 30000. How would that work? Would I have to bind to port 0 multiple times until I randomly get a port in that range?
justsomehnguy
I have a feeling what sometimes :0 is interpreted as a 'first listening'. But Occam says what most of the time it's just 'DNAT dst port ANY to :80' or whatever, no magik.
fosco
[dupe] https://news.ycombinator.com/item?id=50399587
OptionOfT
> And asking for port 0 needs no privileges. My brain has issues with this kind of form. It prevents me from reading words in a fifo manner. I now need to backtrack, because the 'no' negates the word before.