locked
port forwarding not working on windows7 Professional RRS feed

  • Question

  • Hi Team,

    I have one Windows7 Professional Service Pack 1 Virtual Machine.

    Operating System : 32 bit

    ipconfig /all command shows that it has one interface and both IPv4 and IPv6 address is bind.

    IPv4 address : 198.18.225.86

    IPv6 address : Global IPv6 address so not writing here

    I have install cygwin so I can access through ssh.

    I have already stopped firewall in the machine.

    In the same machine, one of my application is listening on 127.0.0.1 (localhost) and port 41000.

    executed netstat -nao | grep 'Address\|41000' and found that its listening.

      Proto  Local Address          Foreign Address        State           PID
      TCP    127.0.0.1:41000        0.0.0.0:0              LISTENING       3460

    Now, I want that if any request comes on 40000 port for an ip address 198.18.225.86, then it should forward it to localhost (127.0.0.1):41000 port.

    For this, I executed command:

    netsh interface port add v4tov4 listenport=40000 connectport=41000 connectaddress=127.0.0.1

    OR

    netsh interface port add v4tov4 listenport=40000 listenaddress=0.0.0.0 connectport=41000 connectaddress=127.0.0.1

    OR

    netsh interface port add v4tov4 listenport=40000 listenaddress=198.18.225.86 connectport=41000 connectaddress=127.0.0.1

    After that,

    I executed 'netsh interface portproxy show all'

    Listen on ipv4:             Connect to ipv4:

    Address         Port        Address         Port
    --------------- ----------  --------------- ----------
    0.0.0.0         40000       127.0.0.1       41000

    its shows correct entry but when I am executing 'netstat -nao | grep "Address\|40000"' it doesn't show any entry.

    I tried to do telnet from one of the linux machine, 198.18.225.86 40000 and 41000 but getting connection refused error.

    Any idea, how I can solve the issue ?

    Thanks & Regards,

    Parth Shah.

    Sunday, July 17, 2016 3:38 AM

Answers

All replies

  • Hi contactparthshah,

    According to your description, if you have configured the rules in Windows Firewall, I suggest that we could try configure again. Then we could check if the ports that you are using is blocked so you used a different range of ports.

    Also please check the link below about the Netsh commands.

    https://technet.microsoft.com/en-us/library/cc731068(v=ws.10).aspx

    Hope it will be helpful to you


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Wednesday, July 20, 2016 9:50 AM
  • Hi,

    I have disabled the firewall then also will it come in picture ?

    The interesting thing is, Passport Utility is working as port forwarding but netsh command is not working. :(

    Thanks for sharing the link and from link I believe that, I have configured the netsh command correctly.

    Kind Regards,

    Parth Shah.

    Wednesday, July 20, 2016 12:51 PM
  • Nobody from microsoft tech support able to solve the problem ?
    Sunday, July 24, 2016 6:04 AM
  • Hi contactparthshah,

    Netsh need some IPv6 libraries to configure the port proxy feature. You could do cleanup using netsh interface portproxy reset or netsh interface portproxy delete

    Also please check the link below to get more information.

    http://www.sevenforums.com/network-sharing/221054-port-forwarding-redirecting-not-port-opening.html

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Hope it will be helpful to you


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, August 3, 2016 8:11 AM