Local IP Server – Unable to Reach Server via Local IP, Only ‘localhost’

catalinaNetwork

For years I've been able to use my local IP to access local servers during development. e.g. http://192.168.80.20:3000. It seems that after updating to macOS 10.15.4 this is no longer possible. I can only access my projects with localhost e.g. http://localhost:3000. This is fine for when I am using a local client such as Chrome or iOS Simulator, but I also need to do testing across my local network from another device. I'm not sure what changed!

Best Answer

Make sure NodeJS is listening on all interfaces.

  • :3000
  • localhost:3000
  • [::]:3000
  • 127.0.0.1:3000

All the above are different but all are listening on port 3000. Only the first :3000 listens to every interface: IPv4, IPv6, and other interfaces like ethernet and WiFi.

Use sudo lsof -i show which ports, interfaces, and protocols your server is listening to.