Skip to content
Free tool · Network security · Firewall

Port Risk Lookup: what a port does and whether to block it

Port 445 is SMB, Windows file sharing directly over TCP, and port 139 is the older SMB over NetBIOS: neither should ever be reachable from the internet. Type any port number or service name to see the same answer for 125 commonly exposed ports: what runs on it, how risky it is when exposed, what to use instead, and a block rule for iptables, nftables, ufw, Windows Firewall or AWS. Or paste your nmap output and get a ranked list of what to close first.

No download, no card
Port 445 · TCP

SMB (Server Message Block, direct over TCP)

IANA service name: microsoft-ds
Criticalrisk if open to the internet
Internet-facing? Never expose it to the internet.
What normally runs on it
Windows file and printer sharing, named pipes and admin shares (ADMIN$, C$, IPC$). Every Windows machine with the Server service running listens here, and so do Samba servers and many NAS boxes. Domain controllers need it for Group Policy (SYSVOL and NETLOGON).
Why it is risky if exposed
SMB is an authenticated protocol that reaches straight into the file system and inter-process communication, and the Windows SMB server has a history of pre-authentication remote code execution bugs. Reachable from the internet it also invites password spraying, NTLM relay and data theft from open shares. Because almost every Windows machine runs it, one flaw becomes a worm path: whoever reaches 445 reaches everything that listens on it.
Known incidents
EternalBlue (CVE-2017-0144, fixed in MS17-010, March 2017) was an SMBv1 remote code execution bug that needed no login. The WannaCry ransomware worm (May 2017) and NotPetya (June 2017) used it to spread host to host over port 445. SMBGhost (CVE-2020-0796, March 2020) was a pre-authentication bug in SMBv3.1.1 compression on Windows 10 and Server versions 1903 and 1909.
Safer alternative
For remote file access use a VPN or ZTNA, a managed file-sync or cloud file service, or SMB over QUIC: SMB inside a TLS 1.3 tunnel on UDP 443, supported by Windows Server 2025 (any edition) and Windows Server 2022 Datacenter: Azure Edition, with Windows 11 clients. Microsoft also advises blocking TCP 445 outbound to the internet.

Hardening checklist

  • Block TCP 445 inbound from the internet at the edge firewall and the cloud security group. Microsoft also recommends blocking it outbound to the internet unless you need a specific cloud service such as Azure Files.
  • Remove SMBv1. It is the dialect EternalBlue attacked. It is not installed by default on Windows 10 version 1709, Windows Server version 1709 and later, but upgraded or older machines may still have it.
  • Require SMB signing (it blocks NTLM relay) and use SMB encryption for sensitive shares. Windows 11 24H2 and Windows Server 2025 require signing by default in more cases than older versions.
  • Patch Windows monthly; SMB bugs are among the ones attackers weaponise fastest.
  • Segment: workstations rarely need to accept SMB from other workstations. Use the host firewall so only file servers and domain controllers accept 445, and only from the subnets that use them.
  • If a machine does not share anything, stop and disable the Server (LanmanServer) service.

Check and harden it

Check the SMB server settings (PowerShell, as admin)
Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol, EnableSMB2Protocol, RequireSecuritySignature, EncryptData
Turn SMBv1 off on the server side
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
Remove the SMBv1 feature (Windows client / Windows Server)
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
Uninstall-WindowsFeature -Name FS-SMB1
Require SMB signing
Set-SmbServerConfiguration -RequireSecuritySignature $true -Force
Is anything listening on 445 here?
Get-NetTCPConnection -LocalPort 445 -State Listen
Test from OUTSIDE your network, against your own public IP
Test-NetConnection <your-public-ip> -Port 445
nmap -Pn -p 139,445 <your-public-ip>
Samba (smb.conf): no SMB1, no port 139
[global]
   server min protocol = SMB2
   smb ports = 445
   server signing = mandatory

Ready-to-copy block rule

sudo iptables  -I INPUT -p tcp --dport 445 -j DROP
sudo ip6tables -I INPUT -p tcp --dport 445 -j DROP

Inserts a drop rule at the top of INPUT for IPv4 and IPv6 on this host. On a Linux router or gateway, use the FORWARD chain instead. Save it (netfilter-persistent save, or your distribution's equivalent) or it is lost on reboot.

125 common ports and services. Port numbers and IANA service names checked against the IANA registry. Risk ratings assume the port is reachable from the whole internet.

TL;DR

What this tool is

  • Look up 125 commonly exposed ports and services by number or name: SMB 445 and 139, RDP 3389, SSH, Telnet, databases, Docker and Kubernetes, VPNs, printers and industrial protocols such as Modbus, DNP3 and BACnet.
  • Each answer gives the protocol, the IANA service name (and says so when a product only uses the port by convention), what normally runs on it, its risk if open to the internet and why, and well-known incidents where the link is documented.
  • Every port says whether it should ever face the internet and what to use instead: a VPN or ZTNA, a gateway, SMB over QUIC, or a private endpoint.
  • Copy a block rule for iptables, nftables, ufw, Windows Firewall (New-NetFirewallRule) or AWS (security group and network ACL).
  • Paste nmap, masscan or ss output, or a plain list of ports, and get a ranked exposure report you can copy. It runs in your browser; nothing is uploaded.

SMB ports 445 and 139, in short

  • TCP 445 (microsoft-ds): SMB directly over TCP. Windows file and printer sharing, named pipes, admin shares, Group Policy. The port modern Windows uses.
  • TCP 139 (netbios-ssn): SMB inside a NetBIOS session. Legacy; mostly there for old clients, old NAS devices and SMBv1.
  • UDP 137 (netbios-ns) and UDP 138 (netbios-dgm): NetBIOS name service and datagrams, the rest of the legacy stack. They leak host and domain names.
  • UDP 443: SMB over QUIC, SMB inside TLS 1.3, for Windows Server 2025 and Windows Server 2022 Datacenter: Azure Edition with Windows 11 clients. This is Microsoft’s answer to “we need file access over the internet”.

Why 445 matters so much: SMB is an authenticated protocol that reaches straight into the file system, and the Windows SMB server has had bugs that need no login at all. EternalBlue (CVE-2017-0144, patched in MS17-010 in March 2017) was one; two months later WannaCry used it to spread from machine to machine over port 445, and NotPetya followed in June. SMBGhost (CVE-2020-0796) was another, in SMBv3.1.1 compression. Block 139 and 445 at the internet edge, remove SMBv1, require SMB signing and keep Windows patched. The full explanation is in SMB ports 445 and 139: what they do and why to block them.

Every port in the lookup

Risk is rated for a port that is reachable from the whole internet. “IANA name” is the registry entry for that number; where a product uses a port by convention (Kubernetes on 6443, Elasticsearch on 9200), the registry name is still shown so you can see they differ.

Windows, SMB and Active Directory

PortProtocolServiceIANA nameRiskInternet
445TCPSMB (Server Message Block, direct over TCP)microsoft-dsCriticalNever
139TCPNetBIOS Session Service (SMB over NetBIOS)netbios-ssnCriticalNever
137UDPNetBIOS Name Service (NBNS)netbios-nsHighNever
138UDPNetBIOS Datagram Servicenetbios-dgmHighNever
135TCPMicrosoft RPC endpoint mapper (DCE/RPC)epmapCriticalNever
593TCPRPC over HTTP endpoint mapperhttp-rpc-epmapHighNever
88TCP, UDPKerberoskerberosHighNever
464TCP, UDPKerberos password change (kpasswd)kpasswdHighNever
389TCP, UDPLDAP (and CLDAP on UDP)ldapHighNever
636TCPLDAPS (LDAP over TLS)ldapsHighNever
3268TCPActive Directory Global Catalogmsft-gcHighNever
3269TCPActive Directory Global Catalog over TLSmsft-gc-sslHighNever
9389TCPActive Directory Web ServicesadwsHighNever
5985TCPWinRM over HTTP (PowerShell Remoting)wsmanHighNever
5986TCPWinRM over HTTPSwsmansHighNever
5355UDPLLMNR (Link-Local Multicast Name Resolution)llmnrMediumNever

Remote access and admin

PortProtocolServiceIANA nameRiskInternet
3389TCP, UDPRDP (Remote Desktop Protocol)ms-wbt-serverCriticalNever
22TCPSSH (Secure Shell)sshMediumRestricted
23TCPTelnettelnetCriticalNever
2323TCPAlternate Telnet (IoT devices)3d-nfsd *HighNever
5900TCPVNC (Remote Framebuffer)rfbHighNever
512TCPrexec (remote execution)execCriticalNever
513TCPrloginloginCriticalNever
514TCPrsh (remote shell)shellCriticalNever
6000TCPX11 (X Window System)x11HighNever
1723TCPPPTP VPNpptpHighNever
1080TCPSOCKS proxysocksHighNever
3128TCPSquid HTTP proxyndl-aas *HighNever

Databases, caches and queues

PortProtocolServiceIANA nameRiskInternet
1433TCPMicrosoft SQL Serverms-sql-sHighNever
1434UDPSQL Server Browser / Resolution Servicems-sql-mHighNever
3306TCPMySQL / MariaDBmysqlHighNever
5432TCPPostgreSQLpostgresqlHighNever
1521TCPOracle Database listener (TNS)ncube-lm *HighNever
6379TCPRedisredisCriticalNever
27017TCPMongoDBmongodbCriticalNever
9200TCPElasticsearch / OpenSearch REST APIwap-wsp *CriticalNever
9300TCPElasticsearch transport (node-to-node)vrace *HighNever
11211TCP, UDPMemcachedmemcacheCriticalNever
5984TCPApache CouchDBcouchdbHighNever
9042TCPApache Cassandra (CQL)unassigned *HighNever
8086TCPInfluxDB HTTP APId-s-n *HighNever
2181TCPApache ZooKeepereforward *HighNever
9092TCPApache Kafka brokerXmlIpcRegSvc *HighNever
5672TCPAMQP (RabbitMQ and others)amqpHighNever
15672TCPRabbitMQ management UIunassigned *HighNever

Containers, Kubernetes and DevOps

PortProtocolServiceIANA nameRiskInternet
2375TCPDocker Engine API (no TLS)dockerCriticalNever
2376TCPDocker Engine API (TLS)docker-sHighNever
2377TCPDocker Swarm cluster managementswarmHighNever
6443TCPKubernetes API serversun-sr-https *HighRestricted
10250TCPKubernetes kubelet APIunassigned *CriticalNever
10255TCPKubernetes kubelet read-only portunassigned *HighNever
2379TCPetcd client APIetcd-clientCriticalNever
8500TCPHashiCorp Consul HTTP APIfmtp *HighNever
8200TCPHashiCorp Vault APItrivnet1 *MediumRestricted
9090TCPPrometheus / Cockpitwebsm *HighNever
3000TCPGrafana / development web servershbci *MediumRestricted
5601TCPKibanaesmagent *HighNever
8888TCPJupyter Notebook / JupyterLabddi-tcp-1 *HighNever

Web and application servers

PortProtocolServiceIANA nameRiskInternet
443TCP, UDPHTTPS (and HTTP/3 or SMB over QUIC on UDP)httpsLowCan be public
80TCPHTTPhttpLowCan be public
8080TCPHTTP alternate (proxies, Tomcat, admin consoles)http-altMediumRestricted
8443TCPHTTPS alternate (admin consoles)pcsync-https *MediumRestricted
8000TCPDevelopment web serversirdmi *MediumRestricted
8009TCPApache JServ Protocol (AJP, Tomcat)nvme-disc *HighNever
7001TCPOracle WebLogic Serverafs3-callback *HighNever
4848TCPGlassFish / Payara admin consoleappserv-httpHighNever
9000TCPPHP-FPM, SonarQube, MinIO, Portainer and otherscslistener *HighNever
10000TCPWebminndmp *HighNever
1099TCPJava RMI registryrmiregistryHighNever

Email

PortProtocolServiceIANA nameRiskInternet
25TCPSMTP (server-to-server mail)smtpLowCan be public
587TCPMail submission (SMTP AUTH)submissionLowCan be public
465TCPMail submission over implicit TLSsubmissionsLowCan be public
110TCPPOP3pop3MediumRestricted
995TCPPOP3 over TLSpop3sLowCan be public
143TCPIMAPimapMediumRestricted
993TCPIMAP over TLSimapsLowCan be public

Network services, VPN and voice

PortProtocolServiceIANA nameRiskInternet
53UDP, TCPDNSdomainMediumCan be public
123UDPNTP (Network Time Protocol)ntpMediumRestricted
161UDPSNMPsnmpHighNever
4786TCPCisco Smart Installsmart-installCriticalNever
623UDPIPMI (BMC remote management)asf-rmcpCriticalNever
69UDPTFTPtftpHighNever
21TCPFTPftpHighNever
990TCPFTPS (FTP over implicit TLS)ftpsMediumRestricted
111TCP, UDPrpcbind / portmappersunrpcHighNever
2049TCP, UDPNFS (Network File System)nfsHighNever
873TCPrsync daemonrsyncHighNever
548TCPAFP (Apple Filing Protocol)afpovertcpHighNever
3260TCPiSCSIiscsi-targetHighNever
179TCPBGPbgpMediumRestricted
520UDPRIP (Routing Information Protocol)routerMediumNever
1812UDPRADIUS authenticationradiusMediumRestricted
1900UDPSSDP / UPnP discoveryssdpHighNever
5353UDPMulticast DNS (mDNS / Bonjour)mdnsMediumNever
3702UDPWS-Discoveryws-discoveryHighNever
19UDPCharacter Generator (chargen)chargenHighNever
17UDPQuote of the DayqotdHighNever
67UDPDHCP server (BOOTP)bootpsMediumNever
514UDPSyslog (UDP)syslogMediumNever
500UDPIKE / IPsec VPNisakmpMediumCan be public
4500UDPIPsec NAT traversalipsec-nat-tLowCan be public
1194UDP, TCPOpenVPNopenvpnLowCan be public
51820UDPWireGuardunassigned *LowCan be public
1701UDPL2TP VPNl2tpMediumRestricted
3478UDP, TCPSTUN / TURNstunLowCan be public
5060UDP, TCPSIP (VoIP signalling)sipMediumRestricted

Printers, cameras and IoT

PortProtocolServiceIANA nameRiskInternet
631TCP, UDPIPP / CUPS printingippHighNever
9100TCPRaw printing (JetDirect / PDL datastream)hp-pdl-datastrMediumNever
515TCPLPD (Line Printer Daemon)printerMediumNever
554TCPRTSP (cameras and video streams)rtspHighNever
7547TCPTR-069 / CWMP (ISP router management)cwmpHighNever
5555TCPAndroid Debug Bridge (ADB over network)personal-agent *CriticalNever
1883TCPMQTT (unencrypted)mqttHighNever
8883TCPMQTT over TLSsecure-mqttMediumRestricted
11112TCPDICOM (medical imaging)dicomHighNever

Industrial control (OT / ICS)

PortProtocolServiceIANA nameRiskInternet
502TCPModbus TCPmbapCriticalNever
102TCPSiemens S7 (ISO-TSAP / S7comm)iso-tsapCriticalNever
20000TCP, UDPDNP3dnpCriticalNever
2404TCPIEC 60870-5-104iec-104CriticalNever
44818TCP, UDPEtherNet/IP (CIP explicit messaging)EtherNet-IP-2CriticalNever
2222UDPEtherNet/IP implicit I/OEtherNet-IP-1HighNever
47808UDPBACnet/IPbacnetHighNever
4840TCPOPC UAopcua-tcpHighNever
1911TCPNiagara Fox (Tridium)mtp *HighNever
9600UDPOMRON FINSmicromuse-ncpw *CriticalNever

* The product in the Service column uses this port by convention; the IANA registry assigns the number to a different service or to none. Source: the IANA Service Name and Transport Protocol Port Number Registry, checked October 2026.

How to read the ratings

  • Critical: no authentication, or a history of wormable or pre-authentication remote code execution. Exposed, it is a matter of time.
  • High: an admin, data or legacy service that gets brute-forced, leaks data or is used for DDoS reflection.
  • Medium: can be run safely on the internet only with an allow-list, strong authentication and fast patching.
  • Low: built to face the internet (HTTPS, mail between servers, VPN endpoints). The risk is the software behind it.

Moving a service to a different port is not a fix: internet-wide scanners check every port and identify services by what they answer, not by the number. The fix is to close the port or put the service behind a VPN, a zero trust gateway or an allow-list.

Frequently asked questions

What is port 445 used for?

TCP port 445 is SMB (Server Message Block) running directly over TCP. IANA lists it as microsoft-ds. Windows uses it for file and printer sharing, named pipes, admin shares such as ADMIN$ and C$, and Group Policy from domain controllers; Samba servers and most NAS devices use it too. It should never be reachable from the internet: EternalBlue (MS17-010), the flaw behind WannaCry and NotPetya in 2017, and SMBGhost (CVE-2020-0796) were both pre-authentication bugs on this port.

What is the SMB port number?

SMB uses TCP 445 today. Older systems can also carry SMB over NetBIOS on TCP 139, with NetBIOS name and datagram services on UDP 137 and 138. Those are the four "SMB ports" a firewall usually needs to think about: allow 445 only between the internal hosts that need file sharing, and block 137, 138, 139 and 445 at the internet edge. SMB over QUIC, on recent Windows Server versions, carries SMB inside TLS 1.3 on UDP 443 instead.

What is port 139 used for?

TCP 139 is the NetBIOS Session Service (IANA name netbios-ssn). It carries SMB over the legacy NetBIOS stack, for old clients, old NAS boxes and SMBv1. It reaches the same SMB server as 445, so it carries the same risk, and it leaks host and domain names. Disable NetBIOS over TCP/IP where nothing needs it, and never expose 139 to the internet.

What is the difference between port 139 and port 445?

Both lead to the same SMB file-sharing service. Port 139 is SMB wrapped in a NetBIOS session, the way Windows did it before Windows 2000. Port 445 is SMB directly over TCP, with no NetBIOS layer, and is what modern Windows uses. When NetBIOS over TCP/IP is enabled, a Windows client tries both and prefers 445. Block both at the internet edge.

Should port 445 be open to the internet?

No. Microsoft's own guidance is to block TCP 445 inbound from the internet at the corporate firewall, and to block it outbound too unless a specific cloud service needs it. For remote file access use a VPN or ZTNA, a managed file service, or SMB over QUIC on UDP 443.

How do I block port 445?

At the network edge, remove any rule that allows TCP 445 (and 137 to 139) from the internet. On a Linux host: iptables -I INPUT -p tcp --dport 445 -j DROP (and the same with ip6tables), or the nftables or ufw equivalent. On Windows: New-NetFirewallRule -DisplayName "Block inbound TCP 445" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Block. In AWS, security groups have no deny rules, so delete the inbound rule that allows 0.0.0.0/0 or ::/0, or add a deny in a network ACL. The tool above writes each of these for you.

The tools people use most on PlayCISO.

All tools
🎉 New here? Use code WELCOME10 for 10% off any plan at checkout