Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-16-2005, 10:31 PM   #1
LQ Newbie
Registered: Aug 2005
Posts: 24

Rep: Reputation: 15
Change VNC server port

i've configured an vnc server at my home which i want to access from my work place. but the port's 5800's are blocked so i can't access by the ip: using the browser or a vnc client .... i would like to know if is there any command for vncserver in fedora core 4 so i can connect to my vnc server by the browser using another port for exemple the 80. so i could use the 80 port that is unblocked giving me the possibility to access to the server.
waiting for a answer befeore going to work. =)
ty for the attention
Old 08-16-2005, 11:47 PM   #2
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
vncserver is a wrapper for Xvnc, and the Xvnc man page says this in the options section:
-httpPort port
Specifies the port on which the mini-HTTP server runs. Default is 5800 plus the display number.

So, I assume that you could run vncserver with the same option, and give it 80.

Edit: as a matter of fact, I know you can. From the vncserver man page:

vncserver - a wrapper to launch an X server for VNC.

vncserver [:display] [-geometry widthxheight] [-depth depth] [-pixelformat rgbNNN|bgrNNN] [-name desktop-name] [Xvnc-options...]

So yes, `vncserver :0 -httpPort 80` - plus whatever other options you use - ought to do the trick.

Last edited by rose_bud4201; 08-16-2005 at 11:50 PM.
Old 08-17-2005, 12:00 AM   #3
Registered: Jun 2005
Posts: 53

Rep: Reputation: 15

man Xvnc

there should be an option to set the port, although port 80 is reserved and only root is allowed to host services on this port so you would have to run your server as root which is not a good idea.

Alternatively do the following:

If ssh is open at your work then you can port forward to your VNC server.

If you are using windows then just download putty, its free there is an option for tunneling that you can configure.

So basically you log into your ssh server using putty, from work, and then tunnel the VNC traffic through it. Putty needs to be configured to listen for requests from the VNC client on your work machine.

Make sure that port forwarding is enabled in your /etc/ssh/sshd_config file.
Old 08-17-2005, 12:10 AM   #4
LQ Newbie
Registered: Aug 2005
Posts: 24

Original Poster
Rep: Reputation: 15
ty for the replies.
they answered my questions and solved the difficulty... =)
now working will be much more easier because of u!
Old 08-17-2005, 12:21 AM   #5
LQ Newbie
Registered: Aug 2005
Posts: 24

Original Poster
Rep: Reputation: 15
just one more question.. can i limit the access to a ip range for exemple: - ? how would i configure this? using vnc without ssh tunneling?
Old 08-17-2005, 07:47 AM   #6
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
You're much better off running VNC over an SSH tunnel. It really isn't hard to set up (there are a number of threads here at LQ that give step-by-step instructions). VNC doesn't do any encryption, so all of your traffic is out there in plain text just waiting for someone to pick it up. However, if you really want to run without an SSH tunnel, then your firewall is probably the best way to restrict access by IP address.
Old 08-17-2005, 09:20 PM   #7
LQ Newbie
Registered: Aug 2005
Posts: 24

Original Poster
Rep: Reputation: 15
i'll try to set up with ssh ty for the answers


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PLESK [Solution] Change port to 23 (telnet) instead of default port 8443 x5452 Linux - Software 6 05-10-2009 06:58 AM
vnc port forwarding krayz1e Linux - Newbie 9 08-14-2005 05:46 PM
iptables - change port and forward to a internal server leandrok Linux - Networking 0 01-16-2004 10:52 AM
How to change listening port of echo server [RH9]? immer Linux - Networking 5 11-29-2003 05:30 PM
VNC port redirection sqn Linux - Networking 5 11-18-2003 10:38 PM > Forums > Linux Forums > Linux - General

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

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