Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to set up a shared filesystem on EC2 and I've read tutorials such as this: http://blog.ronaldmccollam.com/2012/07/configuring-nfs-on-ubuntu-in-amazon-ec2.html

In step 2 it talks about configuring the exports, for this I need an IP range but when I'm auto-scaling I can't predict what the IP will be before it scales. Is there any other way of doing this while still staying secure?

Thanks

Edit: Just tried s3fs, didn't seem to work properly

share|improve this question

1 Answer 1

up vote 2 down vote accepted

First off I would not recommend using S3 as your shared filesytem. It can be extremely costly due to how the IO works.

There's a couple ways to do this.

The easiest way is to add your hosts EC2 security group as a source IP rule for the security group of the NFS server while blocking all other unnecessary traffic. This usually means having two rules; one for your management of the NFS server over SSH [typically] and the other rule allowing all traffic from your connecting hosts to the group. This allows only that traffic to the NFS host. At that point you can safely set the permissions in NFS to 10.0.0.0/8 or just leave it open to everyone. No connections to NFS will be allowed except those in your security group settings.

Alternately you can set up a startup script on the connecting hosts that either remotely configures the NFS host or pings it somehow so that it knows how to configure itself. This way you can leave the NFS settings to a per-IP setup rather than being more open.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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