Sub topic 13
VPN: secure access to a private network
Prerequisites and scope
This chapter assumes you know what an IP address, a port and a firewall are. You should also be comfortable with the earlier chapters on RDP, VNC and SSH. Those tools control a remote computer. A VPN does something different. It gives a remote device a protected path into a private network. After that, the device can use the network's resources as if it were plugged in locally.
By the end of this chapter you should be able to explain what a VPN does, compare the common VPN types, pick the right one for a scenario, and diagnose the usual connection problems.
What a VPN does
A virtual private network (VPN) is an encrypted connection, called a tunnel, that runs across an untrusted network such as the internet. Two things happen inside the tunnel:
- Encapsulation. The original packets are wrapped inside new packets. The outer packets cross the internet. The inner packets are the ones the private network understands.
- Encryption. The inner packets are scrambled so that anyone who captures them in transit cannot read or change them without detection.
A VPN also gives the remote device an address on the private network, or at least a route into it. This is the main difference from tools such as RDP or SSH. Those tools connect you to one machine. A VPN connects you to the network, and you then use other tools over it.
A typical support case: an employee works from home and needs the file server at \\fileserver\shared and an internal web app. Neither is reachable from the internet. The employee starts the VPN client, signs in, and the laptop can reach both.
Remote-access VPN and site-to-site VPN
The exam and real support work both use two main VPN designs.
| Type | Connects | Typical use | Who sets it up |
|---|---|---|---|
| Remote-access (client-to-site) | One device to a network | An employee working from home or a hotel | The user runs a VPN client |
| Site-to-site | One whole network to another | A branch office linked to headquarters | Routers or firewalls at each site, configured once |
In a site-to-site VPN, users do nothing. The two gateways keep the tunnel up, and traffic between the sites is routed through it automatically. In a remote-access VPN, each user must start a client and authenticate. As a support technician you will mostly handle remote-access VPNs.
Split tunnel and full tunnel
A VPN client must decide which traffic goes through the tunnel.
- Full tunnel. All traffic from the device goes through the VPN, including web browsing to public sites. The organization can inspect and filter everything. The cost is more load on the VPN gateway and slower general browsing.
- Split tunnel. Only traffic for the private network goes through the tunnel. Other traffic goes straight to the internet. This is faster and lighter on the gateway. The risk is that the device is on the internet and the private network at the same time, so a compromised device could act as a bridge.
Security-sensitive organizations often choose full tunnel. Organizations that value performance often choose split tunnel.
Common VPN protocols
You do not need to configure these from memory for the A+ exam, but you should recognize the names.
| Protocol | Notes |
|---|---|
| IPsec | A suite of protocols that encrypts at the network layer. Often used for site-to-site VPNs and for built-in clients. IKE sets up the keys. |
| SSL/TLS VPN | Uses the same TLS encryption as HTTPS, usually over TCP port 443. Often passes through firewalls that block other traffic. |
| L2TP/IPsec | L2TP builds the tunnel and IPsec encrypts it. L2TP alone does not encrypt. |
| PPTP | An old protocol with known weaknesses. Avoid it. |
| OpenVPN, WireGuard | Common open-source VPNs. They are not built into every operating system. |
A frequent exam point: a tunnel protocol that does not encrypt, such as L2TP by itself, is not secure on its own. Security comes from pairing it with IPsec or another encryption layer.
Authentication
A VPN gateway must confirm who is connecting before it lets anyone in. Common methods:
- Username and password, often checked against a directory such as Active Directory.
- Multifactor authentication (MFA), which adds a code or approval from a phone or token.
- Digital certificates installed on the device, which also prove the device is approved.
- Pre-shared keys, a single shared secret. These are weaker, because everyone who knows the key can use it, and they are best limited to small or site-to-site setups.
Passwords alone are the weak point of most VPNs. Stolen passwords are a common way attackers get into a network, so MFA is the standard recommendation.
Setting up a client: a Windows example
Windows has a built-in VPN client. In Settings, go to Network & Internet, then VPN, then Add VPN. You enter the VPN provider (Windows built-in), a connection name, the server name or address, the VPN type, and the sign-in method. Many organizations instead deploy a vendor client that comes pre-configured.
You can also check and control connections from PowerShell. This script lists configured VPN connections and their status:
# Show configured VPN connections and whether each is connected
Get-VpnConnection | Select-Object Name, ServerAddress, ConnectionStatusAfter connecting, confirm the result with simple checks:
- Run
ipconfigand look for a VPN adapter with a private address. - Run
pingagainst an internal host by IP address. - Run
pingornslookupagainst an internal host by name. This tests DNS through the tunnel. - Try the real resource, such as the file share.
Troubleshooting VPN problems
Work from the bottom up: the device's own internet connection, then the VPN connection, then the internal resource.
| Symptom | Likely cause | What to check |
|---|---|---|
| Client cannot reach the gateway | No internet, wrong server name, or a firewall blocking the VPN port | Open a web page. Check the server address. Try another network. |
| Authentication fails | Wrong password, expired account, missing MFA, or an expired certificate | Confirm the account works elsewhere. Check certificate dates. |
| Connects, but internal names do not resolve | DNS is not sent through the tunnel | Test by IP address. Check the DNS servers assigned to the VPN adapter. |
| Connects, but internal IPs are unreachable | Wrong routes, or the home network uses the same address range as the office | Check the routing table with `route print`. Compare address ranges. |
| Connection drops often | Weak Wi-Fi, timeouts, or a gateway limit | Test on a wired connection. Review gateway logs. |
| Internet is slow on VPN | Full tunnel sends all traffic through the gateway | Confirm the tunnel mode with the network team. |
The overlapping address range problem is easy to miss. If both the home router and the office use 192.168.1.0/24, the laptop sends traffic for 192.168.1.10 to its local network instead of through the tunnel. The fix is usually to change the home network range or use an office range that is less common.
VPN compared with RDP, VNC and SSH
These tools solve different problems and are often combined.
- A VPN gives network access. It does not give you a desktop or a shell.
- RDP, VNC and SSH give control of one machine. Exposing them directly to the internet is risky.
- A common safe pattern is to connect to the VPN first, then use RDP or SSH to reach an internal machine. The RDP or SSH port then does not need to be open to the whole internet.
Security practices
- Require MFA for every VPN user.
- Use strong, current protocols and retire PPTP.
- Apply least privilege: give users access to the resources they need, not the entire network.
- Keep the VPN gateway and clients updated, because gateways face the internet and are a frequent target.
- Log connections and review them for odd sign-in times or locations.
- Remove accounts for people who leave.
Exercise
A user at a hotel connects to the company VPN. Internal websites load by IP address but fail by name. What is the most likely cause, and how would you confirm it?
Show answer
DNS queries are not going through the tunnel, or the VPN adapter is not using the internal DNS servers. Confirm by running nslookup for an internal name and checking which DNS server answers. Also run ipconfig /all to see the DNS servers assigned to the VPN adapter.
Exercise
A company wants two offices to share files continuously with no user action. Which VPN type fits, and which tunnel mode would you pick for a remote worker if the company wants to inspect all of that worker's traffic?
Show answer
A site-to-site VPN fits the two offices, because the gateways keep the tunnel up automatically. For the remote worker, choose full tunnel, because it sends all traffic through the company gateway where it can be inspected.