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

    NEW Package: freeRADIUS 2.x

    Scheduled Pinned Locked Moved pfSense Packages
    628 Posts 80 Posters 749.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.
    • N
      Nachtfalke
      last edited by

      @sander
      Yes, of course, you are welcome! :-)
      freeRADIUS offers so much options and I really do not know all of them or used them. So it is really great if someone could help and test things :-)

      @marcelloc
      I tested the package you compiled on i386
      It is working as well as the amd64 but a little bit better ;o)

      freeradius-2.1.12.tbz is now installing the dependencies "postgresql" and "mysql-client" on its own.
      I then copied the missing files from your "ldd" folder to /usr/local/lib/ and installed the "openldap-client" which automatically installed the "cyrus-sasl" dependency.

      The tests I did above with amd64 (mysql, postgresql, ldap) had the same (positiv) result as on i386. :D

      Ok, now I will try to find out how to use a wireless-AP with WPA/WPA2-Enterprise and PEAP and EAP-MSCHAPv2 on a Windows XP client and why it isn't working as expected by gettons.

      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke
        last edited by

        Updates pkg v1.4.3

        • changed: service name and description (Services)

        • fixed: EAP-PEAP - there were problems when starting "soh" server. (eap)

        • Added: ability to change if MS Statement of Health should be enabled in EAP-PEAP or not. (eap)

        @gettons
        I tried with an Windows XP Client and an D-Link DIR-300 with DD-WRT firmware. Enabled WPA2 Enterprise on AP, added the AP-IP as NAS/Client on freeRADIUS server with same "shared secret".
        Added a user "test" with password "test".

        I had to import the "ca.der" from freeradius on the Windows XP Client and import it there and choose it in the network connections. This is how it is described here (german how-to) with many pictures:
        http://www.administrator.de/index.php?content=142241

        For my Windows XP Client the authentication is working with PEAP and MSCHAPv2.
        The first time I connect I have to enter my user credentials (a windows window pops up where I enter username and password) - then I got connected. I got output in syslog if it works or not.

        When I connect the second time then I do NOT need to enter username and password again.

        Hope this will solve your problem. Feedback appreciated :-)

        1 Reply Last reply Reply Quote 0
        • N
          Nachtfalke
          last edited by

          @gettons

          I did some more tests and there are two possibilities.
          If you disable "Check Server certificates" (see attachment) than you can connect just with the username. Then you do not need to import anything fromm freeradius server on the client.

          The other possibility is that you ENABLE "Check Server Certificates" (see other attachment) and then you will be promted to accept the CA or not. If you accept then this cert will be added to your cert store. In Windows XP you can check this from here:

          Start -> run -> certmgr.msc
          There you find - I think it is the second from top (in german: "Stammzertifizierungsstelle"). There you should find the CA you accepted.

          PEAP.JPG
          PEAP.JPG_thumb
          ![PEAP check cert.JPG](/public/imported_attachments/1/PEAP check cert.JPG)
          ![PEAP check cert.JPG_thumb](/public/imported_attachments/1/PEAP check cert.JPG_thumb)

          1 Reply Last reply Reply Quote 0
          • G
            gettons
            last edited by

            thank you very much Nachtfalke.
            I will try these settings later as I am not home now.

            But just to clarify: my problem was with ubuntu and android, I have not tested with win 7 yet. But I will surely do.

            Thanks again, will get back to you asap

            1 Reply Last reply Reply Quote 0
            • N
              Nachtfalke
              last edited by

              @gettons:

              thank you very much Nachtfalke.
              I will try these settings later as I am not home now.

              But just to clarify: my problem was with ubuntu and android, I have not tested with win 7 yet. But I will surely do.

              Thanks again, will get back to you asap

              Hi,

              I think this was not OS dependent but I got some problems with the old pkg v1.4.2, too. I tried with Windows XP and WLAN because this is the only equipment I can use at the moment (I am on vacation).

              Not sure why, but my patch was merged some hours ago but there is still the old pkg version available. So you will have enough time :D

              1 Reply Last reply Reply Quote 0
              • G
                gettons
                last edited by

                @Nachtfalke:

                @gettons
                Not sure if this is an problem of freeradius or a configuration "problem" of your AP or freeradius-EAP setup.
                The package offers the default settings which are in the eap.conf file. I am unsure what you have to change as I need to read the docs and wikis on freeradius first.

                You could try with "copy reply to tunnel".

                You further did not post the output of what "radiusd -X" is showing. radius.log and system.log do not offer all "errors".

                @Nachfalke
                This is the output of radiusd -X once I try to connect with my android mobile phone.
                Again, it might be useful for you to know. With the previous version of your package it used to work fine. What I did was just to uninstall the package and install it again. I also rebooted in between just to be double sure.

                The log is http://pastebin.com/XAsPjDSD It;s quite long and I didn't want to mess the thread

                1 Reply Last reply Reply Quote 0
                • N
                  Nachtfalke
                  last edited by

                  @gettons:

                  @Nachtfalke:

                  @gettons
                  Not sure if this is an problem of freeradius or a configuration "problem" of your AP or freeradius-EAP setup.
                  The package offers the default settings which are in the eap.conf file. I am unsure what you have to change as I need to read the docs and wikis on freeradius first.

                  You could try with "copy reply to tunnel".

                  You further did not post the output of what "radiusd -X" is showing. radius.log and system.log do not offer all "errors".

                  @Nachfalke
                  This is the output of radiusd -X once I try to connect with my android mobile phone.
                  Again, it might be useful for you to know. With the previous version of your package it used to work fine. What I did was just to uninstall the package and install it again. I also rebooted in between just to be double sure.

                  The log is http://pastebin.com/XAsPjDSD It;s quite long and I didn't want to mess the thread

                  Hi,
                  the reason why I asked you between which version the error comes up was to find out what I changed and what could cause the problem.
                  I think I could reproduce your problem with my hardware and it is pointing to the "soh" server.

                  Lines ~470

                  [peap] server soh {
                  No such virtual server "soh"
                  Invalid user: [gettons/<no user-password="" attribute="">] (from client wifi-ap port 0 via TLS tunnel)
                  [peap] } # server soh
                  [peap] Got SoH reply
                  [peap] SoH was rejected
                  [peap] FAILURE</no>
                  

                  You could try the following until the pfsense server offers the new version:

                  • SSH to your pfsense
                  • Kill radiusd service
                  • edit /usr/local/etc/raddb/eap.conf
                  • scroll down where you find these two lines:
                  
                  soh = yes
                  soh_virtual_server = "soh-server"
                  

                  Delete these lines, save the file and restart freeradius FROM CONSOLE

                  /usr/local/sbin/etc/rc.d/radiusd onestart
                  

                  Then it should work.

                  1 Reply Last reply Reply Quote 0
                  • G
                    gettons
                    last edited by

                    It does work like a charm now!
                    Thanks.

                    So, is this small modification something you will be including in the next freeradius package or not ? Or something which has to stay there for other purposes?

                    1 Reply Last reply Reply Quote 0
                    • N
                      Nachtfalke
                      last edited by

                      @gettons:

                      It does work like a charm now!
                      Thanks.

                      So, is this small modification something you will be including in the next freeradius package or not ? Or something which has to stay there for other purposes?

                      As you could read in my last pkg Updates post here on the forum ;o)
                      I have included that. You now can choose if you want to enable or disable the SoH server and - thats the main part - I correctet the servername from "soh" which was wrong to "soh-server" which is correct.

                      So it shpuld work with and without but in future you will have the decision ;-)

                      1 Reply Last reply Reply Quote 0
                      • G
                        gettons
                        last edited by

                        This is great stuff!

                        1 Reply Last reply Reply Quote 0
                        • N
                          Nachtfalke
                          last edited by

                          Updates pkg v1.4.3:

                          • Added: GUI to configure FreeRADIUS2 with LDAP. This will only work if we can use the new binaries.

                          • Updated: FreeRADIUS 2.x package documentation on http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package

                          1 Reply Last reply Reply Quote 0
                          • G
                            gettons
                            last edited by

                            Nice one!
                            One more question for you if you don't mind: are the settings for freeradius2 package kept in xml files within the OS?
                            cause I noticed if you reinstall the package after you removed it does keep old settings. Is there a quick way to purge the config?

                            1 Reply Last reply Reply Quote 0
                            • N
                              Nachtfalke
                              last edited by

                              @gettons:

                              Nice one!
                              One more question for you if you don't mind: are the settings for freeradius2 package kept in xml files within the OS?
                              cause I noticed if you reinstall the package after you removed it does keep old settings. Is there a quick way to purge the config?

                              Yes, all settings, users, clients are saved in the config. The only thing which is NOT stored there are the CA and certs which you created with the freeradius cert-manager. If you use the pfsense cert-manager then these are saved in the config, too.

                              To cleanup the config from old freeradius entries there are two ways:
                              1.) Diagnostics -> Backup/Restore -> Backup the config.xml and then delete the freeradius2 entries and restore the config. A reboot is needed.
                              2.) SSH to your pfsense and edit /config/config.xml and delete the freeradius2 entries. A reboot is needed.

                              1 Reply Last reply Reply Quote 0
                              • G
                                gettons
                                last edited by

                                @Nachtfalke:

                                @gettons:

                                @Nachtfalke:

                                @gettons
                                Not sure if this is an problem of freeradius or a configuration "problem" of your AP or freeradius-EAP setup.
                                The package offers the default settings which are in the eap.conf file. I am unsure what you have to change as I need to read the docs and wikis on freeradius first.

                                You could try with "copy reply to tunnel".

                                You further did not post the output of what "radiusd -X" is showing. radius.log and system.log do not offer all "errors".

                                @Nachfalke
                                This is the output of radiusd -X once I try to connect with my android mobile phone.
                                Again, it might be useful for you to know. With the previous version of your package it used to work fine. What I did was just to uninstall the package and install it again. I also rebooted in between just to be double sure.

                                The log is http://pastebin.com/XAsPjDSD It;s quite long and I didn't want to mess the thread

                                Hi,
                                the reason why I asked you between which version the error comes up was to find out what I changed and what could cause the problem.
                                I think I could reproduce your problem with my hardware and it is pointing to the "soh" server.

                                Lines ~470

                                [peap] server soh {
                                No such virtual server "soh"
                                Invalid user: [gettons/<no user-password="" attribute="">] (from client wifi-ap port 0 via TLS tunnel)
                                [peap] } # server soh
                                [peap] Got SoH reply
                                [peap] SoH was rejected
                                [peap] FAILURE</no>
                                

                                You could try the following until the pfsense server offers the new version:

                                • SSH to your pfsense
                                • Kill radiusd service
                                • edit /usr/local/etc/raddb/eap.conf
                                • scroll down where you find these two lines:
                                
                                soh = yes
                                soh_virtual_server = "soh-server"
                                

                                Delete these lines, save the file and restart freeradius FROM CONSOLE

                                /usr/local/sbin/etc/rc.d/radiusd onestart
                                

                                Then it should work.

                                Although It worked, after a reboot the changes I made in /usr/local/etc/raddb/eap.conf get reverted.

                                1 Reply Last reply Reply Quote 0
                                • N
                                  Nachtfalke
                                  last edited by

                                  That is the behaviour of files which are configured by GUI. They will be overwritten in many situations.
                                  You have to wait until the freeradius pkg 1.4.3 or higher is available. There is nothing I can do now - you could ask the pfsense developers why the repo isn't syncing.

                                  1 Reply Last reply Reply Quote 0
                                  • N
                                    Nachtfalke
                                    last edited by

                                    Updates pkg v1.4.4:

                                    • Added: LDAP GUI -> We need to wait until we can use the freeradius2 package compiled with the missing dependencies and modules (rlm_ldap) but the GUI is working

                                    Updates pkg v1.4.5:

                                    • Added: Ability to do use first 802.1X auth and if this fails check the Access-Request against a plain mac auth file (authorized_macs). This will help us if we use a NAS which does not support converting the mac address into a "username/password"-802.1X like Access-Request.

                                    • Added: Plain MAC Auth entries could now be synced with XMLRPC

                                    • TO-DO: Check/Test how we could place check and reply-items the beste way in authorized_macs.

                                    • Updated: Documentation on docs.pfsense.org

                                    1 Reply Last reply Reply Quote 0
                                    • Z
                                      zlyzwy
                                      last edited by

                                      Hi,

                                      Very useful package!!! Thanks a lot!
                                      My question is:

                                      1. Does this package support Mysql now? Actually I can see the option in the PF Menu but it seems not working.

                                      2. I would like to create a Hotspot by using this package + Captive Portal + MySQL + DDWRT Router. (eg:http://www.wiwiz.com/)
                                            It would be great appreciated if there is any references for setting these matters?

                                      Sorry for the poor English.
                                      Thanks again for any reply!

                                      1 Reply Last reply Reply Quote 0
                                      • N
                                        Nachtfalke
                                        last edited by

                                        @zlyzwy:

                                        Hi,

                                        Very useful package!!! Thanks a lot!
                                        My question is:

                                        1. Does this package support Mysql now? Actually I can see the option in the PF Menu but it seems not working.

                                        2. I would like to create a Hotspot by using this package + Captive Portal + MySQL + DDWRT Router. (eg:http://www.wiwiz.com/)
                                              It would be great appreciated if there is any references for setting these matters?

                                        Sorry for the poor English.
                                        Thanks again for any reply!

                                        Hi,

                                        1. LDAP and SQL isn't supported at the moment. The GUI is ready but we first have to compile freeradius with MySQL, PostgreSQL and LDAP support. This takes some time but it will be supported in the - hopefully - near future.

                                        2. I didn't use that but as far as I know the CaptivePortal in pfsense supports connecting to a RADIUS. An if this package has MySQL support this should be possible for you to realize.

                                        1 Reply Last reply Reply Quote 0
                                        • Z
                                          zlyzwy
                                          last edited by

                                          @Nachtfalke:

                                          @zlyzwy:

                                          Hi,

                                          Very useful package!!! Thanks a lot!
                                          My question is:

                                          1. Does this package support Mysql now? Actually I can see the option in the PF Menu but it seems not working.

                                          2. I would like to create a Hotspot by using this package + Captive Portal + MySQL + DDWRT Router. (eg:http://www.wiwiz.com/)
                                                It would be great appreciated if there is any references for setting these matters?

                                          Sorry for the poor English.
                                          Thanks again for any reply!

                                          Hi,

                                          1. LDAP and SQL isn't supported at the moment. The GUI is ready but we first have to compile freeradius with MySQL, PostgreSQL and LDAP support. This takes some time but it will be supported in the - hopefully - near future.

                                          2. I didn't use that but as far as I know the CaptivePortal in pfsense supports connecting to a RADIUS. An if this package has MySQL support this should be possible for you to realize.

                                          Thanks for the quick reply!

                                          Looking forward to the update version:)

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

                                            zlyzwy,

                                            If you know how to handle with packages at console and want to help on testing these new features, follow  Nachtfalke posts on how to update to test version

                                            http://forum.pfsense.org/index.php/topic,43675.msg232220.html#msg232220

                                            http://forum.pfsense.org/index.php/topic,43675.msg232312.html#msg232312

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

                                            Help a community developer! ;D

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