Free tech learning for everyone, from basics to pro

Port 137-139: NetBIOS (NetBIOS name, datagram and session services)

What port 137-139 (UDP/TCP) does, the security risks of leaving it open, and how to secure and test it.

Port137-139
TransportUDP/TCP
ServiceNetBIOS name, datagram and session services (NetBIOS)
EncryptedNo

What is port 137-139?

NetBIOS (UDP 137, UDP 138, TCP 139) is an old Windows naming and file sharing system that came before SMB over port 445.

Common uses

  • Very old Windows file sharing and network browsing

Security risks

  • Leaks computer, user and domain names
  • NBT-NS poisoning attacks that capture password hashes on local networks

How to secure port 137-139

  • Disable NetBIOS over TCP/IP on modern Windows networks
  • Disable LLMNR and NBT-NS through Group Policy
  • Block these ports at the internet edge

How to check if port 137 is open

WhereCommand
Scan from another machinenmap -p 137 <host>
Windows (PowerShell)Test-NetConnection <host> -Port 137
Linux (what is listening)sudo ss -tulpn | grep :137
Windows (what is listening)netstat -ano | findstr :137

Only scan systems you own or have permission to test.

Example: block it at the internet edge (Cisco)

For a service that should stay inside your network, deny it on the internet-facing interface. Put the rule before any broader permit statements:

ip access-list extended INTERNET-IN
 remark Block NetBIOS from the internet
 deny   tcp any any eq 137
 permit ip any any
!
interface GigabitEthernet0/0
 ip access-group INTERNET-IN in

In a real network the final line would be your normal inbound policy, not "permit ip any any". Build and check rules with the ACL builder.

Related ports

Frequently asked questions

What is port 137-139 used for?

Port 137-139 (UDP/TCP) is used by NetBIOS name, datagram and session services (NetBIOS). NetBIOS (UDP 137, UDP 138, TCP 139) is an old Windows naming and file sharing system that came before SMB over port 445.

Is it safe to open port 137-139?

Only if the service needs to be reached and is configured securely. Disable NetBIOS over TCP/IP on modern Windows networks.

How do I check if port 137-139 is open?

From another computer, run nmap -p 137 followed by the host address. On the server itself, ss -tulpn on Linux or netstat -ano on Windows shows whether anything is listening on 137.

Learn more: TCP, UDP and ports explained and firewall basics.

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown