Port Forwarding from Windows 7 to Virtual PC 2007


  1. Posts : 13
    Win 7 , Linux Ubuntu
       #1

    Port Forwarding from Windows 7 to Virtual PC 2007


    Hello,

    I have been working on the following problem for the past two days, and I am sure there must be a simple solution for it.

    I have Windows 7 installed on my PC. I also have Virtual PC 2007 installed, and I am running a Virtual Server running Windows 2003 and IIS.

    What I want to achieve is to direct http traffic to my virtual machine. So far, I have set up the router to forward http traffic to my PC, so now I just have to somehow set up my PC to forward to my Virtual Server.

    I would be happy to receive any suggestions/comments.
    Thanks in advance,
    Lil.
      My Computer


  2. Posts : 5,941
    Linux CENTOS 7 / various Windows OS'es and servers
       #2

    Hi there

    The first thing is of course you'll have to define specific IP addresses for the machines you need to port forward to.

    This means -

    1) set DHCP OFF in the router.
    2) set Networking option in the Virtual Machine to BRIDGED (or NAT)
    3) Assign specific LAN IP addresses to HOST and Virtual machine.
    4) Now set your port forwarding in the router to the INTERNAL LAN address of your Virtual machine.

    If you use something like No-IP - Dynamic DNS, Static DNS for Your Dynamic IP its free BTW -- you can also access your VM remotely from OUTSIDE your LAN too.

    Here's the setup from my router -- most are similar -- usually you'll find the setup in "Firewall" / Ports or some other setting for your router.




    Cheers
    jimbo
    Attached Thumbnails Attached Thumbnails Port Forwarding from Windows 7 to Virtual PC 2007-lansetup.png  
      My Computer


  3. Posts : 13
    Win 7 , Linux Ubuntu
    Thread Starter
       #3

    Thanks! I was able to set it up now I think. I saw that my virtual machine is visible in the router, so I could just set it up to forward port 80 to my virutal machine. I think this is fine now.

    Now I have another problem. I have a test webpage "index.html" on my server, which I can see when I type localhost/index.html on my virtual server. From my PC I can see the test page by typing 192.168.0.26/index.html. This also works as expected.

    The problem now is - how do I make this page visible from the outside? Shouldn't it work by using the router IP and then the filename, i.e. 188.222.x.x/index.html ? I have disabled the router firewall, so it allows incoming traffic. Is there anything else I have to do - because all it says in firefox is that:

    The connection has timed out
    The server at 188.222.x.x is taking too long to respond.
    I am not sure what else I have to set in order for it to work properly.
    Thanks in advance,
    Lil.
      My Computer


  4. Posts : 5,941
    Linux CENTOS 7 / various Windows OS'es and servers
       #4

    Hi there

    to make this page visible from the OUTSIDE you need to know the "Routers" IP address -- this is the IP address that the public internet sees you from.

    This is quite difficult to test from INSIDE your LAN as the network usually won't allow you to ping or connect to an Internet address that is resolved by your router. You will be able to Ping the gateway which is normally something like 192.168.0.1 or 192.168.2.1 without any problem but pinging you actual IP address from within the LAN itself is likely to be blocked by your router --sometimes you can set the router to allow it BTW.

    The best way for testing your server from OUTSIDE your LAN is to connect via a mobile USB data card or if you have a colleague next door or can get on a computer on a different LAN then try it that way.

    Cheers
    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:21.
Find Us