That does not listen on port 5000. I think it means to listen (on next available port) for connections from host 5000 (which would be 0.0.19.136). The proper syntax is nc -l -p 5000.pi4@raspberrypi:~ $ nc -l 5000
There are at least three different implementations of netcat available in Debian, so it is possible your buster system was using a different one.
Code:
root@pi02:~# nc -l 5000GET / HTTP/1.1Host: pi02:5000User-Agent: curl/8.13.0Accept: */*root@pi02:~# netstat -anp | grep LIST | grep nctcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 15916/nc [clever@amd-nixos:~]$ curl pi02:5000root@pi02:~# which nc/usr/bin/ncroot@pi02:~# dpkg -L netcat-openbsd/bin/nc.openbsdroot@pi02:~# ls -l /bin/nc /etc/alternatives/nclrwxrwxrwx 1 root root 20 Dec 5 2023 /bin/nc -> /etc/alternatives/nclrwxrwxrwx 1 root root 15 Dec 5 2023 /etc/alternatives/nc -> /bin/nc.openbsdwhat does "ip addr" return on the rpiWhoa, good catch, I was not aware of the subtle variations in syntax. However, it seems like this is not my issue. I took netcat out of the equation and switched to testing with a tiny web server.
Statistics: Posted by cleverca22 — Sun May 25, 2025 10:39 pm