VPNs and Tunneling
What is a VPN?
A Virtual Private Network builds an encrypted tunnel across an untrusted network, usually the internet, so that two points can communicate as if they were on the same private network.
Think of shipping cash in a locked, tamper-evident box through a public road instead of on an open truck. Anyone watching the road can see that a box is moving between two places, but not what is inside.
Tunneling and Encapsulation
Tunneling means wrapping one packet inside another. The original packet (with your real destination) is encrypted and placed inside a new outer packet addressed to the VPN server.
Without VPN: [ IP: you -> bank ][ TCP ][ data ]
With VPN: [ IP: you -> vpn-server ][ VPN header ][ ENCRYPTED( IP: you -> bank, TCP, data ) ]
A person on the cafe Wi-Fi sees only "this laptop is talking to the VPN server". The VPN server unwraps the packet and forwards it. The destination sees the VPN server's address instead of yours.
Types of VPN
| Type | Purpose | Example |
|---|---|---|
| Remote-access VPN | One user connects to the office network | Staff working from home connect to the company network |
| Site-to-site VPN | Two networks are joined permanently | A bank's head office in Lagos linked to a branch or a data centre |
| Personal / commercial VPN | Protects traffic on untrusted Wi-Fi and hides your IP from sites | Used when travelling |
VPN Protocols
| Protocol | Notes |
|---|---|
| IPsec (IKEv2) | Standard for site-to-site links, built into phones and operating systems |
| OpenVPN | Open source, flexible, uses TLS. Very widely deployed |
| WireGuard | Modern, small code base, fast, strong cryptography |
| SSL/TLS VPN | Works in a browser or a small client, common for corporate access |
| L2TP/IPsec | Older, still seen |
| PPTP | Broken. Do not use |
Corporate VPNs in Practice
A company VPN gives remote staff access to internal systems such as file servers, HR tools and admin panels. Banks including Access Bank and international firms rely on this kind of controlled remote access, combined with multi-factor authentication (MFA) and device checks.
Good practice:
- Require MFA. A stolen password alone must not open the tunnel.
- Least privilege. Give users access to the systems they need, not the whole network.
- Patch the VPN gateway quickly. Internet-facing VPN appliances are a favourite target, and unpatched ones have been exploited in many real breaches worldwide.
- Log and monitor who connects, from where and when.
- Consider zero trust access, which verifies every request rather than trusting anyone who is "inside the VPN".
Split tunneling sends only company traffic through the VPN and the rest directly to the internet. It saves bandwidth but bypasses corporate inspection, so many security teams disable it for sensitive roles.
What a VPN Does NOT Do
- It does not make you anonymous. The VPN provider can see your traffic (unless it is HTTPS) and may keep logs.
- It does not stop phishing, malware or a fake login page.
- It does not protect you once traffic leaves the VPN server towards an unencrypted website.
Choose a provider you trust, or use your employer's VPN, because a VPN moves your trust from the local network to the VPN operator. Free VPN apps have been found to sell data or contain malware.
Try It: See What an Attacker Sees
In the editor on the right, type a message and switch the VPN on and off. Compare what someone sniffing the cafe Wi-Fi can read.
Try it yourself
Key Takeaways
- A VPN creates an encrypted tunnel across an untrusted network by wrapping packets inside other packets (encapsulation).
- Remote-access VPNs connect users, and site-to-site VPNs join networks such as a head office and a branch.
- Prefer WireGuard, OpenVPN or IPsec/IKEv2. PPTP is broken and should never be used.
- Corporate VPNs need MFA, least-privilege access, fast patching of the gateway and good logging. Zero trust goes further.
- A VPN is not anonymity or malware protection. It moves your trust to the VPN operator, so choose carefully.
Quick Quiz
1.What does tunneling mean in a VPN?
2.Which is a site-to-site VPN use case?
3.Which statement about VPNs is TRUE?
Ready to go further?
CareerEx gives you structured 12-week training, live classes every Saturday and Sunday, real tutor feedback, and a certificate. Join the next cohort.
Join CareerEx