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

I currently have set up an Amazon EC2 Virtual Private Cloud. Because of IP limitations I can't provide all the instances in the VPC an elastic IP. I have one public facing server and I have a bunch of other private servers in the same VPC.

Please refer to diagram http://i.imgur.com/9qvNfz0.png

My objective is to have a connection to the internet on 10.0.0.2 via 10.0.0.1 to run some basic commands like wget, ping and apt-get commands. What kind of SSH command would I have to run? I have done quite a bit of searching on the net and I haven't found any examples for my case. Either that or I do not understand them.

Any help would be much appreciated. Thanks

share|improve this question

1 Answer 1

up vote 1 down vote accepted

you shouldnt need to use ssh for that. but you could do the following:

  1. enable routing on the internet facing machine via the /proc/sys/net/ipv4/ip_forwarding flag.
  2. enable masquerading on it's iptables
  3. set the internal ip of the internet facing machine to be the default gateway for the others.

That way the machines which dont have public ips will simply use the internet facing one as a router.

share|improve this answer
    
Thanks. I will have to read up on this. Was thinking SSH would be easier because this is just a temporary connection just to get some things done. –  Praveen Feb 17 '13 at 9:09

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.