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

How to disable SSLv3 with Haproxy

Scheduled Pinned Locked Moved Cache/Proxy
16 Posts 5 Posters 11.9k 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.
  • P
    PiBa
    last edited by May 26, 2016, 7:36 PM

    Hi Alex,

    As you don't have any certificate configured on haproxy itself, haproxy cannot negotiate ssl, or block certain ciphers/ssl-versions in that process.. Any successful SSLv3 negotiation must be coming from the backend or perhaps the pfSense webgui, but surely not haproxy itself.

    Are you sure both backend servers 192.168.153.1:443 and 192.168.152.1:443 are configured to block sslv3 ?

    p.s. please put config files inside code block with the # icon :) saves some scrolling through the posts..

    Regards,
    PiBa-NL

    1 Reply Last reply Reply Quote 0
    • A
      AlexVallois
      last edited by May 26, 2016, 8:05 PM

      Hi PiBa,

      Thank you very much. You got it ! My other webserver was not properly configured to deny SSLv3.
      Once modified, it works fine.

      However, I do not understand why it has any impact when testing SSLv3 with sslscan on the URL of the other website that was properly configured to deny SSLv3. Would it be possible to let me know ?

      Thank you again for your quick and efficient help.  :)

      Alex

      PS : previous post modified to manage code with # icon :)

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by May 26, 2016, 9:12 PM

        Hi Alex,

        Probably the sslscan your using didn't send the sni extension, or for some reason its using a slightly different name than what you have configured in haproxy.. Ive sometimes seen that for example the port is included also when running on 443 , so the sni match would be done like "req.ssl_sni -i www.abc.com:443".

        As for your sslscan sending sni extension, if you capture the traffic in wireshark and select the 'clienthello' packet. There should be a field ssl.handshake.extensions_server_name that has the sni servername in readable text, maybe its simply not sending it at all?

        Regards,
        PiBa-NL

        1 Reply Last reply Reply Quote 0
        • A
          AlexVallois
          last edited by May 28, 2016, 5:56 AM

          Hi PiBa,

          Thank you. I followed your advice.

          I did a Wireshark on client hello packets. Here is the result of what I observed :

          • for protocols TLSv1 and TLSv1.2, I can see a "Server Name Indication extension" section with a field "Server Name" defined to the correct URL.
          • for SSLv3 protocol, I do not see any entry in SSL section about SNI (see image attached)

          Do you think it explains the behavior observed ? Maybe it explains why sslscan do not check the "right" webserver.

          Thanks again PiBa.

          Alex

          sslscan_sslv3.png
          sslscan_sslv3.png_thumb

          1 Reply Last reply Reply Quote 0
          • P
            PiBa
            last edited by May 28, 2016, 12:33 PM

            Hi Alex,

            It seems like openssl which is used by sslscan doesnt like to send sni when using SSLv3 (SSLv3 is not really defined to support the extension very well..). http://security.stackexchange.com/a/101424 has a little info about that.

            So that indeed would explain why the request would not match the sni hostname acl, and the default backend was used instead.
            I assume that it was indeed the default backend that was not configured to block SSLv3?

            Regards,
            PiBa-NL

            1 Reply Last reply Reply Quote 0
            • A
              AlexVallois
              last edited by May 28, 2016, 7:09 PM

              Hi PiBa,

              Thank you very much for this very clear explanation and the link provided.
              You're right, I do confirm that it was the default backend that was still accepting SSLv3.

              Alex

              1 Reply Last reply Reply Quote 0
              • A
                ACalcutt
                last edited by ACalcutt May 15, 2021, 12:46 PM May 15, 2021, 12:40 PM

                Sorry to bring up an old thread, but there aren't many posts about securing HAProxy in pfsense and disabling tls ssl3/1.0/1.1. I just wanted to add a note how to fix this through the GUI in pfsense 21.02.2, which I didn't see anywhere.

                The global setting mentioned above can be edited in the pfsense gui at
                Services -> HAProxy ->Settings -> Global Advanced pass thru

                To secure the ssl settings, go to https://ssl-config.mozilla.org/ and generate a HAProxy config, then add in to the Global Advanced pass thru settings. My settings looked like this

                # intermediate configuration https://ssl-config.mozilla.org/
                ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
                ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
                ssl-default-bind-options prefer-client-ciphers no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
                
                ssl-default-server-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
                ssl-default-server-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
                ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
                
                J 1 Reply Last reply May 15, 2021, 1:21 PM Reply Quote 1
                • J
                  johnpoz LAYER 8 Global Moderator @ACalcutt
                  last edited by May 15, 2021, 1:21 PM

                  I believe all you really need to do to disable ssl3 is this drop down box

                  here.png

                  Nothing wrong with tweaking the settings how you want with the manual method. But if all your looking to do is disable the old stuff and leave 1.2 and or just even 1.3 You should be able to just use the drop down.

                  One thing will tell you is the testing site
                  https://www.ssllabs.com/ssltest/

                  Will not give you an A+ if only have 1.3 enabled, atleast last time I checked which wasn't all that long ago - there is a thread about getting A+ rating somewhere around here I started.

                  That was driving me a bit nuts for awhile...

                  But yeah if your interested/concerned/worried about your settings the above link to testing will give you loads of info about what ciphers, etc. Do you have CAA set, do you have OSCP stapling, HSTS, etc. etc..

                  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

                  A 1 Reply Last reply May 15, 2021, 2:49 PM Reply Quote 0
                  • A
                    ACalcutt @johnpoz
                    last edited by ACalcutt May 15, 2021, 2:54 PM May 15, 2021, 2:49 PM

                    @johnpoz

                    Where is that tuning setting? When I look in my HAProxy settings I don't have that.
                    tuning.png

                    I know about SSL Labs, which is how I saw tls 1.0 and 1.1 were enabled by default (getting a B rating). With the changes I made it only gets a A, but with intermediate settings I used that was expected.

                    J 1 Reply Last reply May 15, 2021, 3:04 PM Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator @ACalcutt
                      last edited by johnpoz May 15, 2021, 3:07 PM May 15, 2021, 3:04 PM

                      What version of haproxy are you using? I'm on haproxy-devel 0.62_3 package that is 2.2.6 of haproxy.

                      And its listed right there where you looking on mine.

                      tuning.png

                      Little tweaking any you can get A+

                      aplus.png

                      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

                      A 1 Reply Last reply May 15, 2021, 3:20 PM Reply Quote 0
                      • A
                        ACalcutt @johnpoz
                        last edited by ACalcutt May 15, 2021, 3:21 PM May 15, 2021, 3:20 PM

                        @johnpoz

                        I am using the non-devel haproxy 0.61_1, so that is probably the difference. I'd imagine these changes in devel will eventually make it to the non-devel version?

                        It seems like I could tweak this further without upgrading the haproxy package to devel so I'm going to keep it on the stable release for now, but it is good to know it might be easier in the future. I looked all over today and kept getting back to this post.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received