SMB and CIFS Ports: Complete Windows File Sharing Port Guide 2026

SMB and CIFS Ports: Complete Windows File Sharing Port Guide 2026

9/7/2026

SMB and CIFS Ports for Windows File Sharing

SMB (Server Message Block) and CIFS (Common Internet File System) are the protocols Windows uses for network file sharing. Understanding which ports they use helps you fix blocked file transfers and configure firewalls correctly.

SMB and CIFS Port Numbers

ProtocolPortTypePurpose
SMB (modern)445TCPDirect SMB over TCP — main Windows file sharing port
CIFS445TCPCIFS is the same as SMB, uses port 445
NetBIOS Session139TCPLegacy SMB over NetBIOS
NetBIOS Datagram138UDPNetBIOS broadcast messages
NetBIOS Name137UDPNetBIOS name resolution

What Port Does SMB Use?

SMB uses port 445 (TCP) for direct connections. This is the primary port for all modern Windows file sharing. Port 139 is used for legacy SMB over NetBIOS and is still active on older Windows systems.

What Port Does CIFS Use?

CIFS uses port 445 (TCP) — the same as SMB. CIFS is an older dialect of SMB. In modern Windows, SMB3 has replaced CIFS, but the port remains the same.

Windows File Sharing Firewall Ports to Open

To enable Windows file sharing through a firewall, open these ports:

PortProtocolDirectionRequired For
445TCPInbound + OutboundSMB/CIFS file sharing
139TCPInbound + OutboundLegacy NetBIOS file sharing
137UDPInbound + OutboundNetBIOS name resolution
138UDPInbound + OutboundNetBIOS datagram service

How to Open SMB Ports in Windows Firewall

  1. Open Windows Defender Firewall → Advanced Settings
  2. Click "Inbound Rules" → "New Rule"
  3. Select "Port" → TCP → enter 445
  4. Allow the connection → apply to all profiles
  5. Repeat for port 139 (TCP) and ports 137-138 (UDP)

Why Is SMB Port 445 Blocked?

Port 445 is frequently blocked by:

  • ISPs — many ISPs block port 445 to prevent ransomware spread (WannaCry used SMB)
  • Corporate firewalls — IT departments block SMB for security
  • Windows Firewall — may block SMB on public networks

If port 445 is blocked and you need to transfer files, use a browser-based tool like files-share.com which uses HTTPS (port 443) — almost never blocked.

Samba Share Port (Linux/Mac SMB)

Samba is the Linux/Mac implementation of SMB. It uses the same ports:

  • Port 445 (TCP) — main Samba share port
  • Port 139 (TCP) — legacy NetBIOS
  • Ports 137-138 (UDP) — NetBIOS name service

Alternative: Share Files Without Opening Firewall Ports

If you can't open SMB ports (blocked by ISP or IT policy), use files-share.com. It transfers files over HTTPS (port 443) which is open on virtually every network — no firewall changes needed.

Frequently Asked Questions

What port does SMB use?

SMB uses port 445 (TCP) for direct connections and port 139 (TCP) for legacy NetBIOS connections.

What port does CIFS use?

CIFS uses port 445 (TCP) — the same as SMB. CIFS is an older name for the SMB protocol.

What are the Windows file sharing ports?

Port 445 (TCP) for SMB/CIFS, port 139 (TCP) for NetBIOS session, ports 137-138 (UDP) for NetBIOS name service.

How do I fix SMB file sharing blocked by firewall?

Open ports 445 and 139 (TCP) in Windows Firewall. Or use files-share.com which works over HTTPS without any firewall changes.

What is the Samba share port?

Samba uses port 445 (TCP) as the primary share port, same as Windows SMB.

Is SMB port 445 safe to open?

Opening port 445 on a local network is generally safe. Avoid exposing it to the internet — use a VPN for remote access instead.

Can't open SMB ports? files-share.com shares files over HTTPS — no port configuration needed.