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.

Assume, I am having 2 ec2 accounts (say A and B), both have different list of security groups. Now I want to open a particular port (say 80) for an instance running in account A, to account B. ie, I want to only allow account B instances, to access account A's 80 port. Could any one update me, is there a way to do this.??

Additionally, may I access account A's instance from account B's instance by using its private ip address/host name ??

Thanks in Advance,

share|improve this question

1 Answer 1

up vote 2 down vote accepted

This is easily achievable in the command line... and making use of the ec2 tools. Its not available within the AWS management console.

ec2-authorize --help

./ec2-authorize [AWS security group that the firewall hole will be poked into] -K [AWS pk-.pem of the account where the firewall hole is to be made] -C [AWS cert.pem of the account where the firewall hole is to be made] --region=[region] -P tcp -o [security group name of AWS account you want to allow access to] -u [account ID number - of the AWS account which you want to allow access to] -p [port number range. or single port numnber]

And that's it. Look at AWS doc's for more information on ec2 tools to install etc if you don't know what they are.

Thats all you need, Cheers

share|improve this answer
    
thanks for your info.. just a confirmation, whether the [AWS security group that the firewall hole will be poked into] can be of different account .. am I correct..?? –  rahul Feb 15 '11 at 14:40
    
thanks for your informations. I can open particular port to other accounts by using your steps thanks.. –  rahul Feb 15 '11 at 16:09
    
rahul, since the answer was correct, please mark it as correct. –  daveadams Feb 15 '11 at 16:47

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.