How to Setup L2TP/IPSec VPN on macOS

Last updated: September 11, 2025
Table of Contents

Native L2TP/IPSec VPN on macOS

This guide covers L2TP/IPSec VPN setup using macOS's built-in VPN client. Compatible with all modern macOS versions including Big Sur, Monterey, Ventura, and Sonoma.

About L2TP/IPSec on macOS

Protocol Characteristics:

  • Native Support: Built into macOS - no additional software needed
  • Good Security: Uses IPSec encryption for data protection
  • Stable Connection: Generally reliable on macOS
  • Behind NAT: Works well behind routers/firewalls
  • Battery Efficient: Low overhead compared to OpenVPN

Note: While L2TP/IPSec is secure, consider using IKEv2 or WireGuard for better performance and security on macOS.

Prerequisites

Requirements:

  • macOS 10.12 (Sierra) or newer
  • TorGuard VPN account with active subscription
  • VPN credentials (different from website login)
  • Shared secret: torguard

Step 1: Open Network Preferences

Access System Settings

macOS Ventura/Sonoma (13.0+):

  1. Click Apple menu → System Settings
  2. Click Network in the sidebar

macOS Big Sur/Monterey (11.0-12.x):

  1. Click Apple menu → System Preferences
  2. Click Network icon
macOS Network Preferences
Network settings in System Preferences

Step 2: Add VPN Connection

Create New VPN

Click the + button at the bottom of the network connections list to add a new connection.

If the + button is grayed out, click the lock icon and enter your Mac password to make changes.

Add Network Connection
Adding a new network connection

Step 3: Configure VPN Type

Select Connection Type

  1. Interface: Select "VPN"
  2. VPN Type: Select "L2TP over IPSec"
  3. Service Name: Enter "TorGuard L2TP" (or any name)
  4. Click Create
VPN Type Selection
Selecting L2TP over IPSec

Step 4: Enter Server Details

Configure Connection

Server Address: Enter TorGuard server (e.g., uk.torguard.com)
See full server list
Account Name: Your VPN username

After entering details, click Authentication Settings...

Server Configuration
Entering server address and account name

Step 5: Configure Authentication

Set Password and Shared Secret

User Authentication:

  • Password: Enter your VPN password

Machine Authentication:

  • Shared Secret: Enter torguard

Click OK to save authentication settings.

The shared secret is always "torguard" (lowercase) for all TorGuard servers.

Authentication Settings
Configuring password and shared secret

Step 6: Apply Settings

Save Configuration

Click Apply to save your VPN configuration.

Apply Settings
Applying VPN settings

Step 7: Configure Advanced Settings

Route All Traffic

  1. Click Advanced... button
  2. In the Options tab, check "Send all traffic over VPN connection"
  3. Click OK

This ensures all internet traffic goes through the VPN, preventing leaks.

Advanced Button
Accessing advanced settings
Route All Traffic
Enabling full tunnel VPN

Step 8: Final Configuration

Complete Setup

Click Apply again to save the advanced settings.

Final Apply
Applying final configuration

Step 9: Connect to VPN

Establish Connection

  1. Ensure "Show VPN status in menu bar" is checked
  2. Click Connect button
  3. Wait for connection to establish

You can also connect/disconnect using the VPN icon in the menu bar.

Connect VPN
Connecting to L2TP VPN

Verify Your Connection

Connection Status

When connected successfully:

  • VPN icon appears in menu bar with timer
  • Status shows "Connected" in Network preferences
  • Your IP address changes to VPN server location

Verify your new IP at TorGuard IP Check

Troubleshooting

Connection Failed

  • Verify server address is correct and active
  • Check username/password (use VPN credentials)
  • Ensure shared secret is exactly "torguard"
  • Try a different server location
  • Check if L2TP is blocked on your network

No Internet After Connecting

  • Verify "Send all traffic over VPN" is enabled
  • Try disconnecting and reconnecting
  • Check DNS settings in Network preferences
  • Flush DNS cache: sudo dscacheutil -flushcache

Frequent Disconnections

  • Check your internet connection stability
  • Try TCP-based protocols (OpenVPN TCP)
  • Disable sleep mode when on VPN
  • Check Energy Saver settings

L2TP Blocked

Some networks block L2TP. Try these alternatives:

  • Use IKEv2 (built-in, similar setup)
  • Switch to OpenVPN on port 443
  • Use WireGuard for better performance
  • Try TorGuard's stealth VPN options

Advanced Configuration

Optional Settings

1. On-Demand Connection

Configure VPN to connect automatically:

  1. In Advanced settings, click "Options" tab
  2. Configure on-demand rules
  3. Set trusted networks where VPN isn't needed

2. DNS Configuration

Use custom DNS servers:

  1. Click Advanced → DNS tab
  2. Add DNS servers: 8.8.8.8, 8.8.4.4
  3. Or use Cloudflare: 1.1.1.1, 1.0.0.1

3. Split Tunneling

Route specific traffic outside VPN:

  1. Uncheck "Send all traffic over VPN"
  2. Add specific routes in Advanced settings

Alternative VPN Protocols

Better Options for macOS

IKEv2

  • Faster than L2TP
  • Better for mobile
  • Native macOS support
Setup Guide

WireGuard

  • Best performance
  • Modern security
  • Low battery usage
Setup Guide

OpenVPN

  • Most compatible
  • Highly configurable
  • Works everywhere
Setup Guide

Was this article helpful?

Share:

Ready to Get Help?

Our support team is available 24/7 to assist you with any questions.