Ludo blog

en
Aug 2017
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

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:
  • &
  • &amp;
  • &#38;
by ludovic Bellier on Mon May 16 23:41:19 2005 (Viewed: 8515 / 2 comments )
  |   RSS  |   RSS2  |   Atom  |   Source  |   Edit

#.   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.
#.   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 :-)

Comments not allowed anymore on this post