10

The Windows IP Helper Service (iphlpsvc) is using port 9200 on my system (Windows 10), which is also used by Elasticsearch by default. Obviously, I could just set Elasticsearch to use another port, but it's a bit annoying since ES uses 9200 everywhere else.

I was wondering if there is any way to configure iphlpsvc to use another port? When I stop iphlpsvc and restart it after starting ES on 9200, it doesn't seem to be blocking any other port (based on Get-NetTCPConnection -OwningProcess 28824, 28824 being the new PID), which makes me think it's not running properly.

I am also wondering if I am the only one experiencing this conflict between Elasticsearch and iphlpsvc on Windows - the only other mention of this issue I could find is here: https://forums.docker.com/t/solved-startup-of-containers-fails-on-local-port-binding/18654

  • I am experiencing the same issue but on port 3000 which is used by my react development webserver so I appreciated if somebody share with us how to change the default Helper IP listening port without disable the service itself. – Delmo May 09 '22 at 15:31

2 Answers2

22

I just spent quite a bit of time resolving a similar issue, hopefully this will help some others who are struggling with the same.

The Windows IP Helper service (behind svchost) is just that: just a helper. It doesn't bind or reserve any ports by itself out of the box - it only starts doing that because other applications ask for it. In my case, it was netsh, I had setup port forwarding to WSL2 (just like @amra above) and forgot about it. It might be that this also solves your problem.

The way to figure out whether netsh is making IP Helper (iphlpsvc) reserve ports (and forward them to e.g. WSL) is the following:

In an Powershell prompt (as administrator, run): netsh interface portproxy show all

If the port that you need (which iphlpsvc is blocking) is on that list, then netsh is your main culprit (not iphlpsvc). Use:

netsh interface portproxy delete help

to figure out how to delete the line. (it needs the port number and the listening address as parameters). In my case, the following worked:

netsh interface portproxy delete v4tov4 listenport=27117 listenaddress=0.0.0.0

After running this the port claim was gone and I could keep the service running + startup the previously-blocked application normally.

If iphlpsvc is using 'your port', you have to figure out which other application told iphlpsvc to do so. If anybody knows of other applications that are likely culprits, please add them here :)

  • You can find more documentation @ https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-interface-portproxy#show-v4tov4 – Richard Muvirimi Nov 15 '22 at 17:49
  • Thank you @pietervanwijngaarden this was exactly my problem too - In my case I had left around a port forward for postgres from when i was running in WSL which stopped the windows version from starting. Ironically I changed from running in wsl to windows as the port forwarding was so flaky – Jamie Cook Jan 08 '23 at 23:33
2

I don't know of a way to reconfigure the Windows IP Helper Service. It is probably impossible to change its listening port.

However, this service is not absolutely required. It effectively allows connections to take place across various Windows 10 networking protocols, like IPv6 and Port Proxy among others. It is mainly useful for running remote databases or connecting over IPv6.

If you can live without IPv6 and various other services, the simplest solution will be to disable this service and stop it from running.

  • Run Start > Services

  • Scroll down the list to find "IP Helper"

  • Double-click it and select Properties

  • To disable the service temporarily, select Stop > Apply > OK

  • To disable the service permanently, set the Startup Type to Disabled from the drop-down menu, then select Apply > OK.

  • Restart Windows.

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • `IP Helper` service is needed, when using `netsh interface portproxy`. Without this service port forwarding to my WSL2 machine doesn't work. – amra Sep 13 '21 at 10:32