VPNs: what a tunnel protects, what it does not, and how to configure WireGuard
Site-to-site and remote-access VPNs, how WireGuard and IPsec build a tunnel, what a consumer VPN actually hides, and why a VPN is not a replacement for zero-trust access.
Diagram
A remote-access tunnel
Step 1 of 4
Keys
Each WireGuard peer has a key pair; the server lists which public keys may connect.
wg genkey | tee client.key | wg pubkey > client.pub
The laptop reaches the whole network
Full internal access
Connection times only
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
A VPN moves the trust boundary
- What fails
- Once connected, a device is usually treated as internal.
- Who is affected
- Every internal service the VPN subnet can reach.
- What you would notice
- VPN users can reach database ports and admin panels.
- What you change
- Filter traffic from the VPN pool by role, and require MFA at connect.
VPN appliances are targets
- What fails
- Edge VPN devices have had many critical vulnerabilities exploited at scale.
- Who is affected
- The whole organization behind that appliance.
- What you would notice
- An appliance several releases behind with its management interface on the internet.
- What you change
- Patch on the vendor’s advisory timeline and keep management off the public side.
Consumer VPNs shift who sees traffic
- What fails
- A commercial VPN hides traffic from the local network and moves visibility to the VPN provider.
- Who is affected
- Users who think it makes them anonymous.
- What you would notice
- Choosing a VPN to “be secure” on sites already using HTTPS.
- What you change
- Use one for hostile Wi-Fi if you trust the provider; it does not replace HTTPS or MFA.
Site-to-site and remote access
Site-to-site VPNs connect two networks, usually with IPsec between gateways. Remote-access VPNs connect individual devices, using WireGuard, IPsec with IKEv2, or a vendor TLS client. Split tunneling sends only internal ranges through the tunnel; full tunneling sends everything, which lets the organization inspect and filter web traffic.
Checking a tunnel on your own machine
After connecting, confirm which routes go through the tunnel and which resolver answers. A DNS leak, where queries still go to the local network’s resolver, reveals which names you look up.
$ sudo wg show interface: wg0 latest handshake: 41 seconds ago transfer: 1.21 MiB received, 388 KiB sent $ ip route get 10.20.4.9 10.20.4.9 dev wg0 src 10.66.0.12 $ resolvectl query intranet.example.org
VPN versus zero-trust access
Zero-trust access brokers check user identity and device health per application instead of granting network-level access. Many organizations run both: a VPN for legacy protocols and an identity-aware proxy for web apps.
Check yourself
Recognition and the fix. Nothing here is a procedure.
What does AllowedIPs = 10.20.0.0/16 do in a WireGuard client?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.
This page stands on its own. The lab and the glossary card are the next reading.