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
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
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.
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.