PortScan › Port guide › Port 5000
Port 5000 (Synology DSM): Remote NAS Access Without Port Forwarding
Port 5000 is the Synology DSM admin UI (HTTPS: 5001). Exposed for remote access, it draws brute force and NAS ransomware. Safer options, plus AirPlay and others.
What is port 5000?
DSM, the operating system of Synology NAS devices, serves its admin interface on HTTP port 5000 and HTTPS port 5001. It is the screen you get when you open http://NAS-address:5000 in a browser. Everything on the NAS — file management (File Station), photos, backups, package installs, user management — is done from there.
Search for how to access a Synology from outside and you will often be told to port-forward 5000 and 5001 on your router. It works, but at that moment the NAS's admin login page is published to the entire internet. You are leaving the front door open on a device that holds family photos, work files and backups.
Port 5000 is not Synology's alone. AirPlay Receiver on macOS Monterey (12) and later uses ports 5000 and 7000, and the Python Flask development server and Docker registries also default to 5000. If a scan shows 5000 open, first work out which one it is (see the FAQ below).
When it is normally open
- Using the NAS admin interface on a home or office internal network — normal internally
- Ports 5000/5001 port-forwarded on the router for remote access — the risky setup this page covers
- AirPlay Receiver on a Mac, a Flask app in development, or a private Docker registry
Risks if it is open
Brute force
A DSM login page open to the internet receives a constant stream of automated login attempts. In 2021 Synology officially warned that the StealthWorker botnet was brute-forcing Synology NAS devices and that a successful attack could lead to ransomware and other malware being installed. An admin account with a weak password will not hold out long.
Ransomware aimed at NAS devices
A NAS concentrates data, runs 24/7 and is slow to get updates, so ransomware groups target it specifically. In 2014 SynoLocker encrypted files on Synology NAS devices through a flaw in an old DSM version that had already been patched, and in 2019 eCh0raix moved on from QNAP to brute-forcing Synology NAS devices. In 2022 DeadBolt encrypted thousands of QNAP NAS devices. Whatever the brand, the common target is a NAS with its admin interface open to the internet.
Backups on the NAS go down with it
When the NAS is encrypted, any PC backups stored on it are locked too. Without snapshots or an external backup, there is no way to recover.
Security checklist
- Remove the port forwarding for 5000 and 5001. Switching remote access to Synology's QuickConnect (Synology's relay service, no ports to open) or a VPN (DSM's VPN Server package, Tailscale from Package Center, etc.) makes the biggest difference.
- Turn on 2-step verification: set up OTP authentication under Security (Account) in DSM's Personal settings. It is best enabled for every account in the administrators group.
- Turn on Auto Block: under Control Panel → Security, it automatically blocks IPs that fail to log in a set number of times.
- Disable the default
adminaccount and use a separate administrator account with a hard-to-guess name. Also confirm that theguestaccount is disabled. - Set DSM and packages to update automatically, and run Security Advisor to work through its recommendations.
- Keep shared folder snapshots (on Btrfs volumes) and a separate backup outside the NAS. They are your last line of defence against ransomware.
- Changing the port from 5000 to something like 15000 is not security. The DSM login page reveals itself in its first response, whatever port it is on.
How to check whether port 5000 is open
From outside (is it exposed to the internet?)
Whether your server or home router accepts port 5000 from the internet can only be confirmed by connecting from outside. A check from inside the same network bypasses the router's firewall and gives a different answer.
PortScan opens a real TCP connection from the Cloudflare edge and reports Open, Closed or Filtered. Members can scan every port on their own IP for free and other targets free once a day.
Check port 5000On the server (what is listening?)
Windows (PowerShell):
netstat -ano | findstr ":5000 "
Get-NetTCPConnection -LocalPort 5000 -State Listen | Select LocalAddress,OwningProcess
Linux:
sudo ss -tlnp | grep ':5000 '
If it listens on 0.0.0.0 or [::] it is open on every network; 127.0.0.1 means only that machine can connect. To test port 5000 on a server from another computer, use Test-NetConnection server-address -Port 5000 on Windows or nc -vz server-address 5000 on Linux and macOS.
How to close or restrict port 5000
The best fix is to turn the service off or make it listen only on 127.0.0.1 (see the checklist above). If you need the service but must keep it off the internet, use a firewall.
Windows Firewall
# Administrator PowerShell
New-NetFirewallRule -DisplayName "Block TCP 5000" -Direction Inbound -Protocol TCP -LocalPort 5000 -Action Block
# To allow a single IP instead (block rules take precedence, so use this instead of the rule above)
New-NetFirewallRule -DisplayName "Allow TCP 5000 from office" -Direction Inbound -Protocol TCP -LocalPort 5000 -RemoteAddress 203.0.113.10 -Action Allow
Linux (ufw)
sudo ufw deny 5000/tcp
# Allow a single IP only
sudo ufw allow from 203.0.113.10 to any port 5000 proto tcp
On a cloud server, also check port 5000 in the security group (inbound rules), which is separate from the OS firewall. For services running in Docker, the rules Docker creates can bypass ufw, so binding the port to localhost with -p 127.0.0.1:5000:5000 is the reliable option.
Router
At home or in a small office, open the router's admin page and check whether port 5000 is in the port forwarding list, whether DMZ is enabled, and whether any program opened ports by itself through UPnP. If any of the three applies, port 5000 on your PC is directly visible from the internet.
How to read the scan result
- Open — something accepted a connection on port 5000. Work through the risks above.
- Closed — the packet reached the device, but nothing is listening on that port, so it was refused immediately (RST). The service is off.
- Filtered — no response. A firewall or the ISP is dropping packets, or the device is off. From an exposure point of view this is the safest state.
The verdict can depend on where you connect from. Many ISPs (including most Korean ISPs) block some ports such as 135, 139 and 445 on their network, so the same server can look Filtered from inside that network and Closed from abroad.
FAQ
- With QuickConnect, do I really not need to open any ports?
- Correct. With QuickConnect the NAS first connects out to Synology's servers, and you connect from outside through that relay, so no router port forwarding is needed. Anyone who knows your QuickConnect ID can still reach the login page, though, so keep 2-step verification and Auto Block turned on.
- I don't have a NAS, but port 5000 is open on my Mac
- AirPlay Receiver on macOS Monterey and later uses ports 5000 and 7000. Turn off AirPlay Receiver in System Settings → General → AirDrop & Handoff (on Monterey, System Preferences → Sharing) and they close. For the same reason, a Flask development server sometimes cannot use port 5000 on a Mac.
- Is it safe if I open only 5001 (HTTPS) and close 5000?
- The traffic is encrypted, but the login page is still open to the internet. The brute-force and DSM vulnerability risks remain the same, so the real fix is to close the ports and use QuickConnect or a VPN.
Related ports
Last updated 2026-11-04 · Use this guide to check systems you manage. Scanning systems without permission may carry legal liability.