As the novel coronavirus is declared a pandemic by the WHO, the demand for remote work is exponentially increasing. This write up will show you how to roll out your own OpenVPN with a one-liner command on Linux.
In order to access company VPNs for remote work, the accessing client (the staff / team member) having a static IP have a some advantages like:
- Easier management
- Better security
I'll show you how to get a static IP through Amazon Web Services very very quickly. Here's what you need from you side:
- AWS account (or any other hosting account that gives you root SSH access)
- Basic EC2 knowledge
- Basic SSH knowledge
First log into your AWS account and launch an EC2 server. I tested it on Ubuntu so I recommend you use Ubuntu as well.
This is the magic here: https://github.com/Nyr/openvpn-install
root by typing:
then run this command:
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
Follow the prompts. I recommend you select the Google or OpenDNS setting when it asks which DNS you want to use.
This script installs the OpenVPN server and generates an
.ovpn file. Next step is to install the OpenVPN client on your computer. On MacOS it is called Tunnelblick.
Once installed, simply download or copy paste the
.ovpn file (this is the configuration your computer needs) and you're good to go.
I was able to get through the great firewall of China using this method. Easy! Do reach out if you get stuck or have any questions.