Table of Contents

PFSense - VPN - OpenVPN - Configure an OpenVPN Server - Using a Wizard

Navigate to VPN → OpenVPN → Servers.

Click on Wizard.

NOTE: This Wizard will easily create the CA (Certification Authority), the Server Certificate and the configuration of the VPN Server;

These components can also be created manually if required.


Create the CA

NOTE: All the other parameters can be left by default.


Create the Server Certificate

NOTE: The Lifetime can only be set for a short timeframe. See the comment against that fields.

All other default parameters can be left as default.


Configure the VPN Server

In General OpenVPN Server Information:


In Cryptographic Settings:


In Tunnel Settings:

NOTE: The Tunnel Network acts as an intermediary.

Any local address, could be used here. i.e. RFC1918 Compliant.

  • RFC1918 Compliant: (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).

Take care not to choose 10.10.10.1 as this could conflict with pfBlockerNG


In Client Settings:


Firewall Rules

Wizard Firewall Rule Setup


Success

OpenVPN Server

Navigate to VPN → OpenVPN → Servers.


Firewall Rules - WAN

Navigate to Firewall → Rules → WAN.


Firewall Rules - OpenVPN

Navigate to Firewall → Rules → OpenVPN.


Cert Manager - CAs

Navigate to System - Cert Manager - CAs.


Cert Manager - Certificates

Navigate to System - Cert Manager - Certificates.


Create the OpenVPN Users

Create the users we want to connect in to the VPN.

Navigate to System → User Manager → Users.

NOTE: This creates both the user and the associated certificate in a single operation


NOTE: At this point we can export the configuration files and certificates for individual users who will use the VPN clients to connect.

In the System → Certificate Manager section we will see the certificate associated with the VPN server and all those associated with the users created.


Install the package openvpn-client-export

Navigate to System → Package Manager → Available Packages.

Search for openvpn-client-export.

Install the Package.

NOTE: Once installed we will see the option added under VPN → OpenVPN → Client Export.


Configure the Client Certificate

Navigate to VPN → OpenVPN → Client Export

In OpenVPN Server:

In Client Connection Behavior:

NOTE: These parameters will be written to the .ovpn configuration file which will be generated for the user.

There is no need to click on the Save as default button, but if you do it is easy to update and save as a new default.


Export the Client Certificate

Export the user configuration file which is to be installed on the clients.

There are many choices.To do this we have various choices, the most recommended below:


Install the Client Certificate on an actual Client

Copy the Client Certificate (the .ovpn file) to the specific client.

Connect to the OpenVPN Server using this Client Certificate.

For example on an Android phone, the OpenVPN app is used and shows successful connection.


Show OpenVPN Widget on the pfSense Dashboard

Navigate to the pfSense Dashboard.

Click on the + at the top of the dashboard and select OpenVPN.

When a client connects via the VPN this will show:


References

https://www.firewallhardware.it/en/pfsense-and-openvpn-guide-to-creating-and-configuring-a-road-warrior-vpn-server/