Apple - How to access macOS localhost (port 3000) from Parallels IE?

One of the way I could use it, I found my local IP4 address provided by the router.

From Mac system preferences > Network > IP Address: 192.168.x.xx

And let say if you access it in Mac with http://localhost:3000 you can do it also with http://192.168.x.xx:3000 from Mac itself and from Parallel Windows OS with shared network configuration.

This IP address could be changed each time you restart the router or choose another router etc.

Currently, I'm using Parallels Desktop 12


The "technical background" of the special behavior (at least on Macs) of using localhost as "host constant" is the specific nature of dns.js, which obviously binds the node http/https server to the interface it reverse-resolves to the const host (= localhost) with the help of mDNSResponder.

This is localhost > 127.0.0.1 > lo0.

Any other interface like en0/en1 as physical interfaces or vnic0/vnic1 as Parallels' virtual interfaces won't be addressed/attached.

To solve this you may either

  • set up a DNS-server like dnsmasq in Parallels' Host-only network and use the fqdn of the node http server host as host const
  • use the IP-address of the node http server in Parallels' Host-only network as host const
  • modify the hosts files of every host in Parallels' Host-only network and add a line like 10.37.129.2 testserver.example.com and use testserver.example.com as host const