There's a machine in my company which people connect to through VPN and work from there. That way, the whole network is blocked from their private machines but opened for that specific box. I want to be able to assign specific VNC ports to specific people, is that possible? if so, how is it done?
Yes you can.
You can edit your
/etc/sysconfig/vncserver file, the one which holds sessions information.
There, you may configure specific ports in the following format:
Then, for each session, configure the relevant screen resolution:
VNCSERVERARGS="-geometry 1152x864" VNCSERVERARGS="-geometry 1600x900"
Check out an example from one of my servers:
[root@localhost ~]# cat /etc/sysconfig/vncservers VNCSERVERS="0:root 2:noc2 3:noc3 6:itaig 8:maher" VNCSERVERARGS="-geometry 1152x864" VNCSERVERARGS="-geometry 1152x864" VNCSERVERARGS="-geometry 1152x864" VNCSERVERARGS="-geometry 1600x900" VNCSERVERARGS="-geometry 1600x900"
That way, each [number] represents a port, the default port is 5900, so following the numbers you will use, the ports will be configured.
0:root stands for 5900 2:itaig stands for 5902
Then, from any vnc client you'll be able to connect like so:
And it will automatically translate it to ip:5902.
I hope that answers your question.