openvpn-as configurations full tutorial

In this tutorial, we will cover all the openvpn configurations.
From the openvpn client to the openvpn server. Clients include pc, phone, router. servers include google cloud, aws, and others. Then we will also learn VPN connection test technique. For a visual overview, here is the my YouTube video.

The whole tutorial is divided into 4 parts.
Part 1, The VPC, is where our remote vpn server reside in.
VPC example, let’s take google.
Pricing for google cloud.
Static IP cost

Type

Price/Hour

Static IP address (assigned but unused) $0.010
Static IP address (assigned and in use) No charge
Ephemeral IP address (attached to instance or forwarding rule) No charge

Egress cost

Here is my actual GCP bill.

Product Resource Usage Amount
Compute Engine Static Ip Charge in Japan 296.62 Hour $4.43
Compute Engine Network Internet Egress from Virginia to China 16.03 Gibibyte $3.69
Compute Engine Network Internet Egress from Los Angeles to China 14.54 Gibibyte $3.34
Compute Engine Network Internet Egress from Americas to China 8,878.51 Mebibyte $1.99
Compute Engine Micro instance with burstable CPU running in Japan 9,460.08 Minute $1.45
Compute Engine Micro instance with burstable CPU running in Virginia 7,801.22 Minute $1.12
Compute Engine Micro Instance with burstable CPU running in Los Angeles 6,201.73 Minute $0.94
Compute Engine Network Internet Egress from Japan to China 2,591.20 Mebibyte $0.58
Compute Engine Network Internet Egress from Japan to Americas 2,009.34 Mebibyte $0.27
Compute Engine Network Internet Egress from Singapore to China 996.54 Mebibyte $0.22
Compute Engine Storage PD Capacity in Japan 2,884.21 Gibibyte-hour $0.20
Compute Engine Micro instance with burstable CPU running in Singapore 758.25 Minute $0.12
Compute Engine Storage PD Capacity in Los Angeles 1,415.42 Gibibyte-hour $0.09
Compute Engine Storage PD Capacity in Virginia 1,300.55 Gibibyte-hour $0.08
Compute Engine Network Internet Egress from Virginia to Americas 103.90 Mebibyte $0.01

Machine type cost: Disk cost: 
Cost is base on CPU cores, memory and GPUs you selected. I am currently using 2 VPN clients, which doesn’t consume too much resources. 1 vCPU and 0.6G RAM is ok.

Generally, the distance between your real address and your remote server will make a big effect on your network speed. Actually I found it’s a big deal. The connection between China and east America is fast enough for me to watch 4K video.

Part 2: The OPEN VPN server
openvpn is open source VPN with GPL licence. But OPENVPN-AS application from openvpn.net is not a free one. Anyway, you can build your own openvpn from scratch, see this video. Or, you can use script written by others to make things more easier, see this video.

Part 3: The OPEN VPN client.
we can find the private vpn client (not a free vpn service by openvpn offical) on the openvpn.net main page, including window, mac, android, and iphone. Can this client use my own .ovpn file. Yes, it can! but you need to sign up private vpn account, which make it annoying. Anyway, we can find the OPEN VPN client for windows in the openvpn.net. and we can download openvpn client from google easily.

Part 4: VPN connection test.
Have you ever seen your IP address is changed, but you still can access the blocked internet? That’s why you should know how to test your VPN connection. I always set my router’s, phone, pc’s dns address to OPEN DNS, or other DNS. so I am sure my DNS traffic won’t go to my ISP. DNS leak test will always help you out.

 

Leave a comment