LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   encrypting directories of data (https://www.linuxquestions.org/questions/linux-security-4/encrypting-directories-of-data-291090/)

funaroma 02-16-2005 03:57 PM

encrypting directories of data
 
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?

sigsegv 02-16-2005 04:09 PM

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 ...

mastahnke 02-16-2005 11:28 PM

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).

funaroma 02-17-2005 05:11 AM

A little more detail then:

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!

m

thorn168 02-17-2005 05:45 PM

I think you should implement SELinux rules instead of Encrypting the data.

To learn more about SELinux go to: http://www.nsa.gov/selinux/

Thorn


All times are GMT -5. The time now is 02:19 AM.