A Hacker Scanned the Entire Internet for Port 0 and Found 1.1 Million Devices Hiding There
Port 0: The Port That Does Not Exist

Port 0 is reserved, ignored by browsers, and rejected by most tools, so nobody looks there. The author redirected an IRC network onto port 0 with a single iptables rule, then used masscan to SYN-scan all of IPv4 for it. Over 1.1 million addresses completed the handshake and stayed silent; nearly all the rest were F5 BIG-IP load balancers complaining in RST packets. The survivors were ordinary SSH, MySQL, telnet, and router logins, mostly embedded gear whose NAT rules shipped with the external port left at zero.
Linux uses "destination port is 0" as its internal marker for "this socket isn't connected to anything." A socket that really is connected to port 0 trips that check, so getpeername() returns ENOTCONN on a working connection.
- afn
https://web.archive.org/web/20261106234640/https://acid.vega...
- 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.
- 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?