LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to access multiple vncservers (https://www.linuxquestions.org/questions/linux-server-73/how-to-access-multiple-vncservers-534844/)

sirius56 03-05-2007 04:04 PM

How to access multiple vncservers
 
Using RealVNC (PC) or Chicken of the VNC (Mac) I can easily view a linux box remotely. It's surprising how well that works. vncserver listens on port 5900 and my router forwards that port to the static IP of my machine.

Suppose I have multiple linux machines running vncservers. Please tell me how I can get the vncservers to listen to different ports? For example,

linuxbox1 vncserver on 5900
linuxbox2 vncserver on 5901
linuxbox3 vncserver on 5902
...

Thank you.

Brian1 03-05-2007 04:26 PM

You could just leave them all to listen to the same port. Then on the router you just redirect port 5901 to the port 5900 on static IP box # 2. Same for box #3. Jusr forward external port 5902 to internal IP port 5900 of box #3.

Brian

sirius56 03-05-2007 06:22 PM

Brian, Thank you for responding. I've done port forwarding before for ssh, apache, etc, but something is fuzzy here.

I have a popular router, the Linksys WRT54G and the settings for Port Range Forwarding are six fields. You are suggesting that I set up a row as follows:

Application: vnc
Start: 5901
End: 5900
Protocol: TCP
IP Address: 192.168.1.12 [if the static IP is 12]
Enable checked.

If I try to save this, the router saves the settings as
...
Start: 5900
End: 5901
...

It flips the two settings.
What am I not understanding here?

Thank you.

Brian1 03-06-2007 04:20 PM

Never used that router so no idea what to look at. This is what I assumed you wanted. You want vnc access to all three machines. Then needed access from the outside. This is where I assumed you setup 5900 on all machines as the vnc port. Now doing as follows for each.
machine 1: ext IP port 5900 to lan IP port 5900
machine 2: ext IP port 5901 to lan IP port 5900
machine 3: ext IP port 5902 to lan IP port 5900

Brian

sirius56 03-06-2007 08:16 PM

Brian, Thank you for your response.
The settings on my router were different than your suggestion, but I was finally able to access three linux boxes from the outside. My settings were
external port 5900 forwarded to static IP addres 192.168.1.17
external port 5901 forwarded to static IP addres 192.168.1.18
external port 5902 forwarded to static IP addres 192.168.1.19

All boxes listen on port 5900. Not sure of exactly how the signals are routed to the boxes.

I found this suggestion in the following link:
http://fedoranews.org/tchung/vnc/

However, I am curious about your approach and will try it.

Thank you.

Brian1 03-07-2007 04:40 PM

Something like that is easier to explain in iptables terms but you have it working fine. Looks great. The vnc link you posted is a good one. Use it a lot myself.

Brian


All times are GMT -5. The time now is 04:02 PM.