VPN
VPN stands for “virtual private network.”
VPN protocols:
- IKEv2 - the fast favorite on mobile OS.
- OpenVPN - a reliable open-source classic.
- Shadowsocks - top choice in restrictive countries.
- WireGuard® - modern and secure solution.
Pros
- Hide from prying eyes on the internet
- Avoid ISP throttling.
- Get the best deals for online shopping.
- Access blocked content (websites and apps).
- Browse the internet securely
- Stay safe on public wifi.
- Safely share and download files.
An IPsec
- Authentication Headers
- Encapsulating Security Payloads (ESP)
- Security Associations (SA)
- And IKEv2 (Internet Key Exchange version 2)
An IPsec VPN is one that uses the IPsec protocol to establish a VPN connection.
IPsec: transport mode vs. tunnel mode
TLS
HTTPS is an implementation of TLS encryption on top of the HTTP protocol, which is used by all websites as well as some other web services. Any website that uses HTTPS is therefore employing TLS encryption.
What does TLS do?
- Encryption: hides the data being transferred from third parties.
- Authentication: ensures that the parties exchanging information are who they claim to be.
- Integrity: verifies that the data has not been forged or tampered with.
Certificate Authority (CA)
- a separate certificate (also known as a public key) and private key for the server and each client, and
- a master Certificate Authority (CA) certificate and key which is used to sign each of the server and client certificates.
Compression
By default, OpenVPN doesn't enable compression. This script provides support for LZ0 and LZ4 (v1/v2) algorithms, the latter being more efficient.
However, it is discouraged to use compression since the VORACLE attack makes use of it.
TLS version
OpenVPN accepts TLS 1.0 by default, which is nearly 20 years old.
With tls-version-min 1.2
we enforce TLS 1.2, which the best protocol available currently for OpenVPN.
TLS 1.2 is supported since OpenVPN 2.3.3.
Openvpn
$ tail /var/log/openvpn/status.log$ tail -f -n 15 /var/log/openvpn/status.log$ watch -d tail /var/log/openvpn/status.log
$ telnet mx-a.delfi.lt 25Exiting Ctrl+]Telnet > close
tail /var/log/openvpn/status.logwatch -d tail /var/log/openvpn/status.log
ngix
sudo apt install nginx -ysudo apt-get install php-fpm
nano /etc/nginx/sites-available/default
nginx -t
php
$ systemctl restart php7.0-fpm.service
$ nano /etc/php/7.0/fpm/php.ini
<html><title>VPN</title><body><?php include_once '/var/www/html/vpn-parser.php';$file="vpn_status.log";$users = parseLog($file);foreach($users['users'] as $user) {echo $user['name'];echo " ";echo $user['ip'];echo '<br>';}?></body></html>