none
netsh portproxy not working after reboot RRS feed

  • Question

  • Hello everybody,

    we are using an embedded computer running Windows Embedded Standard (based on Win7) as part of an embedded system. In our current case, the operating system has to forward a port from the connected electronics port to the outside world.

    We have tried using the netsh portproxy-functionality provided by Windows and found it to be working when using the following command line:

    netsh interface portproxy add v4tov4 listenport=[PORT] listenaddress=[LISTENADDRESS] connectport=[PORT] connectaddress=[CONNECTADDRESS]

    This works very well for us when activating it with a running windows instance. The problem that we are experiencing tough is that after rebooting the machine, the configuration seems to be intact, which we observe by using the show all command:

    netsh interface portproxy show all

    Even tough the configuration is displayed, the actual forwarding doesn't. All attempts to use the designated port fail after the reboot. When we delete and add the configuration again after the reboot, everything works fine again.

    It this behavior a known issue with windows or is there a configuration that has to be acknowlegded so the portproxy-functionality also works after a reboot?

    Thank you very much for any answers,

    Christian


    • Edited by pkwpeter Tuesday, May 21, 2013 12:58 PM Enhanced description of problem.
    Tuesday, May 21, 2013 12:57 PM

All replies

  • Hm... You might check the running Services.
    E.g. for adressing IP-Adress DHCP must be running otherwise the command will fail.

    Maybe there is some Services that gets startet while the configuration is running and working but after reboot and without reentering the command some Kind of Services is 'manuel' and not running.

    Just a wild guess but I didn't know either that dhcp Service has to be running for set an IP adress.


    Windows Embedded Developer and Scripting Guy //Germany (Preparing a blog about Windows Embedded Standard)

    Tuesday, May 21, 2013 3:16 PM
  • Hi KNARZ,

    I checked changes to the active services, but there are notable differences between before and after applying the portproxy after a reboot.

    Wednesday, May 22, 2013 12:06 PM
  • I meet the exactly same problem, each time, have to delete the proxy and add a new one, then in netstat, I can find port listening on specific port; otherwise, even netsh show correct port mapping, the system do not have daemon listening.
    Tuesday, December 10, 2013 6:28 PM
  • Hi pkwpeter.

    You have solved the problem? If so, how?

    Wednesday, December 25, 2013 4:57 AM
  • I'm also still interessted if someone found a solution. Seems to be a bug...
    A possible workaround could be some script that run does the changes on every boot. Executed by Task-Scheduler or Logonscript.


    Windows Embedded Developer and Scripting Guy //Germany (http://www.wesnext.com)

    Wednesday, January 8, 2014 8:44 PM
  • Hello,

    I have the same problem (Windows 7 64bit). When I reboot the computer the entry is stays stored and with netsh interface portproxy show all I see the settings. But after reboot the forwarding does not work.

    Then I must remove the rules and add them again - then it works up to next reboot.

    Is there in meantime any solution available?

    Moreover, I miss the UDP forwarding - I hope MS will implement this feature! ;-)
    Tuesday, January 26, 2016 1:46 PM
  • From my testing, I could reproduce the issue with port forwarding not working upon stop and start of the VM in Azure. When I stopped specifying the listenaddress when I setup the port forwarding then it seemed to survive a reboot:

    netsh interface portproxy add v4tov4 listenport=81 connectport=81 connectaddress=127.0.0.1


    http://artisconsulting.com/Blogs/GregGalloway

    • Proposed as answer by FrakonX Wednesday, October 24, 2018 6:51 AM
    Monday, February 1, 2016 4:18 PM
  • Check your “IP helper” status in service list
    Thursday, September 14, 2017 8:48 AM
  • I am facing same issue too, as workaround just i restart "IP Helper" service and Port Forwarding working again.

    If anyone find a solution for this just notify us.


    Thanks & Regards Ahmed Amin

    Tuesday, December 5, 2017 8:25 PM