[stunnel-users] Reverse tunnel with middle server

Jorge A. curruscataphractus at gmail.com
Wed Jul 18 21:46:52 CEST 2012

Hi everyone,

I've search into archives trying to found a solution for my problem without
The problem is simple: make a machine available on HTTP port when it's
behind a e.g. common DSL. I have a
middle server for which I have full access to install any program, linux.
What I was trying to do is the following:
Three machines: Middle server (Server), Target (linux machine behind DSL)
and Client. Same stunnel version on both Server and Target. Latests.

Server is available on the Internet, running stunnel

Target is behind a nat router, e.g. inside a common DSL. I assume this must
run stunnel as well.

Client connects to Server and Server forwards traffic to Target seamlessly.

As far as I know, running stunnel on client mode from e.g. Target and
trying to connect to whichever service on Server does not work on reverse:
you cannot connect backwards to target. Am I correct? If not, how do I
configure both ends and how do I know port to use to connect to Target (log
file?) ?

What I've tested:
1. Run stunnel on Server on server mode accepting ('accept') connections on
a fixed port, e.g. 5000. Here, as far as I know, you must define the
'connect'  directive to forward traffic to either local or remote host. The
problem is, from Server, you don't know Target ip nor it's accessible
2. Run stunnel on Server and, on Target launch stunnel on client mode to

Thanks in advance and congratulations as it's a great piece of software.

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20120718/d9346919/attachment.html>

More information about the stunnel-users mailing list