Lesson 6 of 9

VPN & Encryption Basics

Virtual Private Networks and encryption are the cornerstones of secure network communication. You will learn how symmetric and asymmetric encryption work, how VPN protocols like OpenVPN and WireGuard protect traffic, and what the limitations of VPNs are from a security perspective. This lesson demystifies the cryptographic concepts that underpin all secure communications.

Learning Objectives — Deep Dive

Each objective below is broken down into plain English so you know exactly what you are learning, why it matters, and what you will be able to do when you are done. Mark each one complete as you work through the lesson.

0/4
In plain English

This is asking you to build a clear mental model of the concept — not just memorize a definition, but genuinely understand what it means, why it exists, and how it connects to everything else you are learning. When you can explain "symmetric and asymmetric encryption" in your own words to someone who has never heard of it, you have truly learned it.

Why this matters

This objective builds a foundational skill that every security professional uses regularly. Mastering it gives you the vocabulary, mental models, and practical ability to tackle more advanced topics with confidence — and to communicate clearly with both technical and non-technical colleagues.

Real-world analogy

Think of it like learning to drive. You do not need to understand how the engine works to drive safely, but knowing the basics helps you diagnose problems and avoid mistakes that could cause accidents. The same principle applies here — foundational knowledge prevents costly errors.

What you will be able to do

Apply this skill in a real lab environment, explain it clearly to a colleague or client, and use it as a building block for the more advanced techniques that come later in this course.

Beginner tip

Do not try to memorize everything at once. Read through the material once to get the big picture, then go back and work through the lab. The hands-on practice is what makes the concepts stick — passive reading alone will not get you there.

VPN & Encryption Basics · Objective 1 of 4

VIDEO
Loading video…
1

Install OpenVPN on Kali

Run 'sudo apt update && sudo apt install openvpn -y' to install the OpenVPN client on Kali Linux. OpenVPN is pre-installed on many Kali versions, so the install may complete quickly or confirm it is already present. You will also need a VPN configuration file (.ovpn) from a VPN provider — for lab use, ProtonVPN and Mullvad both offer free or trial accounts with downloadable config files. Verify the installation succeeded by running 'openvpn --version' and confirming a version number is displayed.

2

Connect to a VPN server

Download a .ovpn configuration file from your VPN provider and run 'sudo openvpn --config yourfile.ovpn' to initiate the connection. You will see a stream of log output; wait for the line 'Initialization Sequence Completed' which confirms the tunnel is established. If your provider requires username and password authentication, OpenVPN will prompt you interactively, or you can create an auth.txt file with credentials and reference it in the config. A common pitfall is using a config file for the wrong server region, which may result in higher latency than expected.

3

Verify the VPN is working

Open a new terminal tab (leave the OpenVPN process running in the first tab) and run 'curl ifconfig.me' to check your public IP address. The returned IP should be the VPN server's IP, not your real IP — if it matches your ISP's IP, the VPN tunnel is not routing traffic correctly. Also run 'ip route' to confirm a new tun0 interface exists and has a route through the VPN. Check for DNS leaks by running 'nslookup whoami.akamai.net' and verifying the resolver IP is the VPN provider's DNS server, not your ISP's.

4

Capture traffic before and after

Start a Wireshark capture on your main interface before connecting to the VPN, then browse to a plain HTTP site and observe the readable HTTP traffic in the capture. Stop the capture, connect to the VPN, start a new capture on the same interface, and repeat the same browsing activity. In the second capture, you should see only encrypted OpenVPN UDP or TCP packets — the HTTP content is no longer visible because it is encapsulated inside the VPN tunnel. This comparison visually demonstrates exactly what a VPN protects and what it does not protect.