Skip to content

Latest commit

 

History

History
99 lines (64 loc) · 3.65 KB

File metadata and controls

99 lines (64 loc) · 3.65 KB

A VPN (Virtual Private Network)

is a secure, encrypted connection that enables users to access a private network over the internet. It ensures privacy and data security by creating a protected tunnel between the user's device and the network server, commonly used for secure remote access and private internet browsing.

vpn schema

4.1 Install and configure OpenVPN for OpenLDAP authentication.

Set Up and Configure an OpenVPN Server

  • Install needed packages
sudo apt update
sudo apt install openvpn easy-rsa
  • create a new directory on the OpenVPN Server as non-root user called ~/easy-rsa
mkdir ~/easy-rsa
  • create a symlink from the easyrsa script that the package installed into the ~/easy-rsa directory and add user permissions
ln -s /usr/share/easy-rsa/* ~/easy-rsa/
sudo chown ranim ~/easy-rsa
chmod 700 ~/easy-rsa
  • Create a PKI for Openvpn

PKI directory on the openvpn server will manage the server and clients’ certificate requests instead of making them directly on your CA server

cd ~/easy-rsa
nano vars

vars

This will ensure that your private keys and certificate requests are configured to use modern Elliptic Curve Cryptography (ECC) to generate keys and secure signatures for your clients and OpenVPN server

This means when a client and server attempt to establish a shared symmetric key, they can use Elliptic Curve algorithms to do their exchange

init-pki

  • Create server certificate request and private key

ger req and key

sudo cp /home/sammy/easy-rsa/pki/private/server.key /etc/openvpn/server/
  • create CA certificate

build-ca

  • sign server request

sign-req

  • create client certificate

client cert client cert

  • configure /etc/openvpn/server/server.conf

server.conf server.conf server.conf

ta.key = TLS-Auth Key, is a pre-shared secret key used for additional security in the TLS handshake process.

server.conf

  • configure /etc/openvpn/auth/ldap.conf

server.conf server.conf

ldap.conf

  • configure /etc/openvpn/client/client.ovpn

client.ovpn

sudo systemctl restart [email protected]

4.2 Test the VPN connection using OpenLDAP credentials.

ranim test

4.3 Test the ability of an authorized client and an unauthorized client to initiate a VPN tunnel.

farah test


Go Back to Previous Section