Funny #nix happenings.

Install netcat and listen on a port:
`nc -l 0.0.0.0 5555`

Try to connect: `nc localhost 5555` gives Connection Refused.

What is happening?

The answer hides in netstat logs:

```
# netstat -ptwuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:36621 0.0.0.0:* LISTEN 20/nc
```

See that? "0.0.0.0:36621"

Why, #nix, oh why did you take away 3 hours of my life by breaking a basic network debugging tool?

Show thread

Oh, and the funniest? You can't connect on that port either. You'll get a connection reset.

Show thread
Follow

@dcz isn't localhost ::1 nowadays?

@dcz I mean you can map it to whatever you want but default is
[ruff@dei ~]$ ping localhost
PING localhost(localhost (::1)) 56 Datenbytes
64 Bytes von localhost (::1): icmp_seq=1 ttl=64 Zeit=0.024 ms

@ruff Containers are typically stuck at IPv4.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml