



SSL/TLC:
Transport Layer Security (TLS) – and its predecessor, Secure Sockets Layer (SSL), which is now deprecated by the Internet Engineering Task Force[1] (IETF)
TLS and SSL do not fit neatly into any single layer of the OSI model or the TCP/IP model.[8][9] TLS runs “on top of some reliable transport protocol (e.g., TCP),”which would imply that it is above the transport layer. It serves encryption to higher layers, which is normally the function of the presentation layer. However, applications generally use TLS as if it were a transport layer,[8][9] even though applications using TLS must actively control initiating TLS handshakes and handling of exchanged authentication certificates.
| Protocol | Published |
|---|---|
| SSL 1.0 | Unpublished |
| SSL 2.0 | 1995 |
| SSL 3.0 | 1996 |
| TLS 1.0 | 1999 |
| TLS 1.1 | 2006 |
| TLS 1.2 | 2008 |
| TLS 1.3 | 2018 |
TLS typically relies on a set of trusted third-party certificate authorities to establish the authenticity of certificates. Trust is usually anchored in a list of certificates distributed with user agent software,[35] and can be modified by the relying party.
RSA
RSA (Rivest–Shamir–Adleman) is one of the first public-key cryptosystems and is widely used for secure data transmission. In such a cryptosystem, the encryption key is public and it is different from the decryption key which is kept secret (private).
DHE–RSA (forward secrecy)
PSK–RSA
PSK
To build a key from shared secret, the key derivation function is typically used. Such systems almost always use symmetric key cryptographic algorithms. The term PSK is used in Wi-Fi encryption such as Wired Equivalent Privacy (WEP), Wi-Fi Protected Access (WPA), where the method is called WPA-PSK or WPA2-PSK, and also in the Extensible Authentication Protocol (EAP), where it is known as EAP-PSK. In all these cases, both the wireless access points (AP) and all clients share the same key.
AES GCM, AES CCM, AES CBC, ChaCha20–Poly1305,
AES128 is a symmetric block cipher. SHA256 is a hash which is used as part of a message authentication code (HMAC). ECDHE is a key-exchange protocol, which is used as the handshake to establish the ephemeral keys used with the cipher.
In HTTPS, the communication protocol is encrypted using Transport Layer Security (TLS), or formerly, its predecessor, Secure Sockets Layer (SSL). The protocol is therefore also often referred to as HTTP over TLS,[3] or HTTP over SSL.
After the installation of openvpn. $: sudo apt install openvpn
You can obtain the config example files at
cd /usr/share/doc/openvpn/examples/sample-config-files
Surprise! It has been well documented!
For more detail, visit here
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.