How to Set Up a VPN Connection on Mac

Need to connect to your office network from your Mac? Here is how to set up a VPN connection using the built-in macOS VPN client.

Published 2023-02-05 by TechNet New England

macOS includes a built-in VPN client that supports IKEv2, L2TP over IPsec, and Cisco IPsec protocols. This guide covers setup and troubleshooting. ## Before You Start Get the following from your IT provider: **VPN server address** (hostname or IP). **Account name** (your username). **Password** or **certificate** for authentication. **Shared secret** (if using L2TP). **VPN type** (IKEv2, L2TP, or Cisco IPsec). If your organization uses a third-party client (FortiClient, Cisco AnyConnect, GlobalProtect, WireGuard), install that application instead and follow your IT provider's instructions. ## Setting Up the Built-in VPN 1. Open **System Settings > VPN**. 2. Click **Add VPN Configuration** and select the VPN type (IKEv2, L2TP over IPsec, or Cisco IPsec). ### For IKEv2: 3. Enter a **Display Name** (like "Office VPN"). 4. Enter the **Server Address**. 5. Enter the **Remote ID** (usually the same as the server address). 6. Set **Authentication** to **Username** (or Certificate if provided). 7. Enter your **Username** and **Password**. 8. Click **Create**. ### For L2TP over IPsec: 3. Enter a **Display Name**. 4. Enter the **Server Address**. 5. Enter your **Account Name** (username). 6. Set **User Authentication** to **Password** and enter it. 7. Set **Machine Authentication** to **Shared Secret** and enter the shared secret from your IT provider. 8. Click **Create**. ## Connecting 1. Open **System Settings > VPN**. 2. Toggle the switch next to your VPN connection to connect. 3. The VPN icon will appear in your menu bar when connected. Or click the **VPN icon** in the menu bar (if enabled) and select your connection. ## Disconnecting Toggle the VPN switch off in System Settings, or click the VPN menu bar icon and select Disconnect. ## Troubleshooting **Cannot connect:** Verify the server address, username, password, and shared secret are correct. Try connecting from a different network (home vs. coffee shop) to rule out network-specific blocking. **Connected but no access to resources:** DNS may not be routing through the VPN. Ask your IT provider if you need to use specific DNS servers while connected. **Frequent disconnections:** Check your Mac's energy settings. If the Mac is set to sleep aggressively, the VPN may drop. In System Settings > Displays > Advanced, adjust sleep settings while on VPN. **Certificate-based VPN not working:** The certificate may have expired. Check with your IT provider for a renewed certificate.