configure: error: lzo enabled but missing
sudo apt-get install libssl-dev liblzo2-dev libpam0g-dev
build-client-full <file_name_base> [ cmd-opts ]
build-server-full <file_name_base> [ cmd-opts ]
./easyrsa init-pki
./easyrsa build-ca nopass
./easyrsa build-server-full server1 nopass
./easyrsa build-server-full client1 nopass
./easyrsa gen-dh
openvpn --genkey tls-auth PATHTO/ta.key
USERNAME:/PATHTO/easy-rsa/easyrsa3$ ls pki/issued/
client1.crt client2.crt server1.crt
USERNAME:/PATHTO/easy-rsa/easyrsa3$ ls pki/private/
ca.key client1.key client2.key server1.key
USERNAME:PATHTO/easy-rsa/easyrsa3$ ls pki/
... ca.cart dh.pem
├── client
├── server
│ ├── certs
│ │ ├── ca.crt
│ │ ├── dh.pem
│ │ ├── server.crt
│ │ ├── server.key
│ │ └── ta.key
│ └── server.conf
└── update-resolv-conf
├── client
│ ├── ca.crt
│ ├── client.conf
│ ├── client1.crt
│ └── client1.key
│ └── ta.key
├── server
└── update-resolv-conf
# SSL/TLS root certificate (ca), certificate
# (cert), and private key (key). Each client
# and the server must have their own cert and
# key file. The server and all clients will
# use the same ca file.
#
# See the "easy-rsa" directory for a series
# of scripts for generating RSA certificates
# and private keys. Remember to use
# a unique Common Name for the server
# and each of the client certificates.
#
# Any X509 key management system can be used.
# OpenVPN can also use a PKCS #12 formatted key file
# (see "pkcs12" directive in man page).
ca {ca.crt}
cert {server.crt}
key {server.key} # This file should be kept secret
# Diffie hellman parameters.
# Generate your own with:
# openssl dhparam -out dh2048.pem 2048
dh {dh2048.pem}
# For extra security beyond that provided
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
# openvpn --genkey tls-auth ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
tls-auth {ta.key} 0 # This file is secret
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote {my-server-1} 1194
# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca {ca.crt}
cert {client.crt}
key {client.key}
# Verify server certificate by checking that the
# certificate has the correct key usage set.
# This is an important precaution to protect against
# a potential attack discussed here:
# http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the keyUsage set to
# digitalSignature, keyEncipherment
# and the extendedKeyUsage to
# serverAuth
# EasyRSA can do this for you.
remote-cert-tls server
# If a tls-auth key is used on the server
# then every client must also have the key.
tls-auth {ta.key} 1
sudo openvpn PATHTO/server.conf
sudo openvpn PATHTO/client.conf
server 10.8.0.0 255.255.255.0
USERNAME:~$ ping 10.8.0.1
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.1: icmp_seq=1 ttl=64 time=9.53 ms
64 bytes from 10.8.0.1: icmp_seq=2 ttl=64 time=9.98 ms
64 bytes from 10.8.0.1: icmp_seq=3 ttl=64 time=9.98 ms
64 bytes from 10.8.0.1: icmp_seq=4 ttl=64 time=10.2 ms
64 bytes from 10.8.0.1: icmp_seq=5 ttl=64 time=10.2 ms