VNC remote control of Desktop

For everything that's not in any way related to PureBasic. General chat etc...
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

VNC remote control of Desktop

Post by PB »

This is mainly addressed to Freak, but anyone else with a clue can chip in. ;)

I've got the VNC server running on my home PC, but when I tried to "log in"
from my work PC I got this error message in a little Java window:

Code: Select all

java.net.ConnectException: Connection refused
Warning: Applet Window
At home, my PC normally runs ZoneAlarm but I had it turned off for this test.
Also, the Windows XP firewall is NOT enabled either... so I don't know why I
can't connect. Can my employer's PC be forcing an outbound restriction?
I would doubt it, as I can browse any other web sites without problems.
I do have a password set up with VNC but I never get that far to actually
enter it... I only get to choose a server (my home PC's IP address) and
then the error above happens. :(

(@TerryHough: I got your PM about VNC but your info is more confusing than
Freak's... :) I'll try to get Freak's method working first before I embark on any
more elaborate uses of remote control).

EDIT: Actually, I just saw this web page regarding the error:
http://www.realvnc.com/pipermail/vnc-li ... 27831.html
What does "redirecting port 5900" mean? Does it mean the server's
"accept connections on port #" and "serve java viewer on port #" should
be the same port number? The former is set to 5900 and the latter to
5800, which are the defaults... I guess I'll have to wait until tomorrow
to try again (grrr!).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Is your home machine connected directly to the internet or through a gateway? In my case I have an ADSL modem connected to the internet and several boxes connected to the modem via internal lan. To get requests *from* the internet to a specific machine I need to tell the gateway to forward specific TCP and UDP ports. This is what "redirection" is.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Is your home machine connected directly to the internet or through a gateway?

I wouldn't have a clue. :) How do I find out? According to Device Manager,
my modem is a D-Link DSL-200 USB ADSL Modem(WAN). I connect to my
ISP via PPPoE (or whatever it is) -- I think. Pretty sure I've seen that text
a lot during my setup of it. :) The "number" I connect to (for my ISP) is just
"8,32" along with my username and password.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Just had a quick glance at dlinks website. I'm assuming it does not do any packet filtering at all so I don't think this is your problem. If your VNC server is the machine in your sig then I would look at XP's settings.

Edit: From info in your first post I now guess it's your employers network (routers/firewall) that's the problem.
freak
PureBasic Team
PureBasic Team
Posts: 5947
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

> This is mainly addressed to Freak, but anyone else with a clue can chip in.

Sorry, i'm not really an expert on this either.

I usually use this only in local networks to access my server, so i don't
really know what might be wrong there.
quidquid Latine dictum sit altum videtur
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

btw: on the new VNC the CLIENT needs to accept the connection [a msnbox where you can choose yes or no], and if nothing gets touched the connection will automatically be refused...

this can of course be turned off, but default its on!
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Post by TerryHough »

@PB

Sorry, didn't mean to be confusing...

VNC is really two pieces of software:
1) VNC Server - this is the server piece you are running on your machine to accept and handle connections, pass on commands, etc.
A case sensitive password must be established in its configuration before it will accept connections.
2) VNC Viewer - this is the client end piece. Run this at the client machine and it will ask for the URL/IPAddress of the server. It will then contact the server and when connected the server will ask for the password. Enter the case sensitive password for authentication and the serve will grant access. The Viewer then communicates with the server to provide display, mouse, and keyboard control of the server machine.

Hint: Right click on the top window desctiption bar to see the viewer's menu of actions.

If possible, attempt to use the Viewer to access your server before you attempt to contact it using a browser. I have seen a couple of server systems that wouldn't work that way, even though the option was checked. I suspect the Java software on that machine wan't up to date.

Freak's suggestion of using a browser to access the Java applet portion of the server also works well. The server's Java applet option box must be checked. It only advantage though, is that it does not require any client software, you can just use the standard browser. There are fewer features available and the display size is a bit more restricted.

I am not an expert, but I am very experieced using VNC. Probably utilize it 20 times a day to control various systems

Good luck
Terry

Edited later: I am refering to the download available from RealVNC which I use. I have found it very stable. About a year ago, I gave TightVNC a spin, but found it locked up regularly and dropped it. However, it has been updated since then and may be acceptable now.
eevee
User
User
Posts: 69
Joined: Sat Jan 08, 2005 6:24 pm
Location: UK

Post by eevee »

PB

Has this worked before?

If not, are you sure you have the right address for your home machine?

Presumably the latter is through your Internet Service Provider (ISP) and is thus likely to change - often if on dial-up, less often if on Broadband unless of course you subscribe to a fixed address system.

The way I arrange it is that I ask people to go to a 'secret' page on my web-site. The page has got a counter active.

Thus all I have to do is look out for a hit on that page which will give me the current address of the source.
Regards,

Ernest
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

I use VNC now in a way similar to what you want PB, this is what i did to get mine up and running:

Code: Select all

1. Started the VNC server on my pc. ZoneAlarmPro immediately asks if i should give VNC Server permission to act as a server, click 'Remember Settings' and click 'OK'. 

	Configure VNC Server thus:

	Authentication Tab:
		VNC 3.3 Auth, no Encryption [ON] and provide password!
		Prompt local user to accept inc conns. [OFF]
	Connections Tab:
		All as default!
	Inputs Tab:
		All as default!
	Sharing Tab:
		All as default!
	Desktop Tab:
		All as default!
	Hooks Tab:
		All as default!
	Legacy Tab:
		All as default!

2. Open Zone Alarm

	Configure ZoneAlarmPro thus:
	
	Go to the Program Control tab.
	In the list, click on VNC Server for Win32
	Click the Options button in the lower right corner this opens 'Program Options'
	Select 'Allow access for ONLY the ports and protocols checked below'
	Click the 'Add >>' button and in the drop down select 'custom...'
	Uncheck the 'UDP Port(s)' option
	in the 'Description' box type 'VNC http Port'
	in the first 'Ports' box type, 5800
	Click OK
	Click the 'Add >>' button and in the drop down select 'custom...'
	Uncheck the 'UDP Port(s)' option
	in the 'Description' box type 'VNC connection Port'
	in the first 'Ports' box type, 5900
	Click OK
	Click 'Apply' in the 'Program Options' dialog.
	Click OK in the 'Program Options' dialog.
	Close ZoneAlarmPro

3. Find out the IP of you server

	Open a command prompt and type 'ipconfig' and press return.
	This should list the IP of your ADSL modem connection use this in a browser thus:

	http://000.000.000.000:5800/

	where '000.000.000.000' is the IP of your ADSL modem connection. This downloads the client using java to your browser and you can see your machine remotely! Awesome!!!
This worked fine for me when i checked my desktop from work going through our systems firewalls etc.. I also disabled the MS firewall at home too.
--Kale

Image
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: VNC remote control of Desktop

Post by tinman »

PB wrote:What does "redirecting port 5900" mean? Does it mean the server's
"accept connections on port #" and "serve java viewer on port #" should
be the same port number? The former is set to 5900 and the latter to
5800, which are the defaults... I guess I'll have to wait until tomorrow
to try again (grrr!).
The port numbers should be different. The "accept connections" one is the port to use when connecting with the VNC client software. The "serve java" is the port to use from your web browser / java.

Personally I prefer the client software as there is an option in the system menu for sending a ctrl-alt-del key combination which doesn't seem to be there in the java one (and pressing those keys operates on my Win32 box at work). I don't think ctrl-alt-end works, which is what the MS RDP client / server uses.

Your employer could be blocking non-standard ports, such as 5800 and 5900. Your web browsing would be on 80 so that's completely different from your VNC.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: VNC remote control of Desktop

Post by PB »

Hi all, I just got to work and still can't connect -- ARGH! :evil: Now I have to
wait 9 hours before I can get home and change things. :cry:

@eevee: Yes, I definitely have the right IP address for my home PC. It's
ADSL with a dynamic IP, and I've been connected with the same IP for a
few days now. I always double-check it before I leave for work anyway,
just in case. :)

@Kale: Thanks for your detailed description for ZoneAlarm -- I'll have to
do this when I get home, in case ZA is the cause... but I did try it with ZA
not running, so I doubt that's the problem.

@tinman: Maybe you're right about my work PC not being allowed to
connect to non-standard ports... maybe if I set VNC Server to port 80
then it'll work? I'll have to try.

@thefool: When you say "client" you mean my PC at work, yes? If so,
I've not seen an option with VNC Viewer (v4) like that...? And this also
answers another query: I've tested the VNC Viewer (in addition to the
web Java applet) and it also doesn't connect either -- I get this error:
"Unable to connect to host: Connection refused (10061)".

Frustrating! :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: VNC remote control of Desktop

Post by tinman »

Well if you want to try to test your outgoing VNC connection I can let you have access to my computer to try it.

As long you promise not to break anything >)

PM me for the info.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

@tinman: Maybe you're right about my work PC not being allowed to
connect to non-standard ports... maybe if I set VNC Server to port 80
then it'll work? I'll have to try.
Not sure what version of VNC you are using, but with TightVNC, you can only use 58xx for the web based client, and 59xx for the thick client (where xx is the display number, defaults to 00).

[1st edit] I wonder if one could NAT the external port 80 to an internal port 5800?? Hmmm....

[2nd edit] DOn't get your hopes up, looks like the web client still uses port 5900 to make a connection...

[3rd edit] I cound not find a way around the use of port 5900. Port 80 NAT's fine to 5800 but then the client tries to use port 5900 for the session. I found this site while looking for options: http://www.logmein.com
It says it is free (but offers a pro version that costs). I loaded it and will test it tomorrow on our corporate WAN. Looks like it uses Java also.
-Beach
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: VNC remote control of Desktop

Post by PB »

Some info regarding the "10061" error message that I got with VNC Viewer:
I went to these forums later that day and got this error from Internet Explorer.
Maybe it can somehow explain why VNC Viewer can't connect to my home PC?

@Tinman: Maybe this weekend I can try connecting to your PC from my one?
That would be interesting as it would show if my work PC is the problem.

Image
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: VNC remote control of Desktop

Post by tinman »

PB wrote:@Tinman: Maybe this weekend I can try connecting to your PC from my one? That would be interesting as it would show if my work PC is the problem.
Yeah, if I'm around. Don't think I've got any plans to be away from home.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Post Reply