Artica Wiki

Setup OpenVPN Client in pfSense

How to setup an OpenVPN client in pfSense

  • This feature is avaliable in SP695+.
  • If you already have OpenVPN configured before the upgrade, you must create a new CA certificate and reconfigure the OpenVPN service and rebuild all the client scripts.

Create a Certificate Authority

Setup the OpenVPN

  1. On left menu select OpenVPN
  2. Parameters
  3. Select the new certificate to be used by the OpenVPN service
  4. On the bottom of the page click Apply and then Reconfigure Service
    screenshot_14.png

Create the Client Script

  1. On left menu select OpenVPN
  2. Client Scripts
  3. Click on the botton Create a new connection
  4. Set the connection name
  5. On operating system dropdown select Linux
  6. Click on botton Generate parameters
    screenshot_1.png

Build the Script

  1. After you create the script, click on the button Build the script or Run
    screenshot_2.png

Download the Script

  1. After you build the script, click on the button Download
    screenshot_3.png

Setup the pfSense OpenVPN Client

Import the Certificate Authority

  1. On pfSense, go to System / Certificate Manager
  2. On CAs tab, click on the botton Add
    screenshot_4.png
  3. Set the Descriptive name
  4. On Method dropdown, select Import an existing Certificate Authority
  5. Check the option Trust Store
    screenshot_5.png
  6. Open with notepad or other IDE the OpenVPN client script previously downloaded.
  7. Copy the key inside < ca > tag and paste it inside Certificate data textarea.
    screenshot_6.png
    screenshot_7.png
  8. Click Save

Import the Client Certificate

  1. On pfSense, go to System / Certificate Manager
  2. On Certificates tab, click on the botton Add/Sign
    screenshot_8.png
  3. On Method dropdown, select Import an existing Certificate
  4. Set the Descriptive name
  5. In Certificate Type, select X.509 (PEM)
    screenshot_9.png
  6. Open with notepad or other IDE the OpenVPN client script previously downloaded.
  7. Copy the key inside < cert > tag and paste it inside Certificate data textarea.
    screenshot_10.png
    screenshot_11.png
  8. Copy the key inside < key > tag and paste it inside Private key data textarea.
    screenshot_12.png
    screenshot_13.png
  9. Click Save

Configure OpenVPN Client

  1. On pfSense, go to VPN / OpenVPN
  2. Select Clients
  3. Add
    screenshot_15.png
  4. In Server Mode select Peer to Peer (TLS/SSL)
  5. Set the Protocol configured on OpenVPN server, by default is UDP
  6. Set the Device Mode configured on OpenVPN server, by default is Tun
  7. Select the outgoing Interface to be used by the OpenVPN client.
  8. Set the Server host or address of OpenVPN Server
  9. Set the Server Port of OpenVPN Server
    screenshot_16.png
  10. If you enable authentication on OpenVPN server, set the username and password
    screenshot_17.png
  11. Uncheck the option Use a TLS Key
  12. In Peer Certificate Authority select the CA certificate.
  13. In Client Certificate select the client certificate.
  14. Allow AES-256-GCM, AES-128-GCM and CHACHA20-POLY1307 in Data Encryption Algorithms
  15. Save
    screenshot_18.png

Check the connections Status

In Artica

  1. On left menu select OpenVPN
  2. Sessions
    screenshot_19.png

In pfSense

  1. On menu Status, select OpenVPN
    screenshot_20.png