TightVNC and VNC_VIA_CMD
TightVNC has a '-via' option that allows using a gateway through the client and the VNC server.
TightVNC with this option can use a 'host in the middle' (gateway) to access another host. The VNC_VIA_CMD defines the ssh options to access the gateway.
Example:
host A access host C through host B. A and B have a public IP, but C is behind B. A can access B with ssh. export VNC_VIA_CMD='/usr/bin/ssh -2 -x -p <B sshd port> -l <B user> -f -L %L:%H:%R %G sleep 20' vncviewer -via <B host ip> <C host IP from B>
true life example:
foo --> gateway.bar.com --> 192.168.1.36 foo> export VNC_VIA_CMD='/usr/bin/ssh -2 -x -p 55 -l foo -f -L %L:%H:%R %G sleep 20' foo> vncviewer -via gateway.bar.com 192.168.1.36
- links :
- charcode test:
- &
- &
- &
#. ludo on Thu May 26 00:08:27 2005
I push the limit, I didn't feel good switching to the VPN installation and management.
With this solution I didn't need a VPN server on the host having the vnc server, just ssh access to the gateway :-)

#. Jkx on Wed May 18 12:50:51 2005
Hum .. perhaps it's time to switch to a real VPN solution not a tcp tunneling ? The best part is that you will have some better performance without the gateway overhead.