docker windows bind: An attempt was made to access a socket in a way forbidden by its access permissions.
show reserved pool
netsh int ipv4 show excludedportrange protocol=tcp
undocumented key in registry
rem Modify Dynamic Port Range for Development Users dism /online /get-features | find /i "Microsoft-Hyper-V" && ( rem Modify Dynamic Port Range start /wait "" netsh int ipv4 set dynamicport tcp start=20000 num=16384 start /wait "" netsh int ipv4 set dynamicport udp start=20000 num=16384 rem Add Registry Key start /wait "" reg add HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /d 0 /f goto :eof ) rem Set range to default start /wait "" netsh int ipv4 set dynamicport tcp start=49152 num=16384 start /wait "" netsh int ipv4 set dynamicport udp start=49152 num=16384 rem Remove Registry Key start /wait "" reg delete HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /f
Disable hyper-v (which will required a couple of restarts) dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
When you finish all the required restarts, reserve the port you want so hyper-v doesn't reserve it back netsh int ipv4 add excludedportrange protocol=tcp startport=50051 numberofports=1
Re-Enable hyper-V (which will require a couple of restart) dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
when your system is back, you will be able to bind to that port successfully.