Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

My objective is to have a connection to the internet on via 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
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


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.