Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    pfsense as OpenVPN server, why slow speed?

    OpenVPN
    5
    15
    11.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Skippern12
      last edited by

      Hi

      I have been using pfSense as OpenVPN server for a long time now. It works perfect, but the VPN speed is not as fast as I want. I get around 25mbit through the tunnel. What can I do to improve that?

      pfSense is running OpenVPN server, and OpenVPN Client is installed on laptop, tried several laptops with same results.

      Technical information:
      pfSense Version 2.3.3
      Internet Connection 300/300mbit

      pf sense is running on a computer with this hardware:
      -Intel(R) Core(TM) i3-4160T CPU @ 3.10GHz 4 CPUs: 1 package(s) x 2 core(s) x 2 SMT threads
      -4GB ram
      -120GB SSD
      2x network cards, one for WAN and the other for LAN.

      This hardware should be enough to get more than 25mbit?

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by johnpoz

        @skippern12 said in pfsense as OpenVPN server, why slow speed?:

        pfSense Version 2.3.3

        Why? And where is the laptop at when its testing?

        You do understand that old version is running OLD version of openvpn server.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • S
          Skippern12
          last edited by

          @johnpoz said in pfsense as OpenVPN server, why slow speed?:

          @skippern12 said in pfsense as OpenVPN server, why slow speed?:

          pfSense Version 2.3.3

          Why? And where is the laptop at when its testing?
          You do understand that old version is running OLD version of openvpn server.

          Yes, I know there is a newer version available. Haven't upgraded because I don't want to mess up things, do you think it would improve speed?

          Have tried different locations for the laptop, at the moment speedtest.net reads 135Mbps without VPN and 24Mbps with VPN Connected.
          Turned Encryption Algorithm to No encryption, with no difference. CPU usage is 1%, I had expected more.

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            Different locations means what exactly? Local to your vpn server or at some remote location with limited down/up internet speed along with different latency... Which is going to effect your speeds..

            If you want to know what the openvpn connection is capable of.. Then put your laptop on the local wan network and connect to your vpn server. Then run say an iperf test to something sitting on your lan.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            JKnottJ 1 Reply Last reply Reply Quote 0
            • JKnottJ
              JKnott @johnpoz
              last edited by

              @johnpoz said in pfsense as OpenVPN server, why slow speed?:

              Different locations means what exactly? Local to your vpn server or at some remote location with limited down/up internet speed along with different latency... Which is going to effect your speeds.

              Of course, if you're at a different location from the pfSense firewall and trying to access a site elsewhere, then the traffic has to pass through the internet connection twice, once in the tunnel and again when going out to the Internet. That alone will cut bandwidth in half. I have 2 ways to test that avoids this problem. First, I have a spare port on my firewall, which I can connect a computer to and my cable modem also supports 2 connections, so I can plug in there and be entirely outside of my firewall.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              1 Reply Last reply Reply Quote 0
              • S
                Skippern12
                last edited by

                Hi

                Tried with iperf3 now.

                Without VPN it measures 800Mbit
                With VPN I get only 25 to 35 Mbit

                1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate
                  last edited by

                  You said 300/300 in the OP now you're saying 800? Which is it? Makes people think you're not testing what you think you're testing.

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                  1 Reply Last reply Reply Quote 0
                  • S
                    Skippern12
                    last edited by

                    iperf tests was done local, not over the internet.
                    800/800 is directly between pc's used for test (LAN), this verifies that the pc's are good.
                    When I put the pfsense between the two PC's, I get poor results

                    1 Reply Last reply Reply Quote 0
                    • S
                      Skippern12
                      last edited by

                      Update:
                      Upgraded to v 2.4.3 and added UDP Fast I/O and Send/Rec buffer 2mb. Now I get 37mbps (iperf), some improvement, but I think it should be possible to improve more?

                      1 Reply Last reply Reply Quote 0
                      • DerelictD
                        Derelict LAYER 8 Netgate
                        last edited by

                        What is your CPU doing while you're testing.

                        top -aSH while it is running should give you some insight.

                        What is the testing configuration now?

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • S
                          Skippern12
                          last edited by

                          Not able to test right now with the command you suggest, when I monitored cpu usage in pfsense web interface, it was showing 4-5% openvpn and almost 95% idle.

                          Test configuration is two computers with iperf
                          Software.
                          One computer connected to LAN side og pfsense and the other to WAN. Using UDP OpenVPN to tunnel with AES128-CBC snd Sha1.

                          1 Reply Last reply Reply Quote 0
                          • DerelictD
                            Derelict LAYER 8 Netgate
                            last edited by

                            OK so you have no idea if you are testing the firewall's OpenVPN capabilities or the client's in that scenario.

                            Chattanooga, Tennessee, USA
                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

                            1 Reply Last reply Reply Quote 0
                            • S
                              Skippern12
                              last edited by

                              @skippern12 said in pfsense as OpenVPN server, why slow speed?:

                              hardware

                              It could of course be a client problem, but I have tested with different laptops so I thing the problem is on the server side.

                              1 Reply Last reply Reply Quote 0
                              • S
                                Skippern12
                                last edited by

                                Just configured L2TP/IPSEC and did a test from a Laptop with Windows 10 using Windows 10 built in VPN Client software.
                                Test was done with laptop connected to Wifi and I got around 70mbps with Iperf over the VPN tunnel.
                                Pfsense CPU load was around 6% during test.

                                This is twice as fast as OpenVPN and even not a proper test since it was done over wifi.

                                Can't understand why OpenVPN is so slow...

                                L 1 Reply Last reply Reply Quote 1
                                • L
                                  lonblu @Skippern12
                                  last edited by

                                  @skippern12 still slow on latest version to date... using openvnp connect on Android 12... and on server UDP with 128 data encryption (minimun).. I can't exchange big files (above 500 KB), I get timeout

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.