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

    OpenVPN Speed problem on 1 Gbps link

    Scheduled Pinned Locked Moved OpenVPN
    12 Posts 4 Posters 1.2k Views
    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.
    • K
      khodorb
      last edited by

      HI ,
      I am using OpenVPN on Netgate SG-4860 on our datacenter and i do have a symmetric WAN link for 1 Gbps speed,
      when on lan i can test that speed on speedtest, but when connected remotely via openvpn i can only get 50 to 60 Mbps on speedtest.
      i was wondering what could be wrong on my setup and what parameters i can change under my settings to increase the speed for VPN users.
      is there is a limit on bandwidth that we can control under openVPN

      i am on pfsense 2.4.5 version and i tested that also on version pfsense+ 22.05

      This is my current configuration , i have removed the tls and dns section for privacy

      <openvpn>
      <openvpn-server>
      <vpnid>1</vpnid>
      <mode>server_tls_user</mode>
      <authmode>Local Database</authmode>
      <protocol>UDP4</protocol>
      <dev_mode>tun</dev_mode>
      <interface>wan</interface>
      <ipaddr></ipaddr>
      <local_port>1194</local_port>
      <description><![CDATA[PAID OpenVPN server]]></description>
      <custom_options></custom_options>
      <tls></tls>
      <tls_type>auth</tls_type>
      <tlsauth_keydir>default</tlsauth_keydir>
      <caref>59a47a78cfd5b</caref>
      <crlref>59a47fec1401d</crlref>
      <certref>59a5ca057de10</certref>
      <dh_length>2048</dh_length>
      <ecdh_curve>none</ecdh_curve>
      <cert_depth>1</cert_depth>
      <strictusercn>yes</strictusercn>
      <crypto>AES-256-CBC</crypto>
      <digest>SHA256</digest>
      <engine>cryptodev</engine>
      <tunnel_network>192.168.72.0/24</tunnel_network>
      <tunnel_networkv6></tunnel_networkv6>
      <remote_network></remote_network>
      <remote_networkv6></remote_networkv6>
      <gwredir>yes</gwredir>
      <gwredir6></gwredir6>
      <local_network></local_network>
      <local_networkv6></local_networkv6>
      <maxclients>100</maxclients>
      <compression></compression>
      <compression_push></compression_push>
      <passtos></passtos>
      <client2client>yes</client2client>
      <dynamic_ip>yes</dynamic_ip>
      <topology>subnet</topology>
      <serverbridge_dhcp></serverbridge_dhcp>
      <serverbridge_interface>none</serverbridge_interface>
      <serverbridge_routegateway></serverbridge_routegateway>
      <serverbridge_dhcp_start></serverbridge_dhcp_start>
      <serverbridge_dhcp_end></serverbridge_dhcp_end>
      <dns_domain>company.local</dns_domain>
      <dns_server1></dns_server1>
      <dns_server2></dns_server2>
      <dns_server3></dns_server3>
      <dns_server4></dns_server4>
      <push_blockoutsidedns>yes</push_blockoutsidedns>
      <username_as_common_name><![CDATA[enabled]]></username_as_common_name>
      <exit_notify>none</exit_notify>
      <sndrcvbuf></sndrcvbuf>
      <push_register_dns>yes</push_register_dns>
      <netbios_enable></netbios_enable>
      <netbios_ntype>0</netbios_ntype>
      <netbios_scope></netbios_scope>
      <create_gw>both</create_gw>
      <verbosity_level>4</verbosity_level>
      <ncp-ciphers>AES-128-GCM,AES-256-CBC</ncp-ciphers>
      <ncp_enable>enabled</ncp_enable>
      <ping_method>keepalive</ping_method>
      <keepalive_interval>10</keepalive_interval>
      <keepalive_timeout>60</keepalive_timeout>
      <ping_seconds>10</ping_seconds>
      <ping_push></ping_push>
      <ping_action>ping_restart</ping_action>
      <ping_action_seconds>60</ping_action_seconds>
      <ping_action_push></ping_action_push>
      <inactive_seconds>60</inactive_seconds>
      </openvpn-server>
      </openvpn>

      i have tested 2 netgate devices :
      SG-4860 and 6100 MAx with 1Gbps Wan speed , on the lan network i can reach the same speed, but when using openvpn client connection, the speed test shows a result of 50 to 60 Mbps, i have in total 50 users using openvpn and i have tested the speed when no one else is connected

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @khodorb
        last edited by

        @khodorb 1 Gb is probably unrealistic but it should be higher than 50.

        On the dashboard, under CPU Type, is one of the crypto options enabled?
        https://docs.netgate.com/pfsense/en/latest/config/advanced-misc.html#cryptographic-thermal-hardware

        also see: https://docs.netgate.com/pfsense/en/latest/vpn/performance.html and subsection https://docs.netgate.com/pfsense/en/latest/vpn/performance.html#scaling-openvpn

        Using a 128 bit cipher should speed things up.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        K 1 Reply Last reply Reply Quote 0
        • K
          khodorb @SteveITS
          last edited by

          @steveits
          This is what i have in place

          91984956-8cf3-403d-b218-314f691bb3c9-image.png
          c464a33f-0298-4fe4-8ed2-718f47d642fc-image.png

          And this is for openvpn settings , what do you recommend ?
          any advice is highly appreciated

          5dd0c4dd-7463-4080-a96c-aa383699a5b5-image.png

          c582e88e-3bd3-414f-a9c7-cdde85ba45b3-image.png

          K 1 Reply Last reply Reply Quote 0
          • K
            khodorb @khodorb
            last edited by

            843d44fb-6425-40f4-aac8-87e41a4d7787-image.png @SteveITS

            S 1 Reply Last reply Reply Quote 0
            • S
              SteveITS Galactic Empire @khodorb
              last edited by SteveITS

              @khodorb Try changing "Cryptographic Hardware" to AES-NI. IIRC OpenVPN doesn't support QAT.

              What is the CPU usage while transferring files?

              Did you review https://docs.netgate.com/pfsense/en/latest/recipes/index.html#openvpn ?

              You're also on a pretty old version, 2.4.5. You can upgrade to Plus though it might be a few steps to get there. Or you can back up, install 22.05, and restore.

              re: Plus, also see:
              https://docs.netgate.com/pfsense/en/latest/vpn/openvpn/dco.html

              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
              Upvote ๐Ÿ‘ helpful posts!

              K 1 Reply Last reply Reply Quote 0
              • K
                khodorb @SteveITS
                last edited by

                @steveits
                CPU Usage is normal between 5 to 20 %

                i reviewed this doc but i haven't applied any changes beside enabling hardware crypto and set it to AES-NI + BSD Crypto
                to be honest i am still getting the same speed whern doing a speedtest,
                would you be able to find any misconfiguration in my settings above,

                i am planning to upgrade soon and hope that helps too

                S 1 Reply Last reply Reply Quote 0
                • S
                  SteveITS Galactic Empire @khodorb
                  last edited by

                  @khodorb When you say 1 Gbps WAN, is that symmetrical? Both up and down? The limit would be the slowest speed at either end of the VPN.

                  Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                  When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                  Upvote ๐Ÿ‘ helpful posts!

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    khodorb @SteveITS
                    last edited by

                    @steveits yeah it is symmetric , i have tested that on the lan network,

                    also i have tested that on 3 end users :

                    User 1 had 500Mb downlad and 30upload

                    he conducted 2 tests while connected to VPN : first test on wifi home modem he got 29/17
                    second test using lan connection on him home modem he got 80/20

                    second users was testing VPN on lan , he got 60/20

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      Jarhead @khodorb
                      last edited by Jarhead

                      @khodorb You only mention the 1G on your side.
                      What connection speed do they have at home?

                      disregard, noticed the 500/30. Thought that was his test speeds.

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        khodorb @Jarhead
                        last edited by

                        @jarhead
                        This is the speed test when i run it from the datacentre on lan where the pfsense is installed
                        a441cbfc-cf11-4751-9098-60762a18ecfd-image.png

                        this is the test speed from my home internet using the lan connection to the modem
                        53cdb61c-6442-4dfe-af3d-3d4046783d54-image.png

                        this is the VPN speed test while connected to pfsense using lan connection in my home modem

                        00f3317f-e198-4570-8772-5b53c18e27c6-image.png

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

                          Hate to say it..you will most likely not get much faster.
                          I posted my test results a year or so ago here where I was testing openVPN in lab where my computer was on the WAN interface in the lab with full 1Gb.
                          I could never get it above 30-50Mb. Even had Netgate support go through the config.
                          This was also running Pfsense on a Dell R610 with 144Gb ram.

                          Pfsense is just slow.

                          Actually doing another lab test this week to use Wireguard instead. If you figure out the issue with OpenVpn let me know as I am curious. I think it is also just Windows enviroments.

                          K 1 Reply Last reply Reply Quote 0
                          • K
                            khodorb @spyder0552
                            last edited by

                            @spyder0552

                            Thanks, I will be going through some debugging and might go for a new netgate appliance 6100 Max with new pfsense+ version, i will update the thread once i have some updates

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