How are ports "shared" in bridged mode?

Discussion in 'Parallels Desktop for Mac' started by MilSF1, May 2, 2006.

  1. MilSF1

    MilSF1 Bit poster

    Messages:
    3
    Trying to build an ultimate QA machine here, but can't get the money for a new Mac without a few things known first.

    I would have many guest machines running Linux and Windows; hopefully more than one at a time. The issue is that they will all be running Apache - as will the host OS (OSX). If I browse to the IP for the machine, which OS will get the request? I'm hoping the host OS, but all I really need is just predicatable. Also, if the host OS isn't listening, which of the guest OSes would get the request for port 80?

    I wish I could do the host-only networking that beta 6, but most of the software on the guest machines needs to be able to "phone home" for periodic license checking. Luckily their control interfaces are all on separate ports, so I'm would guess that there would not be conflicts there. Ie. If the machine's outward-facing IP was 252.2.2.2, then 252.2.2.2:1234 would hit the guest OS running the software that listens to that port, and 252.2.2.2:5678 would go to the other guest OS running different software that listens to that port.

    Anyone running beta 6 care to comment? This would go a long way towards helping me get that new 17" MacBook [drool] ;)
     
  2. joem

    joem Forum Maven

    Messages:
    1,247
    Off topic response -- rant

    Sorry about the soapbox here, but if it's your software that you're testing that has to "phone home" on a regular basis for license checking, you are making truly evil software. How dare vendors put up roadblocks that treat honest users like criminals until they repeatedly prove they aren't?

    Of course, if this isn't your software, you might consider buying something else.

    If I have a choice between annoying "security" intalled by a vendor, solely for their benefit, that gets in my way, and a more open product, even one with fewer features, I'll go with the open version.

    I'm not a criminal, and I'm seriously offended by the implication that I have to prove I'm not before I can use software. I gnash my teeth every time I install XP, and MS's "authentification" requirement is one reason I love my Mac.

    /rant
     
  3. chrisp

    chrisp Member

    Messages:
    29
    Ports are bound to an IP Address

    This is the way I understand it to work. If your host has an IP Address of 192.168.0.1 and your guest has an IP Address of 192.168.0.2 and both of them are listening on port 80 then to connect to your host you would have to use 192.168.0.1:80 and for the guest it would be 192.168.0.2:80. Likewise if you have have port 81 on the host and port 82 on the guest then to connect to the guest you cannot use 192.168.0.1:82. When creating a socket which is going to listen for connections you have to bind it to an IP Address. Since the guest operating system has no idea about the host's IP Address I do not believe that it would be able to bind to the host's IP Address.

    Now, I believe it might be a different story if you are using host only networking, but I really don't know. If internet connection sharing is on, I think in this mode the host acts something like a NAT router? Then you might be able to setup some kind of port forwarding so if your host receieves something on a particular port you can forward to one of the VM's.

    But this is all talking about something actually "phoning you" not your application "phoning home". If the applications are doing the requests then there are no issues as the application will initiate the connection and then it's no different than browsing the web form the guest, assuming there is no firewall blocking the outgoing connection.

    Hope this helps.

    - Chris
     
  4. MilSF1

    MilSF1 Bit poster

    Messages:
    3
    Modified question

    I guess my real question should be whether or not the host and guests can share a single, "real" address without using OSX sharing. We don't have many static IPs, and if I had to get one for each of my guests, I would be taking them all.

    The software on the guests are very IP sensitive. I.e, no NATed IPs, etc. One of those, "You tell me your IP, and I'll check to see if that's what it should be" kind of things. And these companies do not give out 198.168.0.1 licenses :D
     
  5. serv

    serv Forum Maven

    Messages:
    817
    MilSF1,

    Non-private IP addresses can not be shared by distinct machines, including virtual ones.
    NAT (which OS X sharing is) can make it look so for the outside world, but the machine itself would know its actual (private subnet) address. As the software you're using is most probably sending its IP address explicitly, you're stuck. After all, the whole idea of such license check is to limit unauthorized software use.
     

Share This Page