Stunnel.org  
   
Home
About
News
Faq
Examples
Download
Patches
Support
Related
<Examples>
To tunnel a VNC connection Definitions:
Server
The machine on which you'll run a VNC server. You'll be viewing this machine's desktop somewhere else.

Client
The machine at which you wish to sit, launch a VNC client, and view the remote (server) desktop.


server$ stunnel -d 7777 -r 5901		# recieve from 7777, route decrypted
					# packets to local vncserver

server$ vncserver :1			# start vncserver on first
					# screen (port 5901)



client$ stunnel -d 5901 -r server:7777	# tunnel vnc to server
client$ vncviewer localhost:1		# connect to local stunnel process




Another example, using Stunnel 4.x, provided by Michael D. Setzer II:


Date: Fri, 14 Mar 2003 05:47:06 +1000
From: "Michael D. Setzer II" 
Subject: Stunnel / VNC - Windows to Windows

Below is what I have setup using Stunnel 4.04 between windows
machines. It differs from the example on your page that seems to
be unix. Also, looking for a windows way to generate .PEM file, just
used you online method to create a test one. Currently using the
one downloaded from your site. This seems to work fine, and use it
for a local test W98 to W98 link, and a W98 to WK2000. Don't
know if it is missing anything. Thanks.

The machine that is running the server only needs to map the port
used by the stunnel (in this example 7777) to the VNC port 5900.

The client machine maps local port to VNC servers thru the stunnel
port (again port 7777 in this example). I have is setup to use
127.0.0.1 or 127.0.0.1:5900 to go to one server, and
127.0.0.1:5901 to go to a totally different server.

All the files are just downloaded, and it seems to work fine. I don't
know how to create the stunnel.pem files, so just have it using the
one from the site.

PORT]
 client = no
 cert = stunnel.pem

 [vnc]
 accept = 7777
 connect = 5900


VNC servers]

 client = yes
 cert = stunnel.pem

 [vnc]
 accept = 5900
 connect = xxx.xxx.xxx.xxx:7777
 [vnc2]
 accept = 5901
 connect = 192.168.0.8:7777


LIBEAY32 DLL     1,379,459  12-31-02 11:54a libeay32.dll
LIBSSL32 DLL       476,329  12-31-02 11:54a libssl32.dll
OPENSSL  EXE     1,089,536  12-31-02 11:54a openssl.exe
STUNNEL  EXE        59,904  01-12-03  4:54p stunnel.exe
STUNNEL  PEM         1,690  02-28-03 12:24a stunnel.pem