Reverse VNC under Ubuntu

A reverse VNC connection is one initiated by the machine you will control. Reverse VNC can be kicked off by a user sitting at that machine or via a script. Reverse connections are necessary in many cases by bypass NAT or Firewall restrictions that block incoming connections.

Reverse connections only work if the controlling machine is free to accept incoming connections.

align=middle

Instructions for GUI Launch

  1. On the controlling machine: run "Vinagre", which is the default VNC viewer for Gnome. Vinagre is normally called "Remote Desktop Viewer" under Ubuntu. From menu Machine->Reverse Connections enable reverse connections. Click the triangle to see connection information.

  2. On the machine to be controlled instruct the user to run "Vinagre" and select "Connect". Enter the hostname and port number that will reach the controlling Vinagre.

This method has been tested on Ubuntu 10.04, 10.10, and Ubuntu 11.04 as of June 2011. More information on x11vnc can be found at http://www.karlrunge.com/x11vnc/.

Instructions for Command Line Launch

  1. On the controlling machine: run "Vinagre", which is the default VNC viewer for Gnome. Vinagre is normally called "Remote Desktop Viewer" under Ubuntu. From menu Machine->Reverse Connections enable reverse connections. Click the triangle to see connection information.

  2. Test the connection. From outside your network run "telnet mymachine.dyndns.org 5505" where you fill in the proper hostname and port number that will reach Vinagre. Vinagre should respond with a black screen.
  3. Finally, on the machine to be controlled run a VNC server that can launch from the command line. Use the "w" or "who" commands to verify the name of the X server display and then launch:

x11vnc -quiet -safer -rfbport 0 -xkb -connect_or_exit mymachine.dyndns.org:5505 -display :0

This method has been tested on Ubuntu 10.04, 10.10, and Ubuntu 11.04 as of June 2011. More information on x11vnc can be found at http://www.karlrunge.com/x11vnc/.

VNC/Reverse (last edited 2011-07-26 08:50:41 by 78-105-201-166)