1

I have VNC running on my PI with the default port ("netstat -npl" suggests that is 5901). I am trying to set up Port Forwarding on my router to let me VNC in to my PI from an external network. I have my router configured to foward port 5000 to 5901 on the PI.

When I connect to my PI on the same LAN, I use Tight VNC Viewer with the PI's IP and specify :1 for the display. For instance:

192.168.1.200:1

On my remote machine, in Tight VNC Viewer, I am trying to connect, but I need to specify the port. TightVNC instructs you to do so using :: for the port, such as:

myDnsName::5000

That fails, presumably because I haven't included the :1 for the display number. Is there a way to specify both the port and display number? "myDnsName:1:5000" and "myDnsName::5000:1" return errors.

Additionally, I tested the port forward of just 5901 to 5901. From my remote machine trying just "myDnsName:1" did not work.

Edit:

It seems like my port forwarding settings didn't apply correctly. Not sure how that heppened, D'oh!

  • By "mydnsname" do you mean public IP? – Mohammad Ali May 23 '16 at 21:10
  • No, I meant the dynamic DNS Name pointing to my IP address. Public IP would also work though. – yourbuddypal May 24 '16 at 0:02
  • please mark an answer as correct by clicking the checkmark to the left of it – Mohammad Ali May 24 '16 at 0:40
2

From my experience when connecting to the PI you need to simply add the display number to the port number. For example when connecting to a VNC on display 1 you would use your.ip.goes.here:5901 (instead of your.ip.goes.here:1)

If the VNC server was on display 2 you would use your.ip.goes.here:5902

Also make sure that the port you are forwarding is the same as the port on the pi, so if you want to connect to display one you would forward port 5901

  • This did it! myDnsName::5901 worked. – yourbuddypal May 23 '16 at 23:43
  • At first I thought this was the solution, but It seems like my port forwarding settings didn't apply correctly. myDnsName:5000 worked but NOT myDnsName:5001. Not sure how that heppened, D'oh! – yourbuddypal May 24 '16 at 0:01
  • Thanks, all the tutorials are telling you should connect to vnc://<ip>:1 which is wrong. This did the trick for me on a MAC. – Andi Giga May 24 '16 at 11:19
0

Try using the command below

myDnsName:1::5900

You wrote a similar command in your question as something that gave you an error. But you were missing a colon before the port number. Please feel free to read more about vnc here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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