Because it is CentOS based, I had to go through things differently and had to use parts and pieces from different locations.
The biggest pain was the repeater part since they are a bit tough to find, and tougher to find a CentOS compatible version.
VNC:
Luckily Scientific Linux includes a few vnc options, so I used on already available in their yum repos, TigerVNC.
vncrepeater
Then need vncrepeater:
cd /usr/src/
mkdir uvncrep
cd uvncrep
I had better luck with #2, the git option:
--
1.
wget http://www.wisdomsoftware.gr/download/u ... -ws.tar.gz
tar -xvf uvncrep017-ws
cd uvncrep017-ws
OR
2.
git clone https://github.com/stefanklug/uvncrepeater.git
cd uvncrepeater
make
make install
–
Add a user for the service (and related password)
adduser --no-create-home --system uvncrep
Copy repeater to sbin: cp repeater /usr/sbin/repeater
#Edit /etc/uvnc/uvncrepeater.ini according to your needs.
#Check the following parameters:
viewerport = 5901
serverport = 5902
maxsessions = 10
runasuser = uvncrep
logginglevel = 2
srvListAllow1 = 192.168.0.0 ;Allow network 192.168.x.x
srvListDeny0 = 127.0.0.1 ;Deny loopback
requirelistedserver=1
Run the repeater: /usr/sbin/repeater
Make it run as a service, since the included service related files only work with Debian/Ubuntu distros.
First create vnc service file:
vi /etc/init.d/vnc
Code: Select all
#! /bin/sh
# vnc: start/stop/restart the VNC repeater server
# chkconfig: 3 20 80
# description: VNC repeater server
vnc_start() {
if [ ! -f /etc/uvncrepeater.ini ]; then
echo "File /etc/uvncrepeater.ini does not exist. Aborting."
exit
fi
/usr/sbin/repeater 2>>/var/log/vnc.log &
pgrep repeater >/var/run/vnc.pid
}
vnc_stop() {
killall repeater
rm /var/run/vnc.pid
}
vnc_restart() {
if [ -r /var/run/vnc.pid ]; then
kill `cat /var/run/vnc.pid`
else
echo "Killing repeater in the absence of /var/run/vnc.pid"
killall repeater
fi
sleep 1
vnc_start
}
case "$1" in
'start')
vnc_start
;;
'stop')
vnc_stop
;;
'restart')
vnc_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
chmod +x /etc/init.d/vnc
chkconfig --add vnc
chkconfig --level 3 vnc on
Logging:
Log is in /var/log/uvncrepeater.log
iptables
iptables rules needed:
iptables -I INPUT 4 -p tcp -m tcp --dport 5901 -j ACCEPT
iptables -I INPUT 5 -p tcp -m tcp --dport 5902 -j ACCEPT
service iptables save
Then install and use/compile ChunkVNC like normal and works great! In the case mentioned above:
Ports:
Viewer: 5901
Server: 5902 (443 will not work here)