I recently managed to setup a Raspberry Pi 2 Model B as a VPN Server, and was using PuTTY to control the Pi via SSH during the setup.

I had previously enabled RealVNC on the Pi and set up my account with the intention of using it to transfer the OpenVPN config files back to my computer.

However, when I try to connect to the Pi, which is saved as part of my "team" on my RealVNC account, RealVNC seems to have difficulty connecting. The screen gets part way through refreshing, before cutting to what you see here: Error Screen This happens repeatedly for ~10 minutes, but then eventually connects and works as normal.

The weird thing is that this only happens with my laptop, and every time I've tried it on my phone it works just fine connecting to my Pi.

I have tried to connect from both my home network and other networks and I always get the same result: My computer has issues but my phone always connects first time.

I don't know if this is due to my computer's security software (Kaspersky) interfering (although I did try disabling Kaspersky but still the VNC couldn't connect) or if I messed up port forwarding on my router, or somehow messed up the ports that the Pi is listening for. Or it could also be an error with windows, I'm really not sure.



I have now set up port forwarding on my router so that traffic from port 5900 is forwarded to my raspberry pi. I did this as when I went into the "Diagnostics" tab of VNC Server and tested the connection to the cloud, it reported that the router was sometimes blocking traffic from the cloud, or not sending it to the right place. I set up the port forwarding and now the diagnostic tool doesn't show this error, but my Laptop still has difficulty connecting.

Detailed below are the steps to get to the diagnostic tool should anyone find it useful:

First go to the VNC server menu and the click the icon that looks like a person: VNC Server diagnostics 1

Then click the "diagnostics" tab and click the "Test direct connection" button: VNC Server diagnostics 2

Then click "start" and it will test the connection to the VNC cloud. VNC Server diagnostics 3

However I am still having issues so I suspect this was not causing the issue anyway.

Connecting over LAN rather than through a cloud connection doesn't work first time either on my Laptop. But my phone always connects first time.

  • Can you connect form LAN your if you don't sign in? Oct 30, 2017 at 18:36
  • @mintyfreshpenguin When connecting via LAN without logging in (I just typed the Pi's IP into the new connection menu which I presume is correct) the connection still has the same problem. In light of this, I found a "Test Direct Connection" button on VNC server on my Pi, and it said that "VNC Server appears to be behind a NAT router with IP address xxx.xxx.xxx.xxx. You will need to configure that router to forward port 5900 to this computer before you can establish direct connections to VNC Server over the Internet." I will try this and see if that works. Thanks very much for your suggestion. Oct 30, 2017 at 22:21
  • After setting up the port forwarding the issue still persists. It is odd that it's only on my laptop, though. Oct 30, 2017 at 22:21
  • 1
    I'm not a Windows guy. but was wondering if it's a firewall issue and came across this. http://flummox-engineering.blogspot.com/2015/08/making-vnc-work-in-windows-10.html Nov 1, 2017 at 11:44
  • @mintyfreshpenguin That's fantastic thanks! I'll have a go at changing some firewall settings. My Widows firewall is actually completely disabled as the firewall is handled by my security software - Kaspersky. I'll have a go and see what I can do. Thanks. Nov 1, 2017 at 18:44

1 Answer 1


Issue no longer persists after upgrading to a new laptop, so I have marked the issue as solved. It could have been to do with the old security software, but I tried completely disabling it and it didn't have an impact.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.