Can I update the haproxy binary on my own?

  • 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?

  • yes. Install freebsd package on your pfsense.

    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.

  • 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.

  • 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?

  • 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


  • 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

    Thanks a lot! Much appreciated.

  • Did the version changed in gui?

  • 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.

  • What changes do you need in gui?

    Version 1.4 is much better then 1.3?

  • 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.

  • 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 install

    During make install you can see installed files.

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


    there is a 1.5 devel verison in pfsenses packages dir.


  • 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.

Log in to reply