To connect to a virtual private network (VPN), you need to enter configuration settings in Network preferences. These settings include the VPN server address, account name, and any authentication settings, such as a password or a certificate you received from the network administrator.

If you received a VPN settings file from your network administrator, you can import it to set up your connection. If you didn’t, you can enter the settings manually.

Import a VPN settings file

On your Mac, do one of the following:

  • Double-click the file to open Network preferences and automatically import the settings. 

  • Choose Apple menu > System Preferences, click Network, click the Action pop-up menu , then choose Import Configurations. Select the file, then click Import.

Enter VPN settings manually

  1. On your Mac, choose Apple menu  > System Preferences, then click Network.

  2. Click the Add button  in the list at the left, click the Interface pop-up menu, then choose VPN.

  3. Click the VPN Type pop-up menu, then choose what kind of VPN connection you want to set up, depending on the network you are connecting to. Give the VPN service a name, then click Create.

    • L2TP is an extension of the Point-to-Point Tunneling Protocol used by internet service providers to enable a VPN over the internet.

    • IPSec (Internet Protocol Security) is a set of security protocols.

    • IKEv2 is a protocol that sets up a security association in IPSec.

  4. Enter the server address and the account name for the VPN connection.

  5. Click Authentication Settings, then enter the information you received from the network administrator.

  6. If specified by your network administrator, click Advanced to enter additional information such as session options, TCP/IP settings, DNS servers, and proxies.

    The additional information you can enter depends on the type of VPN connection you’re setting up.

  7. Click Apply, then click OK.

Select “Show VPN status in menu bar” to use the VPN status icon to connect to the network and switch between VPN services.

To remove the VPN configuration, select the VPN network connection service in the list and click the Remove button .


Change options for L2TP over IPSec VPN connections on Mac

Set VPN options, such as controlling when VPN disconnects, and turning on verbose logging to capture more log information in a VPN session.

VPN options are available only for the L2TP over IPSec type of VPN connection. (For other types of VPN connections, the options are specified by the VPN server when the VPN connection is negotiated.)

  1. On your Mac, choose Apple menu  > System Preferences, then click Network.

  2. Select your VPN service in the list at the left.

    If your VPN service isn’t in the list, click the Add button  at the bottom of the list, click the Interface pop-up menu and choose VPN, then click the VPN Type pop-up menu and choose the VPN type. Enter a name for the service, then click Create.

  3. Enter the server address, account name, and any authentication settings you received from your network administrator or ISP.

  4. Click Advanced, click Options, then select the options you want to use:

    • Disconnect when switching user accounts: Ends a VPN session when you switch users.

    • Disconnect when user logs out: Ends a VPN session when a user logs out.

    • Send all traffic over VPN connection: Sends all network traffic over the VPN connection, regardless of the network service you use, such as Wi-Fi or Ethernet.

    • Use verbose logging: Captures more detailed log information in your VPN session. This may be useful if you are troubleshooting a problem with your VPN connection.