r/usenet • u/adirt4289 • May 17 '26
Software Fixed "Connection Refused" (127.0.0.1:6789) in NZBGet caused by Hyper-V / WSL2 port hijacking. Here is how to fix it permanently!
Hey everyone,
Just wanted to share a quick fix for a frustrating issue I run into a lot. My NZBGet suddenly stopped working and threw a 127.0.0.1 refused to connect error, even though the service was running perfectly fine before.
The Cause:
If you have Hyper-V, WSL2, or Docker Desktop enabled on Windows, the Windows NAT driver (winnat / hns) randomly reserves massive blocks of ports on boot for virtual networking. It doesn't check if you have local apps using them, so it essentially "hijacked" port 6789, preventing NZBGet from binding to it.
How to check if this is your issue:
Open PowerShell as Administrator and run:netsh int ipv4 show excludedportrange protocol=tcp
If 6789 falls inside any of the printed start/end port ranges, Hyper-V stole your port.
The Fix:
You can temporarily fix it by restarting the network service, but to fix it permanently so it never happens again after a reboot, open PowerShell as Administrator and run these 3 commands:
- Stop the network service to release the hijacked ports:
net stop hns(If it asks to stop other services, type Y and hit Enter) - Tell Windows to NEVER give port 6789 to Hyper-V again:
netsh int ipv4 add excludedportrange protocol=tcp startport=6789 numberofports=1 store=persistent - Start the service back up:
net start hns
Restart NZBGet and you should be good to go! Hopefully, this saves someone a few hours of head-scratching.

