You are on page 1of 3

howto_tunnel_vnc.

txt
HowTo for BarracudaDrive, goto http://barracudaserver.com/products/HomeServer/

HowTo tunnel VNC


If you want to remotely log into your home PC from work via any firewall and
encrypted in the BD SSL tunnel you can use VNC. http://en.wikipedia.org/wiki/Vnc
Some versions of VNC offer also encryption plugins, but these plugins are not
full SSL compatible and can bypass a firewall
only with help of some external servers. If you use BD tunnel you have no
problems with firewalls and have additional all
the other features of the BD server.
Here a diagram of what we want to do:
http://tunnel-vnc-01.coololdman.com
(maybe my server is down, then try again later)

You can use any flavour of VNC, but I recommend to use UltraVNC (
http://www.uvnc.com ), because UltraVNC offers also a VNC
proxy (called repeater) that allows you in a easy way to login into multiple PCs

on your home network without complicated


port number changes, you can install it without registry settings (this means it
could run parallel to a existing VNC installation)
and also you can buildt yourself a custom portable server version, and has also a

lot of other features and is pretty fast when you install


the display driver. (You can als create a reversed VNC connection, will post this

separately).

At first you must configure your tunnel. Your tunnel shall be always configured
asymmetric to avoid conflicting ports on
the client side. The tunnel will consist of "2 tunnels" ! This means set the

tunnel (when used with the jar file) to:


java -jar httpsTunnel.jar -ssl companyproxy.com:8080 yourdomain.com
55900:localhost:5900 55901:localhost:5901
What means:
companyproxy = when you at work you must configure the proxy used at work, go to
IE, tool - internet options - connections - Lan settings and you will see what
proxy domain and also wich port is used (if a configuration script is configured,
copy this URL and past it in your browser and you will see the file with the
proxy info, based on your IP adress you will be able to identify your company
proxy)

Page 1
howto_tunnel_vnc.txt
yourdomain.com = your domain name at home or your IP adress of your homerouter
(you must forward port 443 on your home router to your BD server)
first tunnel for VNC direct connection to server:
55900:localhost:5900 = the port 55900 is the entry point of your tunnel at your
work PC and localhost in this case is your home PC and 5900 is on your home PC
the exitpoint of your tunnel and will connect to your VNC server at port 5900.

second tunnel for VNC connection via VNC proxy (VNC repeater):
55901:localhost:5901 = the port 55901 is the entry point of your tunnel at your
work PC and localhost in this case is your home PC and 5901 is on your home PC

the exitpoint of your tunnel and will connect to your VNC proxy (VNC repeater) on
port 5901.
You have to configure the tunnel database. Create a rule:
called: tunnel_VNC

/localhost/5900/
/127.0.0.1/5900/
/localhost/5901/
/127.0.0.1/5901/
I assume you only want to give yourself, the admin the permission to use this

rule and not other users of the BD.


Now the installation of the VNC server. You always install the package (use the

latest version, at the moment 1.0.2)) , this will install server and also the
viewer (client) and additional install the video driver on your BD server at

home. Download from http://www.uvnc.com/download/index.html


Install the video driver.

When installed run: install as service, click also install video driver and run
VNC server and configure a password. Use only a maximum of 8 characters for
password to keep it compatible with other viewer versions of VNC.
Right click on Ultra VNC server icon in taskbar and select properties, check for
the video driver and make checkmark to use video driver.
All the configuration, also config for Administrator in VNC keep as default.
Then click in menu install Ultra VNC repeater as a service. Right click on
Ultra VNC repeater icon in taskbar and select Settings, make sure under
accept it says port 5901, we will not use the listen port, dont change the
default listen port.

Now copy from your

Page 2
howto_tunnel_vnc.txt
c:\Program Files\UltraVNC\ (when installed with defaults)
the file vncviewer.exe to your USB stick, the viewer is a portable program, to be
used for remote access from your work PC.
Now how to use it:
USB stick on your work PC, start at first the tunnel, with link from
http://barracudaserver.com/examples/BarracudaDrive/HttpsTunnel/index.html

or download the jarfile and start from commandline. (as explained above)
java -jar httpsTunnel.jar -ssl companyproxy.com:8080 yourdomain.com
55900:localhost:5900 55901:localhost:5901
When tunnel is open start your vncviewer from your USB stick.
When you want to connect directly to your BD server:
key in under VNC server localhost::55900 (you need 2 colons ! when you use

different VNC viewer it may be different!)


do not use anything in repeater.

localhost on port 55900 will connect to your entrypoint of your tunnel at the

work PC and on localhost port 5900 it will


exit at your home PC and connect to your VNC server.

If you have multiple PC on your home network, you use the repaeter:

key in under VNC server homeserverIPadress (for example 192.168.0.12 and no port
number (it will use default 5900)

and now mark the checkmark for repeater and key in under repeater

localhost:55901 (this will connect localhost on your


work PC, on port 55901 (entrypoint of your tunnel) and exit at home on 5901 to

your VNC repeater, and repeater will forward


to your PC on home network as configured in VNC server.
Hope that i do not have to many bugs in my explanation.
//Wolfgang

Page 3

You might also like