Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Odame/f0f72564e550c4dd6b36f59af9c8cf57 to your computer and use it in GitHub Desktop.
Save Odame/f0f72564e550c4dd6b36f59af9c8cf57 to your computer and use it in GitHub Desktop.
Accessing macOS localhost from Parallels Desktop IE or Edge

Access macOS localhost from IE or Edge within Parallels Desktop

This issue is so infuriating that I'm going to take some time to write about it.

  1. MOST IMPORTANT. Your local development server must be bound to IP address 0.0.0.0. Some do this by default, but many don't. You need to make sure that you run your local server with correct IP bindings. You may need to provide additional flags to your serve commands e.g. polymer serve --hostname domain.local, hugo serve --bind 0.0.0.0. If you use a named domain like domain.local, it has to be defined in /etc/hosts and pointing at 0.0.0.0.

  2. My Parallels setting is using Shared Network, nothing special there.

  3. Open macOS Terminal and type ifconfig. Look for the value under vnic0 > inet. It is typically 10.211.55.2.

  4. You can use this IP address from IE or Edge in Parallels Desktop. Don't forget the port number and protocol, e.g. http://10.211.55.2:3000

  5. It's annoying to remember this IP all the time, so you can edit C:\Windows\System32\drivers\etc (search for Notepad app and right-click to Run as Administrator, then search for this file from within Notepad so that you can actually edit it) and give that IP address a name. For example, setting the IP to the name localhost.macmeans that you can use http://localhost.mac:3000 in place of the example in the previous step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment