TCP Client Self-Connect (2013)

39 Bogdanp 5 8/11/2025, 12:33:09 AM sgros.blogspot.com ↗

Comments (5)

Retr0id · 4h ago
Can confirm that it still works in 2025, and also via netcat.

I wonder if it's also theoretically possible for a pair of clients to connect to each other like this?

LeoPanthera · 3h ago
The tailscale client does this trick to force its way through NAT-to-NAT connections.

"How NAT traversal works" - https://tailscale.com/blog/how-nat-traversal-works > "The benefits of birthdays"

bmenrigh · 3h ago
Yeah a pair of clients can via “tcp simultaneous open” but you’ll need to arrange for each client to know about the source port of the other. So bypass the usual ephemeral port choice made by the OS. And it’s still highly sensitive to timing.
millipede · 3h ago
Intuitively it doesn't sound like it would work. The program doesn't call listen() or accept() on the socket.
j16sdiz · 41m ago
The comment section on it answered that: it's TCP simultaneous open.