0

I have been using an rsyncd server for backups for what feels like a decade. I saw that rsyncd has no transport encryption (not even for username and password).

I wonder what other security issues this software has?

Here is my config (/etc/rsyncd.conf)

port = 873
[backup]
path = /disk/backup
uid = nobody
gid = users
list = yes
read only = no
write only = no
use chroot = yes
auth users = sefwsf
secrets file = /var/lib/backup/rsyncd-save.secrets
lock file = /run/lock/rsyncd-save

on my Desktop I use this command:

rsync --stats -hart --password-file=/tmp/pw.txt ~/stuff $bakuser@192.168.24.3::backup --delete
2

It looks like you are backing up to a host on your private network (192.168.x.x). Without any encryption being used with the rsync command, whoever controls the network may be able to 'listen in' on the transfer. Or, they may even be able to impersonate the host that you are backing up to, so that you send all your files to the malicious host. Even someone who does not control the network may be able to impersonate the host that you are backing up to, by mounting an ARP poisoning attack.

If you control the private network, then perhaps these types of attacks may be less likely. But, these threats should be taken seriously if you are backing up over the public internet, where DNS poisoning attacks, MITM attacks, and the like, are quite real.

This why rsync is often run over some type of encrypted tunnel. Perhaps the most common way to do this is to use an ssh tunnel. This can be done easily using the -e option, like so:

rsync -e ssh

I generally use a command similar to the following:

rsync -az -e ssh /path/to/source/directory/on/local/host/ user@remotehost.tld:/path/to/destincation/directory/on/remote/host/

This will run rsync over an ssh tunnel to the remote host. On the remote host, you just need to have an ssh server running. Authentication can be handled using key-based ssh authentication to avoid having to hard-code a password.

In addition to the benefit of the transfer taking place over the encrypted ssh tunnel - you also benefit from ssh key-pinning in ssh. If someone tries to MITM the connection or spoof the host (e.g. by way of a DNS poisoning attack), ssh will detect the attack because it will not recognize the public key of the malicious host.

1
  • That's correct. – mti2935 Mar 7 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.