Ssh – rsync server/daemon security

authenticationrsyncSecurityssh

I have a NAS (Netgear Readynas NV+) at home and a linux (Arch) box at work that is always on. The linux box is already running an ssh server/daemon and the NAS is already running an rsync server/daemon. The NAS does not support rsync over ssh. The way I understand it is I can either enable port forwarding on my home router to enable my linux box to initiate an rsync with the NAS or I can enable an rsync server on the linux box and allow the NAS to initiate the sync. Since my home router does not have a static ip address, I am leaning towards running an rsync server on the linux box.

Is one way more secure than another? Are there major security drawbacks to doing either?

Best Answer

Go with what's already setup, if ssh on the work box is already an open/monitored/supported/audited service then try to do the rsync via that. Not opening up new ports/services is generally safest. Not opening up insecure protocols to the internet is even better =)

You can get ssh access to the ReadyNas (if you don't mind some hassle from Netgear in the event of a "i deleted my nas" support call). Then rsync -e ssh from the command line which leaves nothing else to setup. Auth, wire security and user/file permissions are all provided by ssh/remote shell setup on work box.

For opening up ssh on your home network:

  • The dynamic IP hassles can be covered by running a free dynamic DNS service.

  • Restrict access to the port to your work box's public IP.
    Some routers allow you to set a source IP in the NAT rule.
    SSH can be secured with iptables and more

As DarkHeart mentioned, rsync by itself over an unsecure network is not a good idea. The tunnel and vpn mentioned is a good work around. You can keep the aforementioned ssh tunnel up with autossh. You may want to depend on some rsync security if your going to leave a tunnel up depending on who else has access to either end.

Also, if you haven't already, discuss what your doing with someone. Detail what data is going in/out of the network. Think about what data might be able to go out if everything goes wrong. Document your process somewhere.

Related Question