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

    Can I update the haproxy binary on my own?

    Scheduled Pinned Locked Moved pfSense Packages
    12 Posts 2 Posters 3.6k 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.
    • B
      Briantist
      last edited by

      I am trying to use some features of HAProxy that aren't available in version 1.3.22, which is the version included with the pfSense package. I basically just want to replace it with the current 1.4.x version. Is there any way I can do this on my own?

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        yes. Install freebsd package on your pfsense.

        ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.1-release/Latest/

        has haproxy 1.4.8

        Of course, test it before applying on your production server.

        You can also share with us features you need. It can be include in future releases.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • B
          Briantist
          last edited by

          Thanks I'll give this a try. As for features we need, well the HAProxy package has quite a few bugs. I've managed to fix some of them by editing files locally, but I got stuck on the binary. If I can get this project working in my company, we'll likely be buying a support contract and we'll be looking to have some of our changes put back up into the official package. The main features I was looking to use here are the various stick options (stick on, stick match). Thanks again.

          1 Reply Last reply Reply Quote 0
          • B
            Briantist
            last edited by

            marcelloc, I just read over your instructions, and realized I have no idea how to do what you're describing.. could you give me a step-by-step, or just a nudge in the right direction?

            1 Reply Last reply Reply Quote 0
            • marcellocM
              marcelloc
              last edited by

              Go to console (menu option 8) and:

              Get current version:
              pkg_info | grep haproxy

              Delete old package:
              pkg_deletd haproxy_version

              Install new package
              pkg_add -r ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.1-release/Latest/haproxy.tbz

              Test.

              Treinamentos de Elite: http://sys-squad.com

              Help a community developer! ;D

              1 Reply Last reply Reply Quote 0
              • B
                Briantist
                last edited by

                Thanks this was a big help. Some clarifications: I originally installed haproxy via the pfSense package, not the BSD package manager. I only mention this because it didn't appear in pkg_info at all.

                That being said, I did get it installed with this command:

                pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.1-release/Latest/haproxy.tbz

                Thanks a lot! Much appreciated.

                1 Reply Last reply Reply Quote 0
                • marcellocM
                  marcelloc
                  last edited by

                  Did the version changed in gui?

                  Treinamentos de Elite: http://sys-squad.com

                  Help a community developer! ;D

                  1 Reply Last reply Reply Quote 0
                  • B
                    Briantist
                    last edited by

                    In the HAProxy Stats page it did. I don't see a version in the normal GUI screens. But the options I was wanting to use don't have GUI equivalents anyway; there are freeform text boxes where you can enter advanced options that get passed through to the configuration.

                    1 Reply Last reply Reply Quote 0
                    • marcellocM
                      marcelloc
                      last edited by

                      What changes do you need in gui?

                      Version 1.4 is much better then 1.3?

                      Treinamentos de Elite: http://sys-squad.com

                      Help a community developer! ;D

                      1 Reply Last reply Reply Quote 0
                      • B
                        Briantist
                        last edited by

                        Version 1.4 includes stick options that aren't available in 1.3 (stick on, stick table, etc). To keep things simple, those options probably aren't appropriate for the GUI anyway. The only change I made on my own to the GUI was to the size and limit of the port box. It was limited to something ridiculous like 10 characters, even though you can specify a comma separated list of ports. When you're using 5 digit ports that quickly becomes a problem.

                        But actually, I came back to ask if you might know how to use a version later than what's available in the FreeBSD archive. The version I installed with this is 1.4.8. This does have the options I was looking for, but I've discovered that there is a bug somewhere in it that prevents MAPI over RPC from working properly.

                        With an Ubuntu install, I confirmed that this is the case up to at least 1.4.16. On that system, I compiled from source and got 1.4.18 (latest) running where the problem has gone away.

                        Do you know how I could get 1.4.18 on pfSense? I imagine it must be compiled, and that the tools to do so aren't available on pfSense. I'm not that advanced in linux (despite doing this in Ubuntu) and even less so in FreeBSD. Would it even work to compile the binary on a separate system and then copy it over? Any help you could offer is very much appreciated. Thanks again for your input so far.

                        1 Reply Last reply Reply Quote 0
                        • marcellocM
                          marcelloc
                          last edited by

                          The best way to compile packages for pfsense is create a freebsd 8.1 vm and then compile haproxy via ports.

                          In a simple way, after 8.1 install

                          Portsnap fetch
                          Portsnap extract
                          cd /usr/ports/net/haproxy
                          make
                          Make install

                          During make install you can see installed files.

                          Copy it to pfsense
                          Or
                          Make package and then transfer haproxy.tbz

                          BUT

                          there is a 1.5 devel verison in pfsenses packages dir.
                          I386
                          http://files.pfsense.com/packages/8/All/haproxy-devel-1.5.d6.tbz

                          X64
                          http://files.pfsense.com/packages/amd64/8/All/haproxy-devel-1.5.d6.tbz

                          Treinamentos de Elite: http://sys-squad.com

                          Help a community developer! ;D

                          1 Reply Last reply Reply Quote 0
                          • B
                            Briantist
                            last edited by

                            Sounds good I think I'll try to deploy a FreeBSD VM tomorrow. I do actually need a stable version of HAProxy so I don't want to use the 1.5 Devel version. Thanks again you've been really helpful. I'll let you know how it works out.

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