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.

I have two servers on my home network: OSX Server and an Ubuntu Server. I'd love to have external subdomains osx.mydomain.com point to osx and ubuntu.mydomain.com point to ubuntu. I know the normal way to do this is to have a static external IP address for each, but that's not an option as this is just my home setup.

My question is: is there a way to do this with some reverse proxy trickery? OSX is currently the default entry point for all traffic. I was able to setup a reverse proxy on OSX for ubuntu.mydomain.com on port 80, so web traffic was correctly being proxied to my ubuntu. I'd like to ssh and do a bunch of other stuff though!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can't "reverse proxy" services like SSH in the same way as a stateless web server, but you can still accomplish what you want by using your OS X server as the "gateway" to services on Ubuntu. For instance, you can SSH to OS X and then SSH to Ubuntu, or you can use an SSH ProxyCommand to do the two hops for you transparently.

Alternately, you can use your home router to forward individual ports to different internal machines, such as using port 22 for SSH on the OS X machine and port 8022 for SSH to the Ubuntu machine. But two different machines cannot both offer services on the same point through a single IP in the way you are looking to do it.

share|improve this answer
    
Hmm. I really wish routers were smarter. Seems like a simple thing to route traffic based on a domain name (like apache does). Thanks for the info. –  Trevor Hartman Apr 25 '10 at 20:36

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.