Technical Anshu
Tutorials Blog
🔌 Ports and Firewall

Synology File Server Ports for SMB FTP SFTP TFTP and the DSM Firewall

One forgotten port range is the reason half of all FTP setups fail. Here is the complete, honest port map for your Synology file server — and what each number means for your firewall.

✍️ Technical Anshu🗄️ Synology DSM⏱️ 6 minute read
🎥 The video builds the server these ports belong to — full Synology File Services setup on screen

Every door on your file server has a number, and your firewall only respects numbers. This page lists the exact ports a Synology file server uses for SMB, FTP, FTPS, SFTP and TFTP, explains the one range everyone forgets — FTP's passive ports — and ends with the only forwarding rules you actually need.

Synology file server ports — decision panel
SMB  445 / TCPLAN / VPN only
SFTP  22 / TCPForward if needed
FTP  21 / TCP + passive rangeDiscourage
FTPS  21 / TCP + passive range (TLS)Forward if needed
TFTP  69 / UDPLAN only, never forward
DSM admin  5000 / 5001Never forward 5000
The port decision panel — the same numbers DSM and your router will ask about, with the safe default for each.
1

The Port Table, Without the Noise

SMB: TCP 445 (the old 137–139 NetBIOS ports belong to history; modern Windows sharing lives on 445). SFTP: TCP 22, shared with the SSH service. FTP: TCP 21 for commands, plus data connections explained below. FTPS: the same 21 with TLS in explicit mode. TFTP: UDP 69. DSM itself: 5000 (HTTP) and 5001 (HTTPS) — management, not file transfer.

2

FTP's Hidden Second Door — Passive Ports

FTP is the only protocol here that calls back. After logging in on port 21, the actual file moves over a separate connection, and in passive mode the server picks that port from a range. DSM's FTP settings show this range — the default begins at 55536. This is why FTP works perfectly on your LAN and fails mysteriously through a firewall: port 21 was allowed, the range was not. Whatever range DSM shows is the range your firewall and router must allow, exactly.

3

The DSM Firewall — Allow by Service, Not by Hope

Open Control Panel → Security → Firewall, enable it, and build rules per service and per source: allow SMB from your LAN subnet only, allow SFTP from where it is genuinely needed, and end with a deny-all rule. The built-in application list lets you tick services by name instead of typing numbers — use it, and the port table above becomes a five-minute job.

4

What May Leave the Building

If remote access is truly required, the forwarding shortlist is short: SFTP on 22 is the clean candidate — one port, encrypted, account-based. FTPS is acceptable with its passive range forwarded too. SMB stays home or travels inside a VPN. TFTP never leaves the LAN — it has no login at all. And the DSM admin ports: manage the NAS from the LAN or over VPN; forwarding 5000/5001 to the internet invites the world to try your admin password.

5

When a Port Test Fails

Work the chain in order: is the service enabled in File Services? Does it answer from another PC on the same LAN (that separates NAS problems from firewall problems)? Is the DSM firewall rule above the deny-all, and does it cover the source subnet? For FTP, is the passive range allowed as well as 21? Nine times out of ten the failure is one of these four — and it is the passive range more often than anyone admits.

🔴 Memorise two numbers: 445 never touches the internet, and FTP is never just port 21 — without its passive range it logs in beautifully and then transfers nothing.

🎥 Watch the Server Behind These Ports Get Built

SMB, FTP, SFTP and TFTP enabled step by step in DSM, with users, permissions and quotas.

▶️ Watch Full Video
❓ Common Questions (FAQ)

Why does FTP log in but fail to transfer files?

Almost always the passive data ports. The login uses port 21, but files move over a separate port from the passive range shown in DSM's FTP settings. Allow that whole range in the firewall and router, not just port 21.

Can I change the SFTP port from 22 to something else?

Yes — the SSH service port in Terminal and SNMP can be changed, and the DSM firewall rule must match. It reduces background noise from scanners, but it is not real security by itself; strong passwords and limited accounts still do the real work.

Should I forward port 445 so I can reach my shares from home?

No. Exposing SMB to the internet is one of the most abused openings in small networks. Use SFTP for direct file access from outside, or run a VPN and use your SMB shares inside it.

This guide is based on the Technical Anshu Synology ports and firewall video • Stuck on any step? Ask in the video comments — you will get an answer 🙏