Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have my main machine running Win7, and it hosts a virtual PC, that's set up to do networking via NAT. If I want my VM to have inbound access to certain ports, would I tell my router to open up those ports to the IP of my physical machine?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Not sure how virtual PC works, but in VMware, you can set your VM to do networking via a bridged mode. That means that the VM will appear to be directly connected to your router and you should check at your router settings that the VM gets its own IP address this way. Then you can set up port forwarding at your router for the VM's IP address as though it were another computer on the network.

share|improve this answer
    
This is what I ended up doing...turns out to be faster network access than doing NAT as well. –  Jonas Sep 20 '10 at 22:16

I am with Fideli as far as Bridged goes and this is the way I would recommend to do it.

Bridged mode treats any virtual machine like a physical machine to the rest of the network so if you use this mode, it has it's own IP and you would set the router like you would for any other service being hosted.

However, NAT works perfectly well - you simply have to set the router to forward the port to the HOST machine, then usually there should be some sort of utility that allows you to forward the port to the guest.

For example, VMware Workstation comes with Virtual Network Editorthat allows you to map any port to any port:

alt text

share|improve this answer
    
I don't know that MS' virtual PC has that network editor thing, but I just ended up doing it in bridged mode anyway. Seems to be faster than NAT for me. –  Jonas Sep 20 '10 at 22:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.