I have a Windows application that needs to use ports 50005
and 50006
but it is being blocked.
I see the following when I run netsh int ip show excludedportrange protocol=tcp
:
Protocol tcp Port Exclusion Ranges
Start Port End Port
---------- --------
5357 5357
49709 49808
49809 49908
49909 50008
50009 50108
50109 50208
50280 50379
* - Administered port exclusions.
So something on my machine is reserving ports 49909
to 50008
, which is presumably what is causing my application to fail. I've tried deleting this excludedportrange
with the following command:
netsh int ip delete excludedportrange protocol=tcp numberofports=100 startport=49909
But I see an error Access is denied.
, which makes me think that whatever is reserving this ports is actively running, but I have no idea what that could be.
What's also weird is that after running that command, even though I saw an error, if I reboot the excludedportrange
will be different.
As a sanity check I've also run resmon.exe
and confirmed that there is nothing running on ports 50005
and 50006
.
How can I tell what is adding the excludedportrange
?
EDIT: I've narrowed this down to Hyper-V. If I disable Hyper-V then those ports are not excluded.