Port 138
netbios-dgm · TCP/UDP
| Range | System/well-known port (0–1023) |
|---|---|
| Protocol | TCP/UDP |
| Service | netbios-dgm |
Frequently asked questions
What is port 138 used for?
Port 138 is registered with the IANA for netbios-dgm (TCP/UDP). Description: NETBIOS Datagram Service.
Is port 138 a well-known port?
Yes. Port 138 is in the range 0–1023 (system or well-known ports). On Linux and macOS only privileged processes may bind to these ports.
How do I check whether port 138 is open?
Locally on Linux with ss -tulpn | grep ':138\b', on Windows with netstat -ano | findstr :138. To test a remote host use Test-NetConnection <host> -Port 138 in PowerShell or nc -zv <host> 138 on Linux/macOS.
How do I open port 138 in the firewall?
Ubuntu/Debian (ufw): sudo ufw allow 138/tcp. Fedora/RHEL (firewalld): sudo firewall-cmd --add-port=138/tcp --permanent, then firewall-cmd --reload. Windows (PowerShell as administrator): New-NetFirewallRule -DisplayName "Port 138" -Direction Inbound -Protocol TCP -LocalPort 138 -Action Allow.
IANA registry entries
| Protocol | Service | Description (IANA) |
|---|---|---|
| TCP | netbios-dgm | NETBIOS Datagram Service |
| UDP | netbios-dgm | NETBIOS Datagram Service |