A friend of mine asked for help, basically any app listening on some local tcp port on localhost can't be reached. For example a node.js server running on port 8080 or 3000.
Executing the command sudo lsof -i -P | grep LISTEN | grep 8081
gives:
node 3109 someuser 23u IPv6 0x4b0c58c629ba9f33 0t0 TCP *:8080 (LISTEN)
so it seems the app is correctly listening on that port. But when trying to reach the app on localhost:8080
it says that it can't be reached or give timeout. We have tried many different ports (e.g. 8080, 3000, 5000 etc) checking in case the ports were already used by other apps but we got always the same error. We also tried this http-server package but same result. I've never had a case where all the tcp ports are unresponsive locally, do you have any idea what's going on?