Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am having issues with a VNC. I am currently using Windows XP with UltraVNC. I am unable to connect to a vnc server. The only way for me to connect to the server is if I am connected to another VNC Server using the viewer.

Computer A
Computer B

Computer C

Basically computer A can only view and can only be viewed if Computer B is connected to it via vnc. Computer C can see B without having any other VNC connections present. It's almost like ports are blocked when I am no longer connecting out. Previously I was able to connect to A, B, and C just fine. I have configured ports 5500 and 5900 in my routers firewall. Is there any reason why this should be happening?

I also used Microsofts tool called port query. I put in my external IP address and queried the port 5900 TCP and it came back with this message:

Starting portqry.exe -n -e 5900 -p TCP ...

Querying target system called:

Attempting to resolve IP address to a name...

IP address resolved to


TCP port 5900 (unknown service): FILTERED
portqry.exe -n -e 5900 -p TCP exits with return code 0x00000002.

Here is what happens when I am not connected to a VNC using my vnc viewer

Starting portqry.exe -n -e 5900 -p TCP ...

Querying target system called: 

Attempting to resolve IP address to a name...

IP address resolved to


Error opening socket: 10065

No route to host. 
portqry.exe -n -e 5900 -p TCP exits with return code 0x00000063.

I have obviously changed the Ip address, but is there anyone who knows what is going on here?

Thanks in advance.

share|improve this question

2 Answers 2

I would suggest using something like stunnel to set up a simple tunnel over a different port and forward that port on your router. Personally I prefer port 443 which should already be unlocked and (unlike port 80) should not go through a proxy server. Also note that most free VNC application does not offer encryption and stunnel gives you an encrypted tunnel.

You can find configuration files example for stunnel here: Just change 7777 to 443 (or whatever port you'd like to go through the net).

Note that you then connect to in VNC and stunnel on a client send you to the IP you set in the stunnel.conf file.

You could also use SSH but I find setting up stunnel much simpler as you don't even need to install it (just run before connecting).

share|improve this answer

If the server is behind a nat firewall/router, you have to do more than open a port in the firewall. You have to forward the port to the server.

So, if your router's external address is: And your server's internal address is

Then you need to forward port 5900 on your router to which is your server.

Your correct in that is not responding to connections. It's filtering all incoming connections.

share|improve this answer
Yes, thank you soooo much!! I see that I had the correct IP adderss in the prot forwarding but there was a previous one that was wrong. the Ip Address is dynamic, so I will change that to static and it should not break inthe future!! Thanks again! – Mark Sep 1 '10 at 19:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.