LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-01-2006, 06:16 AM   #1
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Rep: Reputation: 30
Connection refused when using Java VNC Viewer


Hello,

I am trying to set up VNC on a Fedora Core 5 box. The server is set up correctly, and I am able to connect to it using Java VNC Viewer if I use http://localhost:5801 (the X display I want is :1). I am also able to connect to it on another computer but it must be on the same LAN. Whenever I try to connect to it from the World Wide Web, Java VNC Viewer gives this error message: java.net.ConnectException: Connection refused. Is there some step I missed out or something I did wrong so that it is not accessible via the World Wide Web? I have already opened up the appropriate ports on iptables (ports 5801 and 5901) but it does not work. So what have I missed out?
 
Old 07-01-2006, 08:29 AM   #2
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Original Poster
Rep: Reputation: 30
Oops, problem *partially* solved. It appears that other computers can connect to this computer, but this computer cannot connect to itself when using it's public IP. When using it's private IP (it's on a NAT), or when using localhost or 127.0.0.1, it works. So my next question is, why does it not work when using it's public IP to connect?
 
Old 07-01-2006, 10:21 AM   #3
fuzzyash
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Fedora Core 4
Posts: 184

Rep: Reputation: 30
When you say "other computers can connect to this computer" do you mean via VNC or some other protocol?

When you refer to it's "public IP" do you mean that this PC is connected to the Internet & is acting as your Internet server/router? If so then why do you then say that it's on a NAT?

Have you tried connecting thru vncviewer instead of going thru http?


This does sound like a firewall config problem. You say you have opened ports 5801 & 5901 but do you have them NAT'ed to the servers local IP & ACCEPT on the FORWARD chain?
 
Old 07-01-2006, 07:40 PM   #4
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Original Poster
Rep: Reputation: 30
Sorry, looks like I wasn't too specific in my previous post. I do mean that other computers can connect via the VNC protocol. This computer is not directly connected to the internet, but through a router. I have forwarded ports 5801 and 5901 to this computer's private IP.

Yes, I have tried connecting through VNC Viewer, but the same error message appears.
 
Old 07-12-2006, 01:21 AM   #5
fuzzyash
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Fedora Core 4
Posts: 184

Rep: Reputation: 30
Sorry for taking so long to get back to you.

The next step would probably be to see if port 5901 is open to the world. Make sure your firewall/router is configured to allow ALL traffic to access this port, go to https://www.grc.com/x/ne.dll?bh0bkyd2 , click proceed, type 5901 into the text box & click "User Specified Custom Port Probe"

If the result is Stealth or Closed then something is wrong with your firewall/router config, if it says open then we'll have to look a little deeper.

Good luck & let me know how you went.
 
  


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 to SUSE Linux 10 from a Windows XP VNC Viewer determin2excel Linux - Software 13 10-03-2007 09:38 AM
Vnc : Connection refused dragunu Linux - Newbie 5 04-25-2006 05:54 AM
VNC - Connection refused silkyd Linux - Networking 12 03-29-2006 08:09 AM
VNC – Connection Refused markpadam Linux - Security 5 05-07-2004 07:02 PM
VNC Connection refused pacman Linux - Software 7 08-08-2003 12:51 AM

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

All times are GMT -5. The time now is 06:35 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