VPN safety tips
A VPN is one layer of protection. These practices help you get the most from a VPN for Windows and avoid common mistakes, whether on a laptop or a desktop.
Last updated:
VPN best practices on Windows
- Keep Windows updated. Security fixes for the VPN client and network stack arrive through Settings > Windows Update.
- Use a modern protocol. Choose IKEv2, SSTP, WireGuard or OpenVPN. Never rely on PPTP. Compare VPN protocols.
- Protect your sign-in. Use a strong, unique password and multi-factor authentication or certificates where available.
- Keep Microsoft Defender and the Windows firewall on. A VPN does not block malware or unwanted inbound connections.
- Connect before using public Wi-Fi. Turn the VPN on before you open email, banking or work apps.
- Use HTTPS sites. Traffic leaving the VPN server is only encrypted if the site uses HTTPS.
- Use a kill switch when available. It blocks internet access if the tunnel drops, so traffic does not leak unprotected. More about kill switches.
- Choose a trustworthy operator. The VPN server can see your traffic, so pick a provider or server you trust.
How to check if your VPN is working on Windows
1. Confirm the connection status
Open Settings > Network & internet > VPN and confirm the connection shows Connected. In PowerShell you can also run:
Get-VpnConnection | Select-Object Name, ConnectionStatus
2. Compare your public IP address
Note your public IP address with the VPN off, using any IP lookup page in your browser. Connect the VPN and check again. The address should change to one that belongs to the VPN server. If it stays the same, your traffic is not going through the tunnel; split tunneling may be on (see how to turn split tunneling off with PowerShell).
3. What is a DNS leak and how do you check for one?
A DNS leak happens when the names of the sites you visit are still resolved by your regular internet provider instead of through the VPN. To check which DNS servers Windows is using for each network adapter, run:
Get-DnsClientServerAddress -AddressFamily IPv4
The VPN adapter should list the DNS servers provided by the VPN. Browser-based DNS leak test pages can confirm the result: they should show only the VPN's DNS servers.
4. Watch for IPv6 and WebRTC leaks
- IPv6: some VPNs only tunnel IPv4. If your network supports IPv6, make sure your VPN handles it or blocks it.
- WebRTC: browser features used for video calls can reveal your local or real IP address. Many VPN services and browser settings can limit this.
What can a VPN not protect against?
A VPN does not make you anonymous, does not stop malware or phishing, and does not hide your traffic from the VPN operator. These limits are explained on the What is a VPN page. One more point matters for safety in particular:
- Not a fix for an outdated system. An unsupported version of Windows remains vulnerable even when connected to a VPN.
What US and Canadian cybersecurity agencies recommend
Government guidance is written for organizations, but the same points apply at home:
- Canada: the Canadian Centre for Cyber Security recommends IPsec as the primary choice for VPN access, multi-factor authentication, and avoiding split tunnelling where possible. On Windows, IKEv2 is the built-in IPsec option.
- United States: the NSA and CISA joint guidance Selecting and Hardening Remote Access VPN Solutions advises choosing standards-based VPNs from reputable vendors and applying security updates promptly.
Legal and workplace considerations
Using a VPN is legal in the United States and Canada and in most other countries, but some countries restrict or ban VPNs. Check local laws before you travel abroad. On work devices, follow your organization's IT policy: company VPNs may be managed centrally, and adding personal VPN connections may not be allowed.
Have more questions? See the FAQ for short answers to common concerns.