accessing localhost

Discussion in 'Installation and Configuration' started by Keithiopian, Mar 26, 2012.

  1. Keithiopian

    Keithiopian

    Messages:
    1
    Hello All,

    I have downloaded and installed Parallel's/Window's 7 for the sole purpose of testing on Internet Explorer. I have a site which I am building located at localhost. I am able to access this on my mac side with all browsers, however when I switch over to Windows and try to access localhost I am unable to access. Has anyone any insight for this?

    Thanks for you help!
     
  2. Lobo_79

    Lobo_79

    Messages:
    7
    Clearly my response is not in the expert category but I solved this problem by downloading and installing the open source XAMP on the Windows side. Worked well for my use. You may wind up augmenting your localhost with a port number: localhost:8888 for example.

    With luck there's a more direct way to do this...but XAMP works well.
     
  3. Specimen

    Specimen Product Expert

    Messages:
    3,256
    You have to realize that a virtual machine is like and behaves like a separate physical machine on the network, localhost WILL NOT work, so if you need to connect to a server on the Host (OSX) or on the Guest (Windows) you have to know it's IP on the network or subnetwork depending if the virtual machine is running with bridge or shared network.

    On shared network (the default), the Host will be the subnetwork gateway with the 10.211.55.1 IP adress (for the Guest VMs), and Guests will be on this subnetwork with the IP on the 10.211.55.x range (they get their IP from the Host, check the Guest IP via Windows network settings/info).

    On Bridge network Guests will get the IP from your router and will be on the same network as other computers connected to the router including the host (typically 192.168.1.x).
     
    Last edited: Mar 29, 2012
  4. hawquist

    hawquist

    Messages:
    1
    That worked for me.
    Thank you very much!

    Although my Mac localhost had 10.211.55.2.
    But I guess that depends on the settings (and I think parallels also acts like a DHCP, so the adresses can vary..?!)

    The settings are accessible through the Menu ("Parallels Desktop" -> "Settings" or ⌘,) then the last Symbol (the gear wheel, I think it's "Enhanced" in English?!) and then at the top: "Network" -> "Change Settings"
     
  5. Danielav

    Danielav Bit Poster

    Messages:
    1
    I have been a user of parallels for very many years. The only reason I need it, is to check my (ruby on rails) web apps on Internet Explorer - using my development server, i.e. on localhost on my mac. It has been such a hassle to find out how to hook up IE to the mac localhost. Every second new release of parallels recreates the problem from scratch, every new windows OS too. I don't understand why there are no clear instructions on how to do this. There must be a considerable amount of people buying parallels for the same reason as I did. I am not really interested in networking and that side of things should "just work". (and none of what is said here results in me being able to access mac localhost from the virtual internet explorer - I have been successful with varying setups in the past, but now again, I spent hours, no luck though)
    I am giving up - downloaded Virtualbox (free) and the now also freely available windows OSes. It's a breeze. Here how to do it: http://ecmendenhall.github.io/blog/blog/2013/07/14/accessing-rails-from-virtualbox/
     
    DavidN9 likes this.
  6. DavidN9

    DavidN9 Bit Poster

    Messages:
    7
    I completely agree with you. Parallels is fairly expensive software that I bought solely for the purpose of testing my Angular app in IE/Edge, and I can't even get it to work. I have spent probably 4-6 hours searching google and these forums, trying different configurations, and still can't get it to work. VirtualBox, a free software, all I had to do was add the default gateway to my hosts file and it worked. Hardly any configuration required, and worked nearly out of the box. It seems totally absurd that the only posts I can find on this are 6-12 month old and have no replies (or totally useless replies from some foreign support agent) and that there is no documentation on the site for accomplishing this. As you said - there must be a very significant portion of Parallels customer base that is buying the software for this sole purpose - I can't hardly imagine I'm in the minority on this. Parallels if you are reading this, for the love of God, take an hour and create a FAQ or guide or SOMETHING to help your customers accomplish this extremely common use case!
     
  7. kevinm17

    kevinm17 Bit Poster

    Messages:
    2
    I have the same problem.
    I am trying to test my website/app hosted in MacOSX, using Edge and IE browsers.
    I want to connect to my Mac's localhost:4200 using Edge running in Windows10 in Parallels 13.

    Here's my setup, I arranged it hierarchically according to who's running on what:
    • MacOSX 10.11.16
      • Parallels 13
        • Configuration in Hardware / Network / Source: "Shared Network (Recommended)"
        • Windows 10
          • Firewall is open
          • ipconfig shows 10.211.55.3 for IPv4 and 10.211.55.1 for Gateway
      • angular-cli's 'ng serve' is running a webserver on the MacOSX on port 4200.
      • ifconfig shows 10.211.55.2 for vnic0 and 10.37.129.2 for vnic1
      • Firewall is open
      • Settings / Network / Advanced / TCP/IP / IPv4 is 192.168.110.91
      • nmap -p 4200 10.211.55.2 gives "Host is up" and "4200/tcp closed"
    I need this to work without internet connection (i.e. when I'm on the train or traveling), and my Wifi router doesn't allow devices to see each other anyways - so it does not work to use my laptop's DHCP assigned IP address when on Wifi! So I definitely dont want to hit the internet, I want it all routed in my local machine.

    What works:
    What fails:
    After trying for a few hours with Parallels, I did install VirtualBox with Win10 (default setup), and got Edge to connect via the VirtualBox loopback address (address that points at your host machine): http://10.0.2.2:4200/ and it totally works! So I know the MacOSX & webserver are open and accessible. It was so easy, no need to change firewall in Win10 either.

    Looking (Googling) for similar "loopback" address for Parallels now, but only seeing 10.211.55.2 mentioned (which I tried already).

    Parallels tech support suggested to shut down Win10, reconfigure Parallels machine to "Settings / Hardware / Network / Source: Default Adaptor", and then "check if you can access the localhost URL now", which still didn't work - but did change the result of ipconfig to 192.168.110.129 and 192.168.110.254. Alas, neither http://192.168.110.129:4200 nor http://192.168.110.2:4200 work
     
    Last edited: Sep 20, 2017
  8. Elric

    Elric Parallels Developers

    Messages:
    1,651
    Hi, I can suggest a remote session. I don't see any reason why "http://10.211.55.2:4200/" doesn't work. I expect that session will take about 30 minutes. Send me your email address via forum's private message if you are interested. I'm available 12.00-17.00 UTC working days
     
    kevinm17 likes this.
  9. kevinm17

    kevinm17 Bit Poster

    Messages:
    2
    Just got off meeting screen-share with the parallels team member (thank you, you were awesome!!).

    So.... Running a simple Python webserver on the MacOSX host via python -m SimpleHTTPServer totally works. I can connect using Parallels/Windows10/Edge to http://10.211.55.2:8000, so we know that Parallels can connect to my localhost just fine, nothing wrong there..

    Turns out that Angular2's (angular-cli's actually) ng serve only accepts connections on localhost and 127.0.0.1, which is why the VM couldn't connect, it's coming from 10.211.55.2 (when in Shared Network mode). Looks like we need to configure Angular2 (or 'ng serve') to accept this address by using the --host flag:

    ng serve --host=0.0.0.0 --port 4200 # allow access for any IP address

    netstat -an | grep 4200 would have shown me that port 4200 only works with 127.0.0.1:

    simple python webserver:

    > netstat -an | grep 8000
    tcp4 0 0 *.8000 *.* LISTEN

    angular2 webserver running with 'ng serve':
    > netstat -an | grep 4200
    tcp4 0 0 127.0.0.1.4200 127.0.0.1.58469 ESTABLISHED
    tcp4 0 0 127.0.0.1.58469 127.0.0.1.4200 ESTABLISHED
    tcp4 0 0 127.0.0.1.4200 *.* LISTEN

    As an aside:
    Why did Virtualbox/Windows10/Edge connect to Angular2 using their 'loopback' address
    http://10.0.2.2:4200 when Parallels/Windows10/Edge could not? Virtualbox must do something differently than Parallels then, spoofing localhost, or something, when using their loopback 10.0.2.2 address. Might be a nice feature for Parallels to have a magic loopback address that 'just works' like Virtualbox's does...... Even if not enabled by default, maybe we could enable it in the Hardware / Network area...
     
    Last edited: Sep 22, 2017
  10. Ajith@Parallels

    Ajith@Parallels Parallels Support

    Messages:
    1,838
    Hi kevinm17,
    We appreciate you for sharing the workaround you have found with developer here for other user. You can share your feature request on this thread.
     
  11. Elric

    Elric Parallels Developers

    Messages:
    1,651
    Let me describe the problem.. When connection is initiated from localhost to 127.0.0.1, the source address is also 127.0.0.1. When connection is initiated from VM - the source address is 10.211.55.x. Ng in default configuration accepts connection only from 127.0.0.1

    Technically it is not difficult to use 127.0.0.1 address while connection is initiated from Virtual Machine to 10.211.55.2 address. But we are not sure that it is a good idea. Virtual Machine is separate network entity and spoof its address with 127.0.0.1 could make things greatly perplexed.
     
  12. EricS13

    EricS13 Bit Poster

    Messages:
    2
    Thank you for posting this Kevin, I had the EXACT same issue with my Angular CLI app! Fix worked like a charm.
     
  13. Sulaiman

    Sulaiman Bit Poster

    Messages:
    1
    It will be really cool if you can list how they managed to solve this issues ?
     
  14. EricS13

    EricS13 Bit Poster

    Messages:
    2
    UPDATE for those who might be affected: Connectivity suddenly stopped working for me. At first I blamed a patch that had been applied the night before, but then it dawned on me I was on our corporate VPN. Once I disconnected it went through fine.
     
  15. FrodoN

    FrodoN Bit Poster

    Messages:
    5
    That worked for me!
     
  16. TJG

    TJG Bit Poster

    Messages:
    3
    For anyone trying to connect from Parallels to a Rails application running on localhost:3000 under Mac OSX, you need to launch the rails server with the "-b 0.0.0.0" option. e.g.
    bundle exec rails server -b 0.0.0.0
    The --binding flag for rails server needs to be set in order for the server to accept requests from ANY network interface.

    T
     
  17. ChrisS1

    ChrisS1 Bit Poster

    Messages:
    4
    I have Parallels Desktop 11 for Mac but I don't seam to have the network tab under Parallels > Preferences.
    Screen Shot 2018-04-17 at 11.25.37.png

    I have accessed ipconfig on the VM (wind10) but can't access 10.211.55.1.
    Screen Shot 2018-04-17 at 11.28.13.png
    Any suggestions would be grateful.
     
    Last edited: Apr 17, 2018
  18. Elric

    Elric Parallels Developers

    Messages:
    1,651
    Hi, usually no need to change parallels network configuration; please describe what would you like to change

    The address of mac-host is 10.211.55.2, the x.1 - is internal address of parallels nat-server
     
  19. ChrisS1

    ChrisS1 Bit Poster

    Messages:
    4
    Thanks, I can access my localhost on 10.211.55.2 (I have MAMP running).
    However I want to access an angular-cli build app at port 4200. I've edited my build call to include
    Code:
    'ng serve --host=0.0.0.0 --port 4200'
    to allow access from any ip. However I can't access it. Getting a 'refused to connect' in chrome and a 'page can't be displayed' message in IE.

    Trying at: 10.211.55.2:4200 on the VM
    Strangely enough, 10.211.55.2:4200 doesn't work locally either on my mac. I'm using http://localhost:4200 to access the angular-cli app locally (mac)
    Yet 10.211.55.2 works fine locally.. just not with the port addition

    The angular app is the latest angular-cli

    UPDATE: I changed the build call to
    Code:
    "start": "ng serve --host 0.0.0.0"
    running
    Code:
    npm start
    and the app is now accessible at: 10.211.55.2:4200
     
    Last edited: Apr 17, 2018
  20. Elric

    Elric Parallels Developers

    Messages:
    1,651
    Good news, have a good day.
     

Share This Page