On my work Mac (Sierra) I'm running a NodeJS webserver on localhost, port 3000. I need to access to it from Internet Explorer running in Parallels for testing purposes.

I have searched and read and experimented extensively, and have thus far been stymied. My current situation is as follows:

I've got a Parallels "Host-Only" network with my Mac at and my virtual Windows box at

Pointing my IE to fails.

I've jumped through every hoop imaginable to ensure port 3000 is open between the two, but nmap -p 3000 from the Windows side tells me port 3000 remains closed, as does Mac's Network Utility Port Scan software.

Sadly all guides and advice on the subject are either insufficiently similar, grossly outdated, or simply unsuccessful when attempted.

Any progress you help me achieve is greatly appreciated.

The relevant portions of my server.js are:

const port = process.env.PORT || 3000;
const host = process.env.HOST || 'localhost';
const proxyTarget = process.env.PROXY || 'none';
  • Did you try my proposals?
    – klanomath
    Nov 21, 2016 at 13:20
  • Yes, you absolutely set me straight and put me on the right path. @klanomath Nov 21, 2016 at 13:30

4 Answers 4


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 > > 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 testserver.example.com and use testserver.example.com as host const
  • Hi, thanks for the answer, but is there any better explanation? I have no idea how to achieve any of the three. "host const" does not return anything, but link to this post. Mar 5, 2018 at 4:50
  • Ok, got it, this helped: toddvachon.com/2013/04/… Mar 5, 2018 at 4:55

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

  • 5
    I think this is the simplest solution
    – bhoo-day
    Jun 14, 2019 at 1:57
  • 4
    This should be the accepted solution Feb 26, 2021 at 19:38
  • 1
    If you have a server process that you're starting on your local (mac), make sure you also tell that process to bind to the same address, instead of (e.g.) localhost:3000 or
    – mhucka
    Apr 8, 2021 at 0:17
  • Yes it will work, but not a optimal solution. For example, you need to change the ip address in different network ... what if there's no network at all! Also, if you are developing a two-tier application, you may have to add a lot of CORS allowed origins ...
    – v.ng
    Mar 1, 2023 at 9:40

Just run in the terminal:


And go to vnic0: inet address from the Parallels (like http://1x.2xx.5x.2:3000/ for ex.)

  • For me the interface was called bridge101. Quick one-line to see the IP: bash ifconfig | grep bridge101\: -A3
    – Niek
    Oct 17, 2022 at 12:34
  • I prefer this answer. Using the IP-Adress shown in ifconfig -> Bridge101 will work even when you'll change the network with your mac (which will change the IP address of the host system).
    – Michael
    Nov 9, 2022 at 21:02

The temporary solution is to edit server.js and set host = '' or set the HOST system variable to and read it in with host = process.env.HOST || 'localhost'. It may also be possible to edit /private/etc/hosts to map to localhost, though my quick test of that failed.

Everything was behaving precisely as expected. The localhost name is mapped to, and not to any network facing IP address. Thus, which was my Mac's IP on the virtual network shared with Windows running in Parallels, was never reaching localhost. This is correct and reasonable.

All credit goes to klanomath. Thanks!

  • 2
    localhost is a "magical" name and you can't/mustn't set it to anything else than a 127.x.y.z IP-address. You would have to set it also in any client's hosts file to be able to reach the remote "localhost|" which would break any related RFC standard and render the clients' hosts files useless in respect to their own "localhost'iness". (I don't know how to say it precisely in English...)
    – klanomath
    Nov 21, 2016 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .