How to set up OpenVPN on pfSense 2.4.4 (2024)

This tutorial will show you how to configure an OpenVPN tunnel on your pfSense 2.4.4 router.

To proceed, you need a router with pfSense firmware version 2.4.4 or higher and an active Surfshark subscription, which you can purchase on Surfshark's pricing page.


You will learn how to:

  1. Get your credentials
  2. Choose a Surfshark server
  3. Configure the OpenVPN client
  4. Ensure your connection is successful

Get your credentials


NOTE:These are not your regular credentials, such as your email and password.

  1. Enter the Surfshark login pageand log in. Then, click on VPN > Manual Setup > Router > OpenVPN to generate your credentials.
    How to set up OpenVPN on pfSense 2.4.4 (1)
  2. Once there, make sure that you are in the Credentials tab and click on Generate credentials.

    NOTE: Keep this tab open as we'll need it later.

    How to set up OpenVPN on pfSense 2.4.4 (2)

Choose a Surfshark server

  1. Open the same page on another browser tab, go to theLocations tab, and locate the server that you wish to connect to.
    How to set up OpenVPN on pfSense 2.4.4 (3)
  2. Click on the download icon to the right of the server name and click on Download UDP.
    How to set up OpenVPN on pfSense 2.4.4 (4)

Configure the OpenVPN client

  1. Access your pfSense admin panel via a browser and navigate to System >Cert. Manager >CAs.
  2. Press on the + Add button. Then, fill the fields out like this:

    Descriptive Name: Surfshark_VPN;
    Method: Import an existing Certificate Authority;
    Certificate data:
    -----BEGIN CERTIFICATE-----
    MIIFTTCCAzWgAwIBAgIJAMs9S3fqwv+mMA0GCSqGSIb3DQEBCwUAMD0xCzAJBgNV
    BAYTAlZHMRIwEAYDVQQKDAlTdXJmc2hhcmsxGjAYBgNVBAMMEVN1cmZzaGFyayBS
    b290IENBMB4XDTE4MDMxNDA4NTkyM1oXDTI4MDMxMTA4NTkyM1owPTELMAkGA1UE
    BhMCVkcxEjAQBgNVBAoMCVN1cmZzaGFyazEaMBgGA1UEAwwRU3VyZnNoYXJrIFJv
    b3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDEGMNj0aisM63o
    SkmVJyZPaYX7aPsZtzsxo6m6p5Wta3MGASoryRsBuRaH6VVa0fwbI1nw5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24WuSUOqcGSsURHevawPVBfgmsxf1UCjelaIwngdh6WfNCRXa5QQPQTK
    ubQvkvXONCDdhmdXQccnRX1nJWhPYi0onffvjsWUfztRypsKzX4dvM9k7xnIcGSG
    EnCC4RCgt1UiZIj7frcCMssbA6vJ9naM0s7JF7N3VKeHJtqe1OCRHMYnWUZt9vrq
    X6IoIHlZCoLlv39wFW9QNxelcAOCVbD+19MZ0ZXt7LitjIqe7yF5WxDQN4xru087
    FzQ4Hfj7eH1SNLLyKZkA1eecjmRoi/OoqAt7afSnwtQLtMUc2bQDg6rHt5C0e4dC
    LqP/9PGZTSJiwmtRHJ/N5qYWIh9ju83APvLm/AGBTR2pXmj9G3KdVOkpIC7L35dI
    623cSEC3Q3UZutsEm/UplsM=
    -----END CERTIFICATE-----
  3. Press Save at the bottom of the page.
    How to set up OpenVPN on pfSense 2.4.4 (5)

  4. Afterwards, navigate toVPN >OpenVPN >Clientsand press+Add.
    How to set up OpenVPN on pfSense 2.4.4 (6)
  5. Fill in the fields as so:

    General Information

    Disable this client: Leave unchecked
    Server mode: Peer to Peer (SSL/TLS)
    Protocol: UDP on IPv4 only (you can also use TCP)
    Device mode: tun – Layer 3 Tunnel Mode
    Interface: WAN
    Local port: Leave blank
    Server host or address: The server hostname that you wish to connect to (refer toChoose a Surfshark server section in this article)
    Server port: 1194 (use 1443 if you use TCP)
    Proxy host or address: Leave blank
    Proxy port: Leave blank
    Proxy Authentication: None
    Description: Any name you like


    User Authentication Settings

    Username and Password:Surfshark service credentials (refer to Get your credentials section in this article)
    Authentication Retry: Leave unchecked


    How to set up OpenVPN on pfSense 2.4.4 (7)

    Cryptographic Settings

    TLS Configuration: Check
    Automatically generate a TLS Key: Uncheck
    TLS Key:

    -----BEGIN OpenVPN Static key V1-----
    b02cb1d7c6fee5d4f89b8de72b51a8d0
    c7b282631d6fc19be1df6ebae9e2779e
    6d9f097058a31c97f57f0c35526a44ae
    09a01d1284b50b954d9246725a1ead1f
    f224a102ed9ab3da0152a15525643b2e
    ee226c37041dc55539d475183b889a10
    e18bb94f079a4a49888da566b9978346
    0ece01daaf93548beea6c827d9674897
    e7279ff1a19cb092659e8c1860fbad0d
    b4ad0ad5732f1af4655dbd66214e552f
    04ed8fd0104e1d4bf99c249ac229ce16
    9d9ba22068c6c0ab742424760911d463
    6aafb4b85f0c952a9ce4275bc821391a
    a65fcd0d2394f006e3fba0fd34c4bc4a
    b260f4b45dec3285875589c97d3087c9
    134d3a3aa2f904512e85aa2dc2202498
    -----END OpenVPN Static key V1-----

    TLS Key Usage Mode: TLS Authentication
    Peer certificate authority: Surfshark_VPN
    Peer Certificate Revocation list: Do not define

    Client certificate: webConfigurator default (59f92214095d8)(Server: Yes, In Use) (NOTE: The numbers on your machine could be different)
    Encryption Algorithm: AES-256-GCM
    Enable NCP: Check
    NCP Algorithms: AES-256-GCM and AES-256-CBC
    Auth digest algorithm: SHA512 (512-bit)
    Hardware Crypto: No hardware crypto acceleration


    How to set up OpenVPN on pfSense 2.4.4 (8)

    Tunnel Settings:

    IPv4 tunnel network: Leave blank
    IPv6 tunnel network: Leave blank
    IPv4 remote network(s): Leave blank
    IPv6 remote network(s): Leave blank
    Limit outgoing bandwidth: Leave blank
    Compression: Omit Preference (Use OpenVPN Default)
    Topology:Subnet – One IP address per client in a common subnet
    Type-of-service: Leave unchecked
    Don’t pull routes: Uncheck
    Don’t add/remove routes: Leave unchecked


    How to set up OpenVPN on pfSense 2.4.4 (9)

    Advanced Configuration:

    Custom options:paste the contents below

    tls-client;
    remote-random;
    tun-mtu 1500;
    tun-mtu-extra 32;
    mssfix 1450;
    persist-key;
    persist-tun;
    reneg-sec 0;
    remote-cert-tls server;

    UDP FAST I/O: Leave unchecked
    Send/Receive Buffer: Default
    Gateway creation: IPv4 only
    Verbosity level: 3 (recommended)

  6. PressSaveat the bottom of the page andApply changes at the top of the page.
    How to set up OpenVPN on pfSense 2.4.4 (10)
  7. Navigate toInterfaces >Interface Assignments and addSurfshark VPN interface.
    How to set up OpenVPN on pfSense 2.4.4 (11)
  8. Press on OPT1 on the left of your assigned interface and fill in the following information:

    Enable: Check
    Description: Surfshark VPN
    MAC Address: Leave blank
    MTU: Leave blank
    MSS: Leave blank


    How to set up OpenVPN on pfSense 2.4.4 (12)
  9. Do not change anything else. Just scroll down to the bottom and pressSaveandApply Changes.
  10. Navigate toServices >DNS Resolver >General Settings

    Enable: Check
    Listen port: Leave as it already is
    Enable SSL/TLS Service: Uncheck
    SSL/TLS Certificate: webConfigurator default (59f92214095d8) (Server: Yes, In Use) (please note that the numbers on your machine could be different);
    SSL/TLS Listen Port: Leave as it already is
    Network Interfaces: All
    Outgoing Network Interfaces: Surfshark VPN
    System Domains Local Zone Type: Transparent
    DNSSEC: Uncheck
    DNS Query Forwarding: Check
    DHCP Registration: Check
    Static DHCP: Check


  11. ClickSaveandApply Changes.
    How to set up OpenVPN on pfSense 2.4.4 (13)

  12. While in DNS Resolver, selectAdvanced Settingsat the top and then fill in the following:

    ADVANCED PRIVACY OPTIONS

    Hide Identity: Check
    Hide Version: Check


    How to set up OpenVPN on pfSense 2.4.4 (14)

    ADVANCED RESOLVER OPTIONS

    Prefetch Support: Check
    Prefetch DNS Key Support: Check

    How to set up OpenVPN on pfSense 2.4.4 (15)

  13. ClickSaveandApply changes.

  14. Navigate toFirewall >NAT >Outboundand selectManual Outbound NAT rule generation.
  15. PressSaveandApply Changes. Then four rules will appear. Leave all rules untouched and add a new one.

    1. Select SurfsharkVPNas anInterface.
    2. Source:your LAN subnet.

    3. Click Save.
    How to set up OpenVPN on pfSense 2.4.4 (16)

  16. Navigate toFirewall >Rules >LANanddelete the IPv6 rule. Also,edit the IPv4 rule:

    1. Press on Display Advanced.
    2. Change GatewaytoSurfshark VPN.
    3. Click SaveandApply Changes.
    How to set up OpenVPN on pfSense 2.4.4 (17)

    How to set up OpenVPN on pfSense 2.4.4 (18)

  17. Go toSystem >General Setup >DNS Server Settings and fill in the following:

    DNS Server 1: 162.252.172.57;Gateway: SURFSHARKVPN_VPNV4
    DNS Server 2: 149.154.159.92;Gateway: SURFSHARKVPN_VPNV4
    How to set up OpenVPN on pfSense 2.4.4 (19)

  18. ClickSave.
  19. Navigate to Status >OpenVPN, and it should state that the service is up.

    How to set up OpenVPN on pfSense 2.4.4 (20)

Ensure the connection is successful

We always recommend checking if Surfshark VPN is working after setting it up for the first time. You can easily do it by performing Surfshark IP leak test and a DNS leak test. For your convenience, both are available on our website.

You may also be interested in:

  • How to make sure if Surfshark VPN is working
  • How to find your router's IP address
  • How to set up a VPN-protected Wi-Fi hotspot using Windows

Was this article helpful?

Thank you for your feedback!

How to set up OpenVPN on pfSense 2.4.4 (2024)

FAQs

How to set up OpenVPN on pfSense 2.4.4? ›

The pfSense software GUI includes a certificate management interface that is fully integrated with OpenVPN. Certificate authorities (CAs) and server certificates are managed in the Certificate Manager in the web interface, located at System > Certificates.

How to configure OpenVPN on pfSense step by step? ›

OpenVPN rule
  1. From the menus at the top of the screen, select Firewall > Rules.
  2. Select the OpenVPN sub-menu.
  3. Click the Add button to create a new rule at the top of the list.
  4. Set the Address Family to IPv4 + IPv6 if your system is using both IPv4 and IPv6. ...
  5. Set the Protocol field to Any.
  6. Set the Source to Network.

Does pfSense support OpenVPN? ›

The pfSense software GUI includes a certificate management interface that is fully integrated with OpenVPN. Certificate authorities (CAs) and server certificates are managed in the Certificate Manager in the web interface, located at System > Certificates.

How do I use pfSense as a VPN server? ›

Create the OpenVPN server
  1. From the pfSense menu, select VPN, and OpenVPN. Click Add.
  2. Select the Server mode, either Remote Access (SSL/TLS), Remote Access (User Auth), or Remote Access (SSL/TLS + User Auth).
  3. Change the Local port if necessary. Otherwise, the default is 1194.
  4. Name your server in the Description section.
Dec 11, 2023

How to set up L2TP VPN on pfSense? ›

II. Set up L2TP VPN client on your pfSense router
  1. Navigate to the Interfaces tab > Assignments > PPPs and click +Add button.
  2. Configure the next parameters as follows: ...
  3. Go to the Interface Assignments tab, select L2TP option for Available network ports and click +Add.
  4. Click the OPT1 label.
  5. Change the following parameters:

How do I install and set up OpenVPN? ›

Windows Installation for OpenVPN Connect with OpenVPN Servers
  1. Download the OpenVPN Connect app from our website.
  2. Wait until the download completes, then open it.
  3. Run the OpenVPN Connect setup wizard.
  4. Agree to the EULA and install.
  5. When prompted, click Yes to approve the privilege escalation request.

How to activate OpenVPN? ›

Click Configuration > Activation. Paste the activation key into the field, Enter Activation Key here. Click Activate.

Which VPN is best for pfSense? ›

NordVPN is our top pick for a pfSense VPN. It dwarfs many other VPNs when it comes to network size, with over 5,400 servers to choose from in 60+ countries, and is one of the fastest VPNs we've reviewed.

How to setup OpenVPN for remote access? ›

openvpn.com. Navigate to Networks > Networks. Click Add Network. Select the Remote Access network scenario from the three choices: Remote Access, Site-to-site, and Secure Internet Access.

How to get ovpn file from pfSense? ›

OpenVPN Client Export Package
  1. Navigate to System > Packages, Available Packages tab.
  2. Locate the OpenVPN Client Export package in the list.
  3. Click. Install next to that package listing to install.
  4. Click. Confirm to confirm the installation.
Sep 6, 2023

What ports to open for L2TP VPN? ›

Required firewall rules and correct order for L2TP/IPSec
  • IKE - UDP port 500.
  • L2TP - UDP port 1701.
  • ESP - protocol 50.
  • NAT-T - UDP port 4500 (if using NAT-T)

How to setup L2TP VPN server? ›

Start the L2TP Connection
  1. In the Windows notification area (System Tray), click the Network icon. A list of available networks and VPNs appears.
  2. Click the VPN connection. The Network & Internet VPN settings appear.
  3. Select the VPN connection. Click Connect. ...
  4. Type your user name and password.
  5. Click OK.

How to setup pfSense IPsec VPN? ›

Setup IPsec
  1. Navigate to VPN > IPsec, Mobile Clients tab in the pfSense software GUI.
  2. Configure the settings as follows: Enable IPsec Mobile Client Support: Checked. User Authentication: Local Database (Not used, but the option must have something selected) Provide a virtual IP address to clients: Unchecked. ...
  3. Click Save.
Apr 3, 2024

How to setup pfSense step by step? ›

How to install and configure pfSense firewall
  1. Download the pfSense installation image from the official website. ...
  2. Burn the image to a CD or USB drive using your preferred method. ...
  3. Boot from the CD or USB drive and follow the on-screen instructions. ...
  4. Once the installation is complete, reboot your computer.
Jan 22, 2023

How do I start OpenVPN with config? ›

To run OpenVPN, you can: Right click on an OpenVPN configuration file (.ovpn) and select Start OpenVPN on this configuration file. Once running, you can use the F4key to exit.

How do I import an OpenVPN profile into pfSense? ›

Client Import Example
  1. Obtain an OpenVPN configuration file in inline format from the OpenVPN server (e.g. username.ovpn ) ...
  2. Navigate to VPN > OpenVPN, Import tab on the client firewall.
  3. Click Browse in the .ovpn config file field and select the configuration file obtained from the server (e.g. username.ovpn )

How to manually configure OpenVPN on Linux? ›

How to manually configure OpenVPN CLI
  1. Install OpenVPN. Open a terminal window and: ...
  2. Install openresolv. ...
  3. Download the following DNS update script. ...
  4. Change the directory to where you downloaded your OpenVPN configuration file. ...
  5. Connect to a VPN server using OpenVPN.

Top Articles
Wood Paint Types (A Guide To Choosing The Right One)
How to Convert Decimal Hours to Hours and Minutes
Spn 1816 Fmi 9
Zabor Funeral Home Inc
Gamevault Agent
Mopaga Game
Craigslist Portales
<i>1883</i>'s Isabel May Opens Up About the <i>Yellowstone</i> Prequel
CA Kapil 🇦🇪 Talreja Dubai on LinkedIn: #businessethics #audit #pwc #evergrande #talrejaandtalreja #businesssetup…
Cvs Devoted Catalog
Lqse-2Hdc-D
Www.paystubportal.com/7-11 Login
The Binding of Isaac
Nitti Sanitation Holiday Schedule
Hijab Hookup Trendy
Burn Ban Map Oklahoma
Northern Whooping Crane Festival highlights conservation and collaboration in Fort Smith, N.W.T. | CBC News
Tygodnik Polityka - Polityka.pl
The best TV and film to watch this week - A Very Royal Scandal to Tulsa King
Apply for a credit card
Heart Ring Worth Aj
Yog-Sothoth
How to Download and Play Ultra Panda on PC ?
Talk To Me Showtimes Near Marcus Valley Grand Cinema
A Cup of Cozy – Podcast
Watertown Ford Quick Lane
Smartfind Express Login Broward
Ticket To Paradise Showtimes Near Cinemark Mall Del Norte
Darknet Opsec Bible 2022
Puffin Asmr Leak
Gus Floribama Shore Drugs
Ellafeet.official
Egg Crutch Glove Envelope
NIST Special Publication (SP) 800-37 Rev. 2 (Withdrawn), Risk Management Framework for Information Systems and Organizations: A System Life Cycle Approach for Security and Privacy
Phone number detective
Afspraak inzien
Pinellas Fire Active Calls
Dynavax Technologies Corp (DVAX)
Hebrew Bible: Torah, Prophets and Writings | My Jewish Learning
Htb Forums
Wayne State Academica Login
Husker Football
2023 Nickstory
Craigslist Boats Dallas
2007 Jaguar XK Low Miles for sale - Palm Desert, CA - craigslist
Luvsquad-Links
Sdn Fertitta 2024
Powerboat P1 Unveils 2024 P1 Offshore And Class 1 Race Calendar
Az Unblocked Games: Complete with ease | airSlate SignNow
Victoria Vesce Playboy
Latest Posts
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 5920

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.