LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2005, 10:13 AM   #1
ivadima
LQ Newbie
 
Registered: Dec 2005
Location: Halifax
Distribution: Redhat 9.0
Posts: 3

Rep: Reputation: 0
Good old VNC connection problem.


Please do not blame on me for bringing that question here but after days of searching in Internet for the answer I gave up and desided to ask the question myself.

I have VNC running on Redhat 9.0. When I try to connect with VNC client in my internal network (addresses 192.xxx...) I can connect with no problems. But if I try to connect from the external world or even in internal network by giving external IP my connection fails with an error Connection refused (10061).
My internal network stays behind a hardware firewall/router so the most obvious thing to look after would be the router settings. On the router connected to CableModem I opened the ports 5900, 5901, 5800, 5801, 21, 22 and forwarded them to the same port numbers of the internal IP of my Redhat. On the Redhat (RH) box I disabled the firewall at all.
From outside I can connect to Telnet(21) or SSH(22) but for some reason it fails to connect to VNC. From the client I tried to specify "24.xxx.xxx.xxx:5900", "24.xxx.xxx.xxx:5901", "24.xxx.xxx.xxx:0", "24.xxx.xxx.xxx:1", "24.xxx.xxx.xxx:5800", "24.xxx.xxx.xxx:5801" and nothing works.
I even tried to put my RH to demilitarized zone (DMZ) so the external IP is mapped to RH internal IP but the connection still fails.

Any suggestions what to try else?

Thank you
 
Old 12-15-2005, 10:45 AM   #2
ivadima
LQ Newbie
 
Registered: Dec 2005
Location: Halifax
Distribution: Redhat 9.0
Posts: 3

Original Poster
Rep: Reputation: 0
I forgot to mention that if I try to connect to Redhat VNC from the same box by giving the internal IP everything works fine but with the external IP it fails with the same error.
 
Old 12-15-2005, 11:47 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Actually it is a good thing that this is failing because connecting directly to VNC over the internet is a horrible breach of security. VNC transmits EVERYTHING (including passwords) in clear text.

So, what you really want to do is learn how to set up an SSH tunnel that VNC will work through. Since you can already connect via SSH, this should solve your problem. If you do a search here, you'll find dozens of threads on how to run VNC over an SSH tunnel.
 
Old 12-15-2005, 02:55 PM   #4
ivadima
LQ Newbie
 
Registered: Dec 2005
Location: Halifax
Distribution: Redhat 9.0
Posts: 3

Original Poster
Rep: Reputation: 0
2 Hangdog42

VNC over SSH works fine, thank you for the advise but I still do not understand why the direct connection doesnot work if all the necesary ports are open.
 
Old 12-15-2005, 03:13 PM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
I agree, from what you've posted it should work with a direct connection. The only thing I can guess is that somehow the port forwarding isn't quite right. You really should only have to forward one port for each screen you've got running on VNC. You've disabled the firewall, so that isn't it and if you can run VNC over an SSH tunnel, then VNC is working right. About the only thing left is the port forwarding.
 
  


Reply



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
VNC - Connection refused silkyd Linux - Networking 12 03-29-2006 08:09 AM
VNC connection issues... Joshoowa Linux - Networking 2 02-05-2005 07:07 AM
VNC Connection Problem karym6 Linux - Software 3 04-20-2004 01:41 PM
VNC Connection refused pacman Linux - Software 7 08-08-2003 12:51 AM
VNC Connection Woes Fusion Linux - General 8 09-24-2001 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:42 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
Open Source Consulting | Domain Registration