metRo_
Posts: 29
Joined: Mon Jan 23, 2012 10:46 am

Access VNC server outside my local network

Fri Jul 13, 2012 8:53 am

I set up tightvnc and it works locally. In my router I forward the ports 5901 and 6001 to RPi (I did the same for vnc port and it is working) but I can't access it, it always give me an connection error.

How can I know what causes that problem?

Thanks

log of netstat -nap
pi@raspberrypi:/$ netstat -nap
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:58668 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 17700/Xtightvnc
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 17700/Xtightvnc
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 480 192.168.1.36:22 183.125.31.232:37048 ESTABLISHED -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 0.0.0.0:48219 0.0.0.0:* -
udp 0 0 0.0.0.0:111 0.0.0.0:* -
udp 0 0 0.0.0.0:631 0.0.0.0:* -
udp 0 0 192.168.1.36:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp 0 0 0.0.0.0:1006 0.0.0.0:* -

halfabiscuit
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am

Re: Access VNC server outside my local network

Fri Jul 13, 2012 12:31 pm

Can you pi access the internet? i.e. does it have a default gateway of your router?
A good way of checking if your port forwarding is working is to check it with a port checking tool such as:
http://www.yougetsignal.com/tools/open-ports/

Run this from your home network (does not have to be on the pi) and put the relevant port number in the box. This will tell you if the port forwarding has been done correctly.

metRo_
Posts: 29
Joined: Mon Jan 23, 2012 10:46 am

Re: Access VNC server outside my local network

Fri Jul 13, 2012 5:01 pm

halfabiscuit wrote:A good way of checking if your port forwarding is working is to check it with a port checking tool such as:
http://www.yougetsignal.com/tools/open-ports/

Run this from your home network (does not have to be on the pi) and put the relevant port number in the box. This will tell you if the port forwarding has been done correctly.
I'll try, thanks :) Pi is correctly set up because I can access it via SSH over the internet, only the VNC is not working outside the local network :s

EDIT: Port 5901 and 6001 are both open :s

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Access VNC server outside my local network

Fri Jul 13, 2012 5:06 pm

I would keep all but the ssh port closed to the internet and use ssh port forwarding.
http://magazine.redhat.com/2007/11/06/s ... orwarding/

Return to “Troubleshooting”