How to implement a VPN
Sometimes you would want to be in your office, because you need to press that very button, just now, and you wish you had not left, you need to come back, start your machine again, start all the environment, double check if it’up. And all this because you moved, you had to be somewhere else.
Without further explanations, because you know the issue, you experienced exactly this same problem many times, let’s spend a few words about the solution.
What you need is a VPN. A VPN is a Virtual Private Network, that means it looks like a local LAN, where you can access resources, but it’s made of machines distributed over different networks. In order to implement this, you need:
- A server: can be a physical server, some router, a virtual machine, an EC2 instance on Amazon… whatever
- Clients: all the machines/pieces of hardware partecipating in this network.
A good setup
Edit the content of openvpn-setup.cfg:
code_country="SE" code_province="KA" code_city="SomeCity" code_organization="YourOrganization" code_email="firstname.lastname@example.org" vpn_port="1194"
How to create the server
You can usee the following script to create the server:
Create the clients
You can usee the following script to create a client: myclient
Retrieve a sample config