VMware Communities
MattyR
Contributor
Contributor

Port forwarding from host to guest

Dear All

Initially may i apologise for what must seem like a very poor question to ask, unfortunately I am technically inept it seems.

I am one to scour and search for answers however have not been able to locate the answer I am after.

My host computer is running Win 8 Pro and my VM is running Win 8 Enterprise.

I can port forward using my host computer as the ipconfig is plain and clear with a local ip address clearly specified, however when I try in my vm the IP Address is not the same.

I appreciate it may need to be the case of configuring a setting where the host computer would receive the information on a particular port i have forwarded it for it to then be sent to my VM??

I have had a look at the technical literature, however I am afraid with my technical deficiances I cannot sort my issue out.

Again forgive me for the poorly decripted request for help, however If someone here who perhaps has a little patience whom could help that would be great.

Kindest Regards

M

0 Kudos
3 Replies
Rahulverma20111
Enthusiast
Enthusiast

This KB article gives some overview on using Port Forwarding with an example of configuring a web server. See if this helps you.

Configuring a Web server on a virtual machine that uses NAT mode networking

http://kb.vmware.com/kb/2006955

Note: Please do not consider my comments/suggestions as an official response from VMware.
0 Kudos
MattyR
Contributor
Contributor

Thanks Rahul

I have followed the steps from within the link, but now I have no network for routine surfing etc.

This is the steps I took

I have setup within my router a port forward rule of 4444

I entered that into the vmnet8 settings and added 4444 as my host port i carried out ipconfig from within the VM and gained the IP address and entered that into the virtual machine IP address box.

I then entered for my virtual machine port 80 and then gave it a description.

the two parts I was unclear with was I do not know how to give my VM a static IP address, however I do not think that should have affected anything as I kept the connection on. and secondly I am unsure if port 80 is the port my VM is set on (I do not know how to find this out.)

My thoughts being is that programs coming in via my router on 4444 would then be transfered to port 80 on my vm machine as configured using the literature you sent me.

Can you confirm the above sounds correct and also if I am using a NAT for that port what about my other ports can i set up another NAT VMnet?

Many thanks again

Matty

0 Kudos
Rahulverma20111
Enthusiast
Enthusiast

The step in the link do not cover port forwarding at the router end.

The steps in the link just shows steps to forward all traffic on one particular port on the host machine to the virtual machine.

To give an static IP address, you will have refer to the Operting system instructions.

To find the port, you will have to get info from the application which you have configured which will use the particular port.

Try this:

Rather than configuring the router for any port setting, make the setting directly in the Virtual network editor. Any traffic which comes to the host through:

<External network IP of Host>:4444

Will be forwarded to the <NAT IP of the VM>:<Port that you set in the settings as per link>

The setting is only for this VM and IP address and NAT will continue to function normally. You can still add other VMs to same NAT vmnet. It wont be affected.

Note: Please do not consider my comments/suggestions as an official response from VMware.
0 Kudos