Tuesday, April 16, 2013

Setup your own VNC reflector!

   So if your like me when someone calls complaining about their computer, you first listen to what they're saying (chances are you might not get much from it), then ask to see the issue. There's a couple of ways this can be done. The first way is physically going to look at the machine or problem, but honestly, ain't no one got time for that. Then there is the "free" remote services, like Team Viewer, Logmein, and if you're desperate, you setup a adobe connect trail account and go from there. However if your doing this for money, you should be paying those companies so as not to steal their product. So how then can you access computers outside your network? Easy, you setup a VNC reflector then use TightVNC . TightVNC is really handy and, free. The concept is you install TightVNC on all computers you control for a customer, or have them install it on the machine your helping with. Now if you have a domain this is easier but I'm going to go through it as if you don't.  When they call with an issue, you just have them "attach" to your reflector, then you view it. It's a nice secure way to remote control machines, and multiple people can view it. So if your training someone they can view the same machine your working on.

First off though, you need a "server" to host the reflector. I'm using a machine with Ubuntu 12.10 but any Linux distro well do it. Then you'll need to get the following onto that machine. If your a novice you can download it directly or just download it then scp/rsync it over.  I did the following as root because I'm lazy so you hard chargers might need to add sudo in front of the commands.


If your using a Debian based machine run the following to get the dependencies:

apt-get install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc 

For Redhat ( Centos, Redhat, Fedora) use:

yum install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc 
Now move the package you downloaded to /usr/local/src

mv uvncrep015-ws.tar.gz /usr/local/src 

Unpack it:

gunzip uvncrep015-ws.tar.gz 
tar -xvf uvncrep015-ws.tar.gz 

Install it:

cd uvncrep015-ws 
make; make install; 

It will need a user to run ass so make one:

useradd uvncrep 

The ini file is /etc/uvnc/uvncrepeater.ini . feel free to play around with some of the settings but here's a few important ones to look for:

viewerport = 5901 
maxsessions = 10 
runasuser = uvncrep 
logginglevel = 1 
srvListAllow1 = ;Allow network 192.168.x.x 
srvListDeny0 = ;Deny loopback 

Start it up the service:

service uvncrepeater start 

That's it really, to test it install TightVNC on a computer and then "attach listening viewer" depending on how many sessions you specified in the ini you can have alot of channels. Type the hostname or IP of the reflector then the port, ex. . The TightVNC icon will turn black. Then on another machine just use the VNC viewer and connect to and away you go! For external use you'll have to do some port forwarding. More information on that can be found at http://www.uvnc.com/docs/uvnc-repeater.html

Also a fellow by the name of Neil Whelchel has a really sweet repeater, but he hasn't written any docs or released it. Maybe someday though.....

1 comment:

  1. Looks like the author has done a few updates since you posted this article. Updated link: