LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 03-05-2007, 05:04 PM   #1
sirius56
Member
 
Registered: Nov 2006
Location: Illinois
Distribution: Ubuntu 10.4
Posts: 35

Rep: Reputation: 15
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.
 
Old 03-05-2007, 05:26 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
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
 
Old 03-05-2007, 07:22 PM   #3
sirius56
Member
 
Registered: Nov 2006
Location: Illinois
Distribution: Ubuntu 10.4
Posts: 35

Original Poster
Rep: Reputation: 15
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.
 
Old 03-06-2007, 05:20 PM   #4
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
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
 
Old 03-06-2007, 09:16 PM   #5
sirius56
Member
 
Registered: Nov 2006
Location: Illinois
Distribution: Ubuntu 10.4
Posts: 35

Original Poster
Rep: Reputation: 15
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.
 
Old 03-07-2007, 05:40 PM   #6
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
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
 
  


Reply

Tags
vncserver


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
auto create 2 vncservers for 2 different users deadeyes Ubuntu 0 02-25-2007 11:13 AM
Multiple users need to access files stpierrc Debian 2 12-25-2005 06:58 PM
Multiple access to the same HDD F0ul_Olli Linux - Hardware 3 09-07-2005 12:15 PM
Multiple access to soundcard cubax Linux - General 1 04-26-2005 09:34 PM
Staroffice multiple user access zLinuxz Linux - General 2 04-17-2002 06:05 PM


All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration