Updated on 2025-05-14 GMT+08:00

Configuring a macOS Client

Client Version Requirements

Table 1 lists the client versions supported by macOS.
Table 1 Client version requirements

Client Type

Client Version

Operation Guide

OpenVPN Connect

3.4.4.4629

OpenVPN Connect

Tunnelblick

3.8.8d

Tunnelblick

OpenVPN Connect

  1. Visit the OpenVPN official website, and download the OpenVPN Connect installer based on the hardware of your device.
  2. Install OpenVPN Connect as prompted.
  3. Download the client configuration file.

    1. Log in to the management console.
    2. Click in the upper left corner and select the desired region and project.
    3. Click in the upper left corner, and choose Networking > Virtual Private Network.
    4. In the navigation pane on the left, choose Virtual Private Network > Enterprise – VPN Gateways.
    5. Click the P2C VPN Gateways tab, and click Download Client Configuration in the Operation column of the target VPN gateway.

      The downloaded client configuration file is client_config.zip.

  4. Decompress client_config.zip to a specified directory, for example, D:\.

    After the decompression, the client_config.ovpn and client_config.conf files are generated.

  5. Open the client_config.ovpn file using TextEdit.
  6. Add the client certificate and private key to the file.

    Enter the client certificate content and the corresponding private key in between <cert></cert> and <key></key> tags, respectively.
    <cert>
    -----BEGIN CERTIFICATE-----
    Client certificate content
    -----END CERTIFICATE-----
    </cert>
    
    <key>
    -----BEGIN PRIVATE KEY-----
    Client private key
    -----END PRIVATE KEY-----
    </key>

  7. Save the .ovpn configuration file.
  8. Start the OpenVPN Connect client.
  9. Import the .ovpn configuration file and enter the configuration information.
  10. Establish a VPN connection.

    If information similar to the following is displayed, the connection is successfully established.
    Figure 1 Connection established

Tunnelblick

  1. Download Tunnelblick from the official website.

    Download the software of a required release. An official release is recommended. You are advised to download the software in DMG format.

  2. Install Tunnelblick as prompted.
  3. Download the client configuration file.

    1. Log in to the management console.
    2. Click in the upper left corner and select the desired region and project.
    3. Click in the upper left corner, and choose Networking > Virtual Private Network.
    4. In the navigation pane on the left, choose Virtual Private Network > Enterprise – VPN Gateways.
    5. Click the P2C VPN Gateways tab, and click Download Client Configuration in the Operation column of the target VPN gateway.

      The downloaded client configuration file is client_config.zip.

  4. Decompress client_config.zip to a specified directory, for example, D:\.

    After the decompression, the client_config.ovpn and client_config.conf files are generated.

  5. Open the client_config.ovpn file using TextEdit.
  6. Add the client certificate and private key to the file.

    Enter the client certificate content and the corresponding private key in between <cert></cert> and <key></key> tags, respectively.
    <cert>
    -----BEGIN CERTIFICATE-----
    Client certificate content
    -----END CERTIFICATE-----
    </cert>
    
    <key>
    -----BEGIN PRIVATE KEY-----
    Client private key
    -----END PRIVATE KEY-----
    </key>

  7. Comment out disable-dco.

    1. Press Command+F to search for and locate disable-dco.
    2. Enter # in front of the line where disable-dco is located to comment out the line.
      ...
      ...
      # disable-dco
      ...
      ...

  8. Save the .ovpn configuration file.
  9. Start the Tunnelblick client.
  10. Import the .ovpn configuration file.
  11. Establish a VPN connection.