Basically all is working as expected I would say. You have a VNC server running on your RPi and your are able to connect from local network using IP address xxx.xxx.xxx.xxx:1 correct?
To access VNC on a public network (e.g. the Internet), you must forward the appropriate ports through your router/firewall. The exact steps are based on your specific router model. Here’s a basic guide to port-forward VNC Ports:
- Find the local IP Address of your PRi running VNC Server
- Login to your router’s web interface (e.g. http://192.168.1.1)
- Find the “Port Forwarding” section of your router
- Create a new “Port Forwarding” rule
- Set the source and destination ports to TCP 5901
- Set the destination IP Address to the IP Address of your RPi (found in Step 1)
- Run the GRC ShieldsUP Port Scanner to see if the port is open and listening