5986Port
TCPProtocol
wsmansIANA service nameWindows networkingCategory
Port range
5986 is a registered port (range 1024–49151). Any user can bind to it; IANA records which service registered the number.
Security
Port 5986 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.
Open port 5986 in a firewall
ufw sudo ufw allow 5986/tcp iptables sudo iptables -A INPUT -p tcp --dport 5986 -j ACCEPT firewalld sudo firewall-cmd --permanent --add-port=5986/tcp Windows New-NetFirewallRule -DisplayName "WinRM HTTPS 5986" -Direction Inbound -Protocol TCP -LocalPort 5986 -Action Allow
Check if port 5986 is open
nc -vz example.com 5986 Test-NetConnection example.com -Port 5986 # PowerShell sudo ss -tulpn | grep ':5986 ' # what is listening locally (Linux)