I am on Windows 10 21H1, and I use OpenVPN to connect to office.
Sometimes I ran into this error:
MANAGEMENT: Socket bind failed on local address [AF_INET]127.0.0.1:25340
When it happens, I can find a line indicating that the port is in the exclusion range, like blow.
PS C:\> netsh interface ipv4 show excludedportrange protocol=tcp
Protocol tcp Port Exclusion Ranges
Start Port End Port
---------- --------
25305 25404
There are many ranges, I have omitted them.
I know this error is related to Hyper-V (https://superuser.com/a/1586869/614603), but I need WSL2, which is based on Hyper-V. Besides, I don't want to change dynamic TCP port range since I run many things :P
I am wondering if I can change the local port or port range used by OpenVPN.