Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a linux server that allows SSH login from other "remote" servers. Those servers then rsync certain directories to this server for a level of data backup.
SSH is setup using private key encryption (i believe that's the right term, but I *AM* a noob!!), so that the communication itself is secure.
However, I'd also like to somehow encrypt the directories and files on this server, so that if someone did somehow manage to gain access, the files wouldn't be of any use without a decryption method of some kind.
Is something like this even possible? The (re)encryption of the local files would have to happen after each rsync job, which are scheduled on each remote server for every one or three hours. (In other words, the other machines call this one and store their data here... this machine is not specifically aware of when those logins will take place).
Am I asking for something a little too weird here?
Perfectly reasonable, but unless this data is *really* sensitive, you should probably attack this another way.
If you encrypt the data on your server and you have other servers rsyncing the data, why would anyone root the server where the data's encrypted? I'd hit the ones with the plain text copies
Security is about mitigating risk, and in this case, you're not doing that. Server A holds the data you're asking about encrypting. Server B is the rsync client. If you have server B behind a firewall with no services running on it and stored in a secure vault with no keyboard port, then I guess server A is your weakest point and encryption is in order (after IP/MAC limits and an audit of proper filesystem ACLs). I'd probably use GPG/PGP, but then your weakest point becomes the keys (which, assuming you'll be automatically encrypting/decrypting the data, will have to live on the server with the data). You can see how it's basically a problem with no easy solution ...
Distribution: Ubuntu currently, also Fedora, RHEL, CentOS
Posts: 111
Rep:
The better solution would be to encrypt the data at both ends. If one end is less secure, then maybe that data shouldn't be there, or maybe having the data live is not a good idea. You could have it in a less usable format, like bz2 or tar, and then move it.
I know you can password protect a zip file with the -e option. That might be an idea.
SElinux would be another way, just write rules that lock that filesystem on the insecure client. Then no one, even with root can get to the data. (Assuming root is not the security adminstrator).
Encrypting the data at the source is not really an option, as it's is live, in-use data, on Windows machines.
We were attempting to mitigate risk by adding an extra level of encryption where we can, on the backup server where the data from the Windows machines is stored. The Windows machines are already protected well... to HIPAA regulation standards in many cases. We just wanted to try and add this extra layer of encryption on the backup server as an additional precaution. If it's not possible, then it's not possible. We already restrict access to the backup server by allowing only specific IPs to connect; we just thought it might be "nice" to encrypt the data after it's sitting here, too.
But, the more I think about it, the less I feel this is necessary OR possible, as we'll then have to deal with rsync not being able to do a proper sync without decrypting the data to do the comparison, before each update.
Thanks everyone for the replies, you are all so very helpful... you're the best!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.