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.

what are the ways by which I can implement elastic ip like architecture in my private server farm? There is only one global ip available but I should be able to ssh any server from external network by implementing the same mechanism as aws elastic ip? roughly I want to do this: -assign every server a "virtual ip" like aws does(eg. c2-111-111-111-111.compute-1.amazonaws.com) which is essentially a domain name which resolves to a global ip. in my case all such virtual ip resolves to my global ip -now redirect the request to appropriate server in internal network -and almost all protocol should work

share|improve this question
    
That's not how elastic IP works, for a start. –  womble Aug 4 '11 at 23:41

2 Answers 2

Elstic IP doesn't work like you appear to think it does. Each "elastic" hostname like the example you gave actually resolves to a different IP address, and amazon just redirects those to the instance they refer to.

To do what you want to do, you need to have protocols that support transferring the requested hostname along with the request. HTTP (and HTTPS with SNI) support this, as does FTP. However, contrary to your unfounded assertion, "almost all protocol[s]" will not work, because name-based virtual hosting is not a commonly supported technique.

If you want more public IPs, then get more public IPs. They're not expensive (yet), and if your service provider won't give you more, then stop cheaping out and use an actual business-class connection for your business service.

share|improve this answer
    
thank you, this answer is very informative –  shreyas Aug 5 '11 at 10:29

I have no idea how aws' elastic ip works.

However, a nice way of doing what you want is simply to do a double ssh forward.

In that case, assuming you are passing through a single firewall with a hostname of router.globalnetworks.net, you could set up an ssh config file something like this:

Host router
User sysadmin
Port 22
IdentityFile ~/.ssh/id_sysadmin
HostName router.globalnetworks.net
LocalForward 5020 192.168.181.20:22
LocalForward 5021 192.168.181.21:22
...

Consequently, you can connect to host 192.168.181.20 by

  1. first going ssh router; then
  2. ssh -p 5020 @localhost
share|improve this answer
    
If you can do a "double forward", you can just use ProxyCommand to point to the various hosts without having to do any port forwarding tricks. Also, this doesn't work for any other protocol. –  womble Aug 5 '11 at 11:08

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.