0

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

shreyas
  • 267
  • 1
  • 3
  • 6

2 Answers2

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.

womble
  • 96,255
  • 29
  • 175
  • 230
0

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
rorycl
  • 848
  • 1
  • 6
  • 10
  • 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 05 '11 at 11:08