How do I port-forward?


  • I have computer X which I need it to connect to computer Z thru computer Y

    Computer X and Y are in the same subnet(

    Computer Z is in the subnet(

    Computer Y should listen on some port which will redirect to some port on Computer Z

    How do i do that?


    Saturday, November 13, 2010 8:48 PM


  • For computer X to connect to Z, you'll either need to Route through Y or enable IP forwarding on Y.  The only requirement is that Y will need two network cards and each card will be plugged into each segment.

    If you all you require is simple forwarding you can use these articles to help you set that up on Y.

    How to Enable IP Forwarding on Windows Server 200x

    How to Enable TCP/IP Forwarding in Windows XP

    You do not set up any ports to listen on.  You have to configure X's default gateway to point to the Ip address of the NIC on Y (on the same segment).  You configure Z's default gateway to point to Y's NIC (on the same segment)

     If you require something more complex, you could install a Server OS on Y, and hide Z behind via NAT services.  In this scenario, you would NOT be routing, but indeed port forwarding.  You expose the port on computer Y which maps back to a port on Z.  However, Z, would not be able to directly communicate with X.  This design would be very similar to a private network protected the internet by a NAT router.

    Visit:, an IT Knowledge Base.
    Sunday, November 14, 2010 12:51 AM