Port Forwarding in Windows

If you are running a webserver in VM within windows and want to host it by masking its real IP. Then the solution would be to do port forwarding.
Below command works on Windows XP and later.

netsh interface portproxy add v4tov4 listenport=80 listenaddress=192.168.2.10 connectport=80 connectaddress=192.168.2.20

Windows Host: 192.168.2.10
Guest VM: 192.168.2.20

forwarding port 80 [http] requests from windows host to guest VM. similarly we can do this with other ports as well.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s