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, a web server and an ssh server. Currently I have the web server behind a load balancer, while the ssh server has a subdomain pointed to it.

I'd like for it to be possible to ssh in directly to my naked domain instead of having to specify the subdomain. Right now users have to access ssh via instead of just

I would like to route ssh and www traffic for my naked domain to different boxes on the back end. I've been playing around iptables, but can't seem to get this to work. My router box is virtual and only has one interface, eth0.

share|improve this question
Please explain more about your network setup. You have a server that only does SSH? What's its purpose? What does your DNS look like? – Martijn Heemels Jun 14 '11 at 22:55

Nginx is a webserver, that can also function as a HTTP proxy. No, it doesn't route SSH traffic.

Load-balancing SSH traffic is not something you want to do. From your question I can't really figure out what you're trying to achieve, but it seems to me that you're looking in the wrong direction. Please explain more about your goal, and I'm sure we can help.

share|improve this answer

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.