File Sharing Port: Which Ports Are Used and Why It Matters

File Sharing Port: Which Ports Are Used and Why It Matters

7/9/2026

File Sharing Port: Which Ports Are Used and Why It Matters

Understanding which file sharing ports different protocols use is essential for network administrators, firewall configuration, and troubleshooting connectivity issues. Here's a comprehensive reference for file sharing ports in 2026.

Need to share text between devices? Use the Files-Share Clipboard - pair two devices with a short ID and text syncs in real time. No account, no app.

SMB (Windows File Sharing) Ports

SMB (Server Message Block) is the protocol Windows uses for network file sharing — the one behind mapped network drives and \\server\share paths.

Port 445 (TCP) — Modern SMB. This is the primary port for SMB since Windows 2000. All Windows file sharing traffic uses port 445 in modern networks.

Port 139 (TCP) — Legacy SMB over NetBIOS. Used by older Windows versions. Still present on many systems for backward compatibility but not needed in modern networks.

Port 137-138 (UDP) — NetBIOS Name Service and Datagram Service. Used for network browsing (finding computers by name) in older Windows networks. Not needed if you're using DNS for name resolution.

For a modern Windows network, you only need port 445 open for file sharing. Ports 137-139 can be blocked without affecting modern SMB functionality.

FTP Ports

Port 21 (TCP) — FTP control connection. All FTP commands travel on this port.

Port 20 (TCP) — FTP data connection in active mode.

Port 990 (TCP) — FTPS (FTP over TLS) implicit mode.

High ports (1024-65535) — FTP passive mode data connections. The server tells the client which port to use.

SFTP Port

Port 22 (TCP) — SFTP runs as a subsystem of SSH on port 22. This is the secure replacement for FTP and the standard for server-to-server file transfer.

NFS Ports

Port 2049 (TCP/UDP) — NFS (Network File System), the standard file sharing protocol on Linux/Unix systems. NFSv4 uses only port 2049, simplifying firewall rules compared to older NFS versions which used multiple dynamic ports.

WebDAV Ports

Port 80 (HTTP) and Port 443 (HTTPS) — WebDAV is an extension of HTTP that allows file management over the web. It's used by some cloud storage services and collaboration tools.

Why File Sharing Ports Matter for Security

Port 445 (SMB) should never be exposed to the internet — it's been the entry point for major ransomware attacks including WannaCry and NotPetya. Block port 445 at your internet-facing firewall and only allow it on internal networks.

For sharing files with external users, browser-based tools like files-share.com operate entirely over HTTPS (port 443) — the same port as regular web browsing. This means no special firewall rules are needed and it works through corporate firewalls that block other file sharing ports.