I have a Pi that connects to the internet via a 3G dongle. I need to be able to remote desktop/VNC to this Pi from my home network. Is this even possible, and if so, how do I go about doing this? Obviously the Pi isn't "on-site" yet and I still have physical access to it, I just need to know how to set it up.
My first idea was to use OpenVPN client and OpenVPN server to have your remote Internet connected Raspberry Pi VPN into an OpenVPN server on your home network. However after reading some of the details to get this working I decided to look for a more simple solution.
I found this article that shows how to use OpenSSH installed on the remote Raspberry Pi to SSH into a machine on your home network and then have your home computer create a local TCP port (2222 in the example) that would automatically get forwarded to the SSH port (22) on the Raspberry Pi.
Here's another article that describes the same process and even shows a recommendation to have a CRON job create the SSH connection from the Pi every 10 minutes in case the connection every breaks.
Of course, the computer on your home network needs have an SSH daemon installed and your home firewall needs to allow that computer to receive in bound connections. You should be able to easily configure your home firewall to forward some unused TCP port such as 9099 and forward that to port 22 on your SSH "server" on your home network. Then you would need to use that port with the
-P option on the SSH command running on your Pi. For the 2nd article the
ssh command would be:
ssh -N -P 9099 -R 9091:localhost:22 user@<server_IP>
<server IP> is the Internet address of your home firewall.