Please no Team viewer or crappy neverheard-vpn discounted services ! It wont work on my headless Raspberry Pi’s and lot of clutter to manage.

I have visited my home and was doing some hobby IT setup with Raspberry Pi’s, the problem is that i had problems many times accessing my home PC in another Remote Location due to many reasons, lets say crappy ISP. I contacted my ISP and they said I need to take a static IP and also pay for opening up two non standard ports. Its like you pay to get tortured and then additional headache of Port forwarding.

To add more to the pain, the IP that i get from my upstream provider is a Private IP, wow I havent seen that for a while. Anyways, to get around this I was thinking about using OPENVPN as a solution along with Dyndns.

Now, setup is very simple

Clint-pc (Location 1) ———-AWS(OPENVPN)————Client-pc (Location 2)

Why AWS -> Accessible and Cost

Problem is changing IP, I dont have any business requirement or criticality to buy a Elastic IP , but whole point will be lost if my clients wont know what to access, worse I will never have access to location-2 if am in location-1 to change IP Addresses

I have mapped OPENVPN with dyndns script.

https://help.dyn.com/ddclient/

This really solved most of the problem, but should i be running AWS t3 instances for 24×7 which will cost me more for not using the service at all. Hence Dyndns will solve the IP-Domain name lookup without needing an Elastic IP.

Rest of the configuration from client side is

There is a little knob which will enable communication between the VPN hosts, which you have to enable

The final problem is that what if i stop the server and when i start how do i ensure Clients connect back automatically

Two instances

  • When Client Reboots – A Reboot cron to automatically connect to the DNS url
  • When Server stops / starts / reboots – A retry from Client endlessly to connect to VPN.

-Rakesh