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 have two servers on my home network: OSX Server and an Ubuntu Server. I'd love to have external subdomains point to osx and 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 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
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


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.