445/TCPSMB
File transfer · Well-known port · OSI layer 7
Windows file sharing and Samba. Use only on a local network or over a VPN.
IANA: officially registered as microsoft-ds
You decide which services we may enable for analytics, personalization, and external content.
We use cookies and similar technologies on our website to personalize content, embed external media, and better understand how individual areas are used.
Necessary cookies
These entries support essential functions such as security, stability, and form processing.
Optional sections
Your data may be processed with your consent or on the basis of legitimate interests. In the cookie settings, you can reject or explicitly allow each optional category.
Some services process personal data in third countries. By consenting, you also agree to this transfer. You can find more information in our Privacy Policy.
You can reopen and change your selection at any time. · 1.0.2
Port 445 (TCP) is the port for SMB, the protocol behind Windows file sharing and Samba. The tool shows you the service, protocol, and security guidance, and provides suitable firewall commands.
Built by Justin Schuessler
Try the commands on your own VPS, with root access and your own firewall.
Add multiple ports one at a time, up to 12.
File transfer · Well-known port · OSI layer 7
Windows file sharing and Samba. Use only on a local network or over a VPN.
IANA: officially registered as microsoft-ds
Firewall commands
Open port
sudo ufw allow 445/tcpFor Ubuntu and Debian. ufw creates the rule for both IPv4 and IPv6. If ufw is disabled, allow SSH first (sudo ufw allow 22/tcp), then enable it with sudo ufw enable, or you'll lock yourself out.
On a ZAP-Hosting VPS with an active network firewall, you also need to allow the port in the Customer Panel.
Port 445 explained
Port 445 carries network file and printer sharing using the Server Message Block (SMB) protocol. Windows uses it for network drives, access to shared folders and many functions in an Active Directory domain. On Linux, Samba provides the same service so Windows clients can access shares. Here, SMB runs directly over TCP without the older NetBIOS layer.
SMB originated in the 1980s and ran over NetBIOS on ports 137 to 139 for many years. Since Windows 2000, SMB has been able to run directly over TCP on port 445, which IANA lists as “microsoft-ds”. Microsoft documents the current protocol versions, SMB 2 and SMB 3, in the MS-SMB2 specification. Port 445 became widely known in 2017 because of the WannaCry ransomware, which spread rapidly through the EternalBlue vulnerability in SMBv1.
Port 445 should never be accessible from the internet. Exposed SMB shares are common targets for automated scans, password attacks, and worms, as WannaCry demonstrated. Many ISPs block port 445 for this reason. If you need to access shares remotely, use a VPN such as WireGuard and only allow port 445 on your internal network. Also disable the outdated SMBv1 protocol and keep Windows and Samba up to date.
More ports
These ports are often part of the same setup. Click one to see its explanation and firewall commands.
View all well-known ports and the complete IANA list
Port list source: IANA Service Name and Transport Protocol Port Number Registry, as of October 22, 2026. iana.org
Discover more
Calculate the network address, broadcast address, subnet mask, and usable host range from a CIDR address, and convert between CIDR and IP ranges (IPv4 and IPv6).
Built by Jakub Martyniak
Interactively learn the 7 layers of the OSI model: click layers, assign terms such as switch, ARP, or port 443, and explore animated encapsulation, a quiz, and a cheat sheet for the IHK exam.
Built by Justin Schuessler
Interactively learn the 4 layers of the TCP/IP model (DoD model) according to RFC 1122, with OSI model mapping, animated encapsulation, a port quiz, and a cheat sheet.
Built by Justin Schuessler
Check whether specific ports are open on an IP or hostname—select a protocol or game instead of scanning all ports at once.
Built by Sebastian Rademacher
FAQ
Quick answers about port 445.
Port 445 is the default port for SMB, used for Windows file shares, network drives, and shared printers. Samba on Linux uses it too. IANA names the service “microsoft-ds”.
Yes, if you open it to the internet: SMB is constantly scanned and attacked. The port is fine on a local network or over a VPN. After making a change, check that port 445 cannot be reached from outside.
Many ISPs filter port 445 because worms such as WannaCry have spread through it. This protects unsecured computers from internet attacks. For remote access to shares, a VPN is the better option anyway.
With ufw, restrict the rule to a source network, for example: sudo ufw allow from 192.168.1.0/24 to any port 445 proto tcp. The port will then remain closed to the internet. On Windows, you can also use the RemoteAddress parameter in New-NetFirewallRule to allow only specific networks.
Any more questions?
Contact SupportWith a ZAP-Hosting VPS, you have root access, can set up services and firewall rules yourself, and can immediately see which ports are open.
No setup. No risk. Online in seconds.
Looking for more tools? View all network tools