Port 873 is the rsync daemon, which serves named modules for file synchronisation without SSH. Rsync over SSH does not use this port. It should not be reachable from the public internet.
- Port
- 873
- Protocol
- TCP
- Service
- rsync daemon
- Expose to internet?
- No
- Also used by
- rsyncd, mirror servers, NAS backup targets
Is port 873 safe to open?
The rsync daemon has no encryption and its modules are readable by anyone unless authentication is configured. Exposed rsync servers have leaked entire backups and website directories. Writable modules can let an attacker overwrite files.
How to secure rsync daemon
- Use rsync over SSH instead of the daemon where possible.
- Protect each module with
auth usersand asecrets file(mode 600). - Limit clients with
hosts allowin /etc/rsyncd.conf. - Set
read only = yeson modules that do not need writes.
Check if port 873 is open
Linux: what is listening on this port
sudo ss -tlpn | grep ':873 'Windows (PowerShell): what is listening
Get-NetTCPConnection -LocalPort 873 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}From another machine: is it reachable
nc -zv HOST 873
# or
nmap -p 873 HOST
# Windows
Test-NetConnection HOST -Port 873Test the rsync daemon service itself
rsync rsync://HOST/Restrict port 873 in the firewall
Replace 10.0.0.0/8 with the network or address that needs access. Docker publishes container ports through its own iptables rules, which bypass ufw; bind published ports to 127.0.0.1 (-p 127.0.0.1:873:873) instead of relying on the host firewall.
ufw: allow only your private network, deny everyone else
sudo ufw allow from 10.0.0.0/8 to any port 873 proto tcp
sudo ufw deny 873/tcpfirewalld: allow one source network only
sudo firewall-cmd --permanent --remove-port=873/tcp
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/8" port port="873" protocol="tcp" accept'
sudo firewall-cmd --reloadiptables
sudo iptables -A INPUT -p tcp --dport 873 -s 10.0.0.0/8 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 873 -j DROPWindows Firewall (PowerShell, as Administrator)
New-NetFirewallRule -DisplayName "Block 873 from internet" -Direction Inbound -Protocol TCP -LocalPort 873 -RemoteAddress Internet -Action BlockMonitor port 873
Run a TCP port monitor against your public IP on port 873: here, a failed connection is the healthy result, so you know the firewall is still doing its job. On Linux, the Statance agent also reports every listening port on the server. TCP port monitoring.
Related ports
FAQ
Does rsync use port 873 or 22?
Both, depending on mode. rsync host:path runs over SSH on port 22. rsync rsync://host/module or host::module talks to the rsync daemon on port 873.
What is port 873 used for?
Port 873 is the rsync daemon, which serves named modules for file synchronisation without SSH. Rsync over SSH does not use this port. It is also used by rsyncd, mirror servers, NAS backup targets.
Is it safe to open port 873?
Not to the public internet. The rsync daemon has no encryption and its modules are readable by anyone unless authentication is configured. Exposed rsync servers have leaked entire backups and website directories. Writable modules can let an attacker overwrite files.
Is port 873 TCP or UDP?
rsync daemon uses TCP on port 873.
How do I check if port 873 is open?
On the server, run sudo ss -tulpn | grep ':873 ' (Linux) or Get-NetTCPConnection -LocalPort 873 (Windows) to see what is listening. From another machine, run nc -zv HOST 873 or Test-NetConnection HOST -Port 873.
Know the moment a port stops answering.
TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.