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

Sorry for the wall of text, I'm a bit of a newbie but have exhausted my search resources.

In order to establish a public IP for my local Django development server, I set up an AWS micro instance as a server for reverse SSH tunneling. The public IP points to the tunnel server, and I create a reverse tunnel from my local machine to the tunnel server which forwards traffic between the public IP and my machine. Here's the command if you're interested:

autossh -M 8001:8001 -NR 80:localhost:8000 -v

I am now working on on-boarding another developer and need to set up something similar for him. I could create a clone of my setup (essentially creating a new tunnel server just for him) but that seems messy, especially as I need to add more developers in the future.

Is there a way to set up a single server that multiple users can use for setting up reverse SSH tunnels, considering those users have unique public IPs but are forwarding the same ports? Basically, can both me and my partner use the same server for reverse SSH tunneling, properly forwarding traffic across the same ports for different public IPs?

Thanks in advance and please let me know if I can clarify.

share|improve this question
why not set up an openvpn server to have secure remote access to your local net? – fuero Feb 12 '13 at 9:38
The local development server needs to be public facing. – Hakan B. Feb 12 '13 at 9:44
up vote 1 down vote accepted

we use it that way:

install a local script for the tunnel (so you don't have to remember :) ) - like:

echo "local: 8080 - remote: 8081"
echo ""
ssh -R 8081:localhost:8080 -g

so the first user listens on the remote port 8081, the second on 8082 etc.

on the server setup nginx as reverse proxy, one 'server' per user:

upstream user_1 {
    server localhost:8081 fail_timeout=0;
server {
    listen   80;
    location / {
        proxy_redirect off;
        proxy_pass   http://user_1;

and don't forget to set create the dns entries... (probably with wildcard to *

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.