HTTPfy

Port 138 (NetBIOS Datagram Service)

NetBIOS datagrams, used by the old Windows Browser service.

Well-known (system) port, 0-1023 UDP Windows networking Localhost or LAN only

Port 138 is normally used over UDP; the checker tests TCP only, so a "filtered" result does not mean the UDP service is down.

What port 138 is used for

NetBIOS datagrams, used by the old Windows Browser service.

Security: should port 138 be open?

Localhost or LAN only. Block at the perimeter; rarely needed on modern networks.

IANA assignment

Service nameProtoDescriptionAssigneeReference
netbios-dgm TCP NETBIOS Datagram Service - -
netbios-dgm UDP NETBIOS Datagram Service - -

Check what is listening on port 138

Linux: UDP 138
sudo ss -ulnp 'sport = :138'
Linux / macOS: which process owns the port
sudo lsof -nP -i :138
Windows (Command Prompt)
netstat -ano | findstr :138
Windows (PowerShell)
Get-NetUDPEndpoint -LocalPort 138

Test it from outside

UDP probe (no reply does not prove it is closed)
nc -vzu -w 5 HOST 138

Block port 138 in the firewall

ufw
sudo ufw deny 138/udp
iptables
sudo iptables -A INPUT -p udp --dport 138 -j DROP
nftables
sudo nft add rule inet filter input udp dport 138 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'Block UDP 138' -Direction Inbound -Protocol UDP -LocalPort 138 -Action Block

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.