Here is a pretty simple, safe, free way to get access to your machines from the internet.
Was looking for a secure way to get at my raspberry pi, but this works for a NAS or a server or whatever you have on your internal network, that you want to keep safe from the outside world, but want access to.
One thing that made this easy is the router I have, courtesy of tmobile, a TM-AC1900, which is really an Asus RT-AC68U.
This is a really nice, fast router, and it has support for openVPN built in.
Asus also offers a ddns (dynamic dns) service, that maps a custom name to your home ip address (which can change). This lets openVPN find your home network over the internet.
Without an ASUS router, you can run an openVPN server on a pi, but it is more complicated to setup. And you would need a ddns service. There are some free and cheap ones to look into.
I did some research on VPN security, and while PPTP is better than nothing, there is a known way to break it, so it is not recommended. OpenVPN is secure, so you don't have to worry about someone getting access to your stuff.
So here is what I did, to connect my android phone to my router, via OpenVPN.
On the router, don't use the normal 192.168.1.x for the internal ip address. Change the .1. to something else, this avoids conflicts down the road. Select LAN on the left. Change the IP address, then select apply.
Enabled DDNS. Select WAN on the left, then DDNS tab on top. Yes to Enable the DDNS Client, I used the asuscomm.com free ddns server, created a new address. It checks for availability. Then click apply. You don't have to worry about remembering the address, it will automatically insert the address into the openvpn file below.
Added my pi as a static IP address. Click LAN on the left, DHCP Server on top. You need the MAC address for your device. Or let your device connect to the router, and then select the device. Set the IP address to whatever you want. After you click apply, you should reset your device, pi in my case. It will come up, and talk on the static ip address now.
You should make whatever you want to talk to a static IP.
VPN. Select VPN on left. It will start at the Server screen. Enable VPN Server to ON. Change server mode to openvpn.
Create some usernames and passwords, add and save.
Export the OpenVPN configuration file. Note that you should do the DDNS step before doing this, and it will use the ddns address you created. The file you export should be called client.ovpn or maybe something similar
email the file to yourself
Android VPN setup
install open VPN connect on your phone.
go to your email, and download the client.ovpn file
start the open VPN connect program, and select the ovpn file. It was in my downloads directory of the sd card on my phone
enter your username and password
hit connect, wait a few, and it should connect.
Now you have a vpn connection from your router to your phone. This is basically a secure pipeline between your phone and your home network. No one else can see what's in this pipeline.
You can call up your browser, and enter an address in the form of 192.168.x.x, and get at devices on your network, just like you could if you were home.
You can't enter a name, it needs to be in numeric form. Since you made static addresses for whatever you want to talk to, you just need to use that static address.
You should also be able to use a ssh terminal program, and talk to you devices with a terminal. I haven't tried it yet.
And as long as no one gets their hands on the client.ovpn file, they can't break into your vpn.
You can also installed openvpn on a laptop, macbook, tablet, etc, and access your stuff through that. There are lots of tutorials to show you how.