139Port
TCPProtocol
netbios-ssnIANA service nameWindows networkingCategory
Port range
139 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.
Security
Port 139 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 139 in a firewall
ufw sudo ufw allow 139/tcp iptables sudo iptables -A INPUT -p tcp --dport 139 -j ACCEPT firewalld sudo firewall-cmd --permanent --add-port=139/tcp Windows New-NetFirewallRule -DisplayName "NetBIOS Session 139" -Direction Inbound -Protocol TCP -LocalPort 139 -Action Allow
Check if port 139 is open
nc -vz example.com 139 Test-NetConnection example.com -Port 139 # PowerShell sudo ss -tulpn | grep ':139 ' # what is listening locally (Linux)