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

NEW Package: freeRADIUS 2.x

Scheduled Pinned Locked Moved
pfSense Packages
80
628
691.8k
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.
  • Q
    qbik
    last edited by Feb 14, 2012, 5:36 PM

    Hi,
    I am glad there is finally a good package for this. I had done this before by custom package building on FreeBSD with VMWare and then installing on PFsense, no GUI. I am using it on a hotel right now with 1000 rooms. I would like to contribute and share my work to contribute to a robust solution with MySQL integrated. There are a couple of things that I've came across and want to fix are the following:
    -Implement Freeradius with sqlippool or better manage DHCP leases
    -If user is authenticated for 1 day and server reboots, he has to authenticate again ( I want accounting to continue where it left off)
    -Better Voucher/User GUI and printing options.

    I'l be glad to share my work and help where I can.

    Regards

    1 Reply Last reply Reply Quote 0
    • N
      Nachtfalke
      last edited by Feb 14, 2012, 7:22 PM

      @qbik:

      Hi,
      I am glad there is finally a good package for this. I had done this before by custom package building on FreeBSD with VMWare and then installing on PFsense, no GUI. I am using it on a hotel right now with 1000 rooms. I would like to contribute and share my work to contribute to a robust solution with MySQL integrated.

      You are welcome!

      @qbik:

      There are a couple of things that I've came across and want to fix are the following:
      -Implement Freeradius with sqlippool or better manage DHCP leases

      I do not have much experience with *SQL databases. The basic support to connect to an *SQL database is ready and working. But you are right. I didn't take a look at sqlippool and of course if there will be GUI support for creating a custom SQL query would be really nice.
      I thought of to hardcode the main part of a counter (daily, weekly,time, data) in the sqlcounter.conf and from GUI everybody can add the queries he likes.

      @qbik:

      -If user is authenticated for 1 day and server reboots, he has to authenticate again ( I want accounting to continue where it left off)

      I don't think there is any way around - if freeradius or the NAS reboots the user has to reauthenticate. If the NAS sends "interim updates" or "start/stop" accounting updates then there will be no big accounting loss when server reboots/crashes. To get high availability you need to use more than one RADIUS server and more than one database (freeradius2 package can do failover/loadbalancing for LDAP or *SQL).
      So I would be interested in what we can do on this point.

      @qbik:

      -Better Voucher/User GUI and printing options.

      You have to explain that more in detail.

      @qbik:

      I'l be glad to share my work and help where I can.

      Regards

      As I said above - if you have any SQL ideas or something developed (sqlcounter, sqlippool, DOCUMENTATION :D ) then I really would appreciate to implement your work! :)

      1 Reply Last reply Reply Quote 0
      • Z
        zlyzwy
        last edited by Feb 15, 2012, 3:15 AM

        When I upgrade to latest version, it gives me the following error..

        Beginning package installation for freeradius2…
        Downloading package configuration file... done.
        Saving updated package information... done.
        Downloading freeradius2 and its dependencies...
        Checking for package installation...
        Downloading http://e-sac.siteseguro.ws/packages/8/All/freeradius-2.1.12.tbz ...  could not download from there or http://ftp2.FreeBSD.org/pub/FreeBSD/ports/i386/packages-8.1-release/All/freeradius-2.1.12.tbz.
        of freeradius-2.1.12 failed!

        Installation aborted.Backing up libraries...
        Removing package...
        Starting package deletion for freeradius-2.1.12...done.
        Starting package deletion for openldap-sasl-client-2.4.26...done.
        Removing freeradius2 components...
        Tabs items... done.
        Menu items... done.
        Services... done.
        Loading package instructions...
        Include file freeradius.inc could not be found for inclusion.
        Deinstall commands...
        Not executing custom deinstall hook because an include is missing.
        Removing package instructions...done.
        Auxiliary files... done.
        Package XML... done.
        Configuration... done.
        Cleaning up... Failed to install package.

        Installation halted.

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by Feb 15, 2012, 3:57 AM

          The server is up and the file is there.

          Are you blocking traffic to brazil on your pfsense?

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

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • Z
            zlyzwy
            last edited by Feb 15, 2012, 5:42 AM

            @marcelloc:

            The server is up and the file is there.

            Are you blocking traffic to brazil on your pfsense?

            The problem may come from my side. I am using a dynamic PPPoE connection, maybe my ip is blocked by your server..:((

            Anyway, I restart the PF and the problem is gone.

            1 Reply Last reply Reply Quote 0
            • N
              Nachtfalke
              last edited by Feb 15, 2012, 7:13 PM

              I asked on the freeradius mailing lists about how to create a "traffic volume counter" because I am at a point where I do not know if it is really possible or just possible with an external database.

              For those who want to participate or just want to follow this topic I post the link:
              https://lists.freeradius.org/pipermail/freeradius-users/2012-February/msg00260.html

              Unfortunately I do not have any other NAS that can do accounting so I am not able to check if the counter isn't working in genral or just not with CP or whatelse. The datasheet opf my 600€ CISCO SG300-28 says it can do accounting but the CISCO support told me that it just will support it in the middle of the year or later firmware…

              I feel a little bit helpless at the moment ... will take some time and see what will happen on this topic.

              1 Reply Last reply Reply Quote 0
              • P
                pszafer
                last edited by Feb 16, 2012, 11:45 AM

                @zobber:

                @pszafer:

                okay, I'm finally happier :)
                I've got working freeradius + winbindd + ntlm_auth with Active Directory with MSCHAP v2

                now I will remove from samba package as much as I can and then I would like to share my work with you.
                I hope you will guide me if I should give you files or somehow make package etc.

                hello pszafer.

                i'm trying to set up freeradius with ldap and mschap v2. with pap it is no problem, but i would never send plain passwords. are you ready to share your work with us?

                hello, I'm tryin' to write some tutorial here, it's still draft, but maybe it could already help you or somebody else:
                https://docs.google.com/document/d/1UDg8Rt5wN_pGoepJyKTlAAnQdJgAsNXSrX3vkQu15DE/edit

                1 Reply Last reply Reply Quote 0
                • W
                  webdawg
                  last edited by Feb 17, 2012, 4:20 AM Feb 17, 2012, 4:17 AM

                  I installed the package.

                  user, interface, client setup….

                  Cannot get it to start.

                  Go to services, try and start it, nothing, no error.

                  1 Reply Last reply Reply Quote 0
                  • N
                    Nachtfalke
                    last edited by Feb 17, 2012, 8:24 AM

                    @webdawg:

                    I installed the package.

                    user, interface, client setup….

                    Cannot get it to start.

                    Go to services, try and start it, nothing, no error.

                    Is the service running or not ? (green or red arrow?)

                    The only thing after a fresh installation of freeradius2 you have to setup is the Interface.
                    No other things needed first to make the service start. Delete all interfaces and just create a new one with:

                    IP: *
                    Mode: Authentication
                    Port: 1812

                    1 Reply Last reply Reply Quote 0
                    • W
                      webdawg
                      last edited by Feb 18, 2012, 2:37 AM

                      Did a reinstall.

                      The reinstall pulled the config that I already had.  (The uninstall did not remove the config. )

                      Looks like it is running.  Post more in a bit.

                      1 Reply Last reply Reply Quote 0
                      • W
                        webdawg
                        last edited by Feb 18, 2012, 2:49 AM

                        I am using it to secure a wpa2 network.  Any guides or docs recommended to read?

                        1 Reply Last reply Reply Quote 0
                        • W
                          webdawg
                          last edited by Feb 18, 2012, 6:28 AM

                          Any guides on cert creation for eap-tls.

                          I checked:

                          Choose if you would like to create a client.p12 to export it to a windows client. You need this file if you use EAP-TLS.

                          Where do I get the cert it created?

                          I am using pfsense default cert manager.  Not the cert manager that freeradius uses.

                          1 Reply Last reply Reply Quote 0
                          • N
                            Nachtfalke
                            last edited by Feb 18, 2012, 12:10 PM

                            @webdawg:

                            Any guides on cert creation for eap-tls.

                            I checked:

                            Choose if you would like to create a client.p12 to export it to a windows client. You need this file if you use EAP-TLS.

                            Where do I get the cert it created?

                            I am using pfsense default cert manager.  Not the cert manager that freeradius uses.

                            Here all is explained:
                            http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package#EAP-TLS

                            PS: In pfsense 2.1 there will be a possibility to download a .p12 file for System -> CertManager
                            Jimp added this some days ago. If you gitsync your system you will have this ability.

                            1 Reply Last reply Reply Quote 0
                            • W
                              webdawg
                              last edited by Feb 18, 2012, 4:11 PM

                              How stable is the gitsync?

                              Another thing that I was concerned about…though unrelated....

                              pfsense digitally signs its packages right?

                              The git is signed too?

                              Thanks for all the help.

                              Web

                              1 Reply Last reply Reply Quote 0
                              • N
                                Nachtfalke
                                last edited by Feb 18, 2012, 9:19 PM Feb 18, 2012, 8:26 PM

                                Updates pkg v1.6.5:

                                • Replaced: old traffic counter which didn't work against two shell scripts (authentication + accounting) which now work on interim-updates and start/stop updates. (start/stop istn'working correct BECAUSE CP doesn't reset the octets between every update. Interim-Update does this)

                                • Changed: units in GUI from bits, bytes and seconds to high and better readable values

                                • Changed: placing all scripts (traffic counter + motp in central folder under /usr/local/etc/raddb/scripts/)

                                • Changed: placing files and databases for time-/traffic-counter in /var/log/radacct/ This makes it possible to use them on embedded systems because of read-write access to this folders.

                                • Updated pfsense docs

                                Known bugs:

                                • When using "stop/start accounting on CP then "Amount of Time/Amount of Traffic" isn't working correctly.
                                  http://redmine.pfsense.org/issues/2164

                                • When using CP + RADIUS + Vouchers and "reauthenticate every minute" is enabled then CP sends the voucher as username to RADIUS. This causes RADIUS to disconnect the "user/voucher" because of an unknown/wrong "username".
                                  http://redmine.pfsense.org/issues/2155

                                • When stop/start accounting on CP is enabled than the syslog shows many "wrong order" or "Login found bot no logout detected". This seems to not affect the usage of RADIUS but it is not 100% correct.
                                  http://redmine.pfsense.org/issues/2143

                                ============================================

                                Don't know how stable it is.
                                http://doc.pfsense.org/index.php/Updating_pfSense_code_between_snapshots

                                This command will show you :D

                                pfSsh.php playback gitsync RELENG_2_0
                                
                                1 Reply Last reply Reply Quote 0
                                • P
                                  pszafer
                                  last edited by Feb 19, 2012, 1:08 PM

                                  @Nachtfalke
                                  I just would like to say that if you want copy content of my gdoc to freeradius/pfsense wiki, enjoy and do it ;)

                                  Someday I wish do delete as much as possible from samba package and leave just winbindd, ntlm_auth and related necessary packages, just don't know when I'll have enough time to do it ;)

                                  1 Reply Last reply Reply Quote 0
                                  • N
                                    Nachtfalke
                                    last edited by Feb 19, 2012, 2:11 PM

                                    @pszafer:

                                    @Nachtfalke
                                    I just would like to say that if you want copy content of my gdoc to freeradius/pfsense wiki, enjoy and do it ;)

                                    Thank you for that! Some parts of your tutorial can be done from GUI. Others need additional configuration. I added the URL to the docs. :-)

                                    @pszafer:

                                    Someday I wish do delete as much as possible from samba package and leave just winbindd, ntlm_auth and related necessary packages, just don't know when I'll have enough time to do it ;)

                                    If you've done it successfully you let me know.  ;) Perhaps future versions of freeradius do have (better) support for that or I will add an option in GUI to add samba package as optional setting.

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      webdawg
                                      last edited by Feb 19, 2012, 10:37 PM

                                      Thanks for this package.

                                      I would like to disable the other types of EAP.  How should I go about doing this?  Right now I am using EAP-TLS and that is all I want to use.

                                      What is the most secure WPA2 auth?  I am thinking either EAP-TLS or EAP-TTLS.  Am I right?

                                      Like I said.  Thanks for the package.

                                      1 Reply Last reply Reply Quote 0
                                      • N
                                        Nachtfalke
                                        last edited by Feb 19, 2012, 10:44 PM

                                        @webdawg:

                                        Thanks for this package.

                                        I would like to disable the other types of EAP.  How should I go about doing this?  Right now I am using EAP-TLS and that is all I want to use.

                                        What is the most secure WPA2 auth?  I am thinking either EAP-TLS or EAP-TTLS.  Am I right?

                                        Like I said.  Thanks for the package.

                                        If you disable "Weak EAP types" then you disable MD5, GTC and LEAP.
                                        Then you there should only be three strong types available:

                                        • EAP-TLS which is very secure and the strongest encryption

                                        • EAP-TTLS

                                        • Protected EAP (PEAP)

                                        EAP-TTLS and PEAP could be clasified as secure, too, but less than EAP-TLS.

                                        Because all the three types are secure types and so I didn't implement any option in the GUI to disable them.
                                        If you would like to disable this just go to

                                        /usr/local/etc/raddb/eap.conf
                                        

                                        and delete/comment the TTLS and PEAP blocks and restart freeradius.

                                        1 Reply Last reply Reply Quote 0
                                        • W
                                          webdawg
                                          last edited by Feb 20, 2012, 1:25 AM

                                          Thanks.  I just wanted to know if that would work.

                                          1 Reply Last reply Reply Quote 0
                                          • N
                                            Nachtfalke
                                            last edited by Feb 20, 2012, 7:26 AM

                                            @webdawg:

                                            Thanks.  I just wanted to know if that would work.

                                            It will unless you do not change anything in FreeRADIUS => EAP. A click on "Save" will overwrite the complete file.

                                            1 Reply Last reply Reply Quote 0
                                            • Q
                                              qbik
                                              last edited by Feb 20, 2012, 4:13 PM Feb 20, 2012, 3:40 PM

                                              What I meant for Vouchers packages is the following:
                                              -Ability to create plans (by time or by traffic) and able to assign users to it and print those vouchers (easy part) also modify the GUI
                                              -The problem comes when we create 2 weeks plans for example, and our DHCP lease is only a day, if the user is off for a day and someone else gets the ip he had before, he will be asked to authenticate again. Now if he has used 5 days of plan, would he now have 5 days left or since he has been authenticated he will have 2 weeks again. this is why I want to implement sqlippool to better mange the leases and prevent this from happening.

                                              When I have a chance I will post screen shots of what I have and see where we can go from there. Also, I am trying to build an Asterisk package, could you point me on some doc you used?

                                              Regards

                                              @Nachtfalke:

                                              @qbik:

                                              Hi,
                                              I am glad there is finally a good package for this. I had done this before by custom package building on FreeBSD with VMWare and then installing on PFsense, no GUI. I am using it on a hotel right now with 1000 rooms. I would like to contribute and share my work to contribute to a robust solution with MySQL integrated.

                                              You are welcome!

                                              @qbik:

                                              There are a couple of things that I've came across and want to fix are the following:
                                              -Implement Freeradius with sqlippool or better manage DHCP leases

                                              I do not have much experience with *SQL databases. The basic support to connect to an *SQL database is ready and working. But you are right. I didn't take a look at sqlippool and of course if there will be GUI support for creating a custom SQL query would be really nice.
                                              I thought of to hardcode the main part of a counter (daily, weekly,time, data) in the sqlcounter.conf and from GUI everybody can add the queries he likes.

                                              @qbik:

                                              -If user is authenticated for 1 day and server reboots, he has to authenticate again ( I want accounting to continue where it left off)

                                              I don't think there is any way around - if freeradius or the NAS reboots the user has to reauthenticate. If the NAS sends "interim updates" or "start/stop" accounting updates then there will be no big accounting loss when server reboots/crashes. To get high availability you need to use more than one RADIUS server and more than one database (freeradius2 package can do failover/loadbalancing for LDAP or *SQL).
                                              So I would be interested in what we can do on this point.

                                              @qbik:

                                              -Better Voucher/User GUI and printing options.

                                              You have to explain that more in detail.

                                              @qbik:

                                              I'l be glad to share my work and help where I can.

                                              Regards

                                              As I said above - if you have any SQL ideas or something developed (sqlcounter, sqlippool, DOCUMENTATION :D ) then I really would appreciate to implement your work! :)

                                              1 Reply Last reply Reply Quote 0
                                              • N
                                                Nachtfalke
                                                last edited by Feb 20, 2012, 5:26 PM

                                                @qbik:

                                                What I meant for Vouchers packages is the following:
                                                -Ability to create plans (by time or by traffic) and able to assign users to it and print those vouchers (easy part) also modify the GUI
                                                -The problem comes when we create 2 weeks plans for example, and our DHCP lease is only a day, if the user is off for a day and someone else gets the ip he had before, he will be asked to authenticate again. Now if he has used 5 days of plan, would he now have 5 days left or since he has been authenticated he will have 2 weeks again. this is why I want to implement sqlippool to better mange the leases and prevent this from happening.

                                                When I have a chance I will post screen shots of what I have and see where we can go from there. Also, I am trying to build an Asterisk package, could you point me on some doc you used?

                                                Regards

                                                I will wait for your screenshots to better understand what you mean. Further I took a look into sqlippool and the default config seems to work as far as I can see that. You only have to import the sql.table into your database and put in some content.

                                                A better way would be to to make CaptivePortal able to understand "Framed-IP-Address" and "Framed-IP-Netmask" and "Framed-Route" attributes. This would allow us to always assign the sam IP address to a user when authentication on CP against freeradius. So no worry about any lease times on DHCP. As far as I know the PPTP implementation on pfsense can do this.

                                                Abou your two plans - time or traffic:

                                                • Vouchers (time): A 10 day voucher will allow the user to use the internet for 10 days after first login. Fine!

                                                • Amount of Time (freeradius): An amount of 1440min (1 day) will allow the user to use this amount when he likes. 120min on the first day. 1000min on the nex day and 320min on the fifth day. This would work like a charm IF CP would reset the "Acct-Session-Time" attribute between every "start/stop" accounting update. ermal wrote a patch which should fix that hopefully in previous versions.

                                                • Amount of time (freeradius): This is working, too, with the new "Amount of time" counter I implemented (without any sql database). When running CP accounting updates in interim-update mode this is working like a charm. If running in "start/stop" accounting THEN CP needs to handle the "Acct-X-Octets" the correct way and reset them between every update. This probably will be fixed in future versions, too. If you want to run this against an *sql database we need to create the correct query. There is no need for a GUI because we can create 4 types (daily, weekly, monthly, forever) and put this into the sqlcounter.conf

                                                Perhaps I misunderstand something but I hope your screenshots will clarify this if I was wrong :-)

                                                1 Reply Last reply Reply Quote 0
                                                • W
                                                  webdawg
                                                  last edited by Feb 22, 2012, 10:30 PM

                                                  It will unless you do not change anything in FreeRADIUS => EAP. A click on "Save" will overwrite the complete file.

                                                  Where does it pull the config from?  What php file would I have to edit?

                                                  1 Reply Last reply Reply Quote 0
                                                  • N
                                                    Nachtfalke
                                                    last edited by Feb 23, 2012, 7:36 AM

                                                    @webdawg:

                                                    It will unless you do not change anything in FreeRADIUS => EAP. A click on "Save" will overwrite the complete file.

                                                    Where does it pull the config from?  What php file would I have to edit?

                                                    File to edit:

                                                    /usr/local/pkg/freeradius.inc
                                                    

                                                    Function to edit:

                                                    function freeradius_eapconf_resync()
                                                    
                                                    1 Reply Last reply Reply Quote 0
                                                    • F
                                                      Fesoj
                                                      last edited by Feb 27, 2012, 10:47 AM

                                                      http://forum.pfsense.org/index.php/topic,46648.0.html

                                                      should have been posted here. mea culpa.

                                                      1 Reply Last reply Reply Quote 0
                                                      • N
                                                        Nachtfalke
                                                        last edited by Feb 27, 2012, 12:13 PM

                                                        @Fesoj:

                                                        http://forum.pfsense.org/index.php/topic,46648.0.html

                                                        should have been posted here. mea culpa.

                                                        Fixed that. Thanks!
                                                        Shouldn't be any big problems with that except when using freeradius-cert-manager

                                                        1 Reply Last reply Reply Quote 0
                                                        • F
                                                          Fesoj
                                                          last edited by Feb 27, 2012, 1:35 PM

                                                          Long startup time of freeradius2 with pfsense 2.0.1

                                                          I have a WLAN system based on pfSense running in a small hotel, where user access is handled by the captive portal of pfSense using freeradius2 for authentication. I am getting some complaints about not being able to get connected to the internet. The captive portal is enabled all the time.

                                                          I can to reproduce this "login" problem in the following situations:

                                                          (1) After booting, when all services are already running, pfSense does not redirect to the login page of the captive portal and the HTML request just times out.
                                                          (2) A few times, after waiting for more than 2 minutes, all of a sudden the login page is shown and subsequently everything works as expected.
                                                          (3) When changing parameters of the freeradius2 configuration (probably freeradius2 is restarting in the background), the login screen doesn't show up again.
                                                          (4) If the captive portal is enabled without using any authentication, the login screen always appears (that's why I think it could be related to freeradius2 and not the captive portal itself).

                                                          Is this a known behavior of freeradius2? In case it just takes a couple of minutes (but why does it take so long?) until the logins work, I can live with that, as regular operation doesn't require frequent restarts or rebooting. Otherwise there might be a problem, at least for my system.

                                                          1 Reply Last reply Reply Quote 0
                                                          • N
                                                            Nachtfalke
                                                            last edited by Feb 27, 2012, 2:23 PM

                                                            @Fesoj:

                                                            Long startup time of freeradius2 with pfsense 2.0.1

                                                            I have a WLAN system based on pfSense running in a small hotel, where user access is handled by the captive portal of pfSense using freeradius2 for authentication. I am getting some complaints about not being able to get connected to the internet. The captive portal is enabled all the time.

                                                            I can to reproduce this "login" problem in the following situations:

                                                            (1) After booting, when all services are already running, pfSense does not redirect to the login page of the captive portal and the HTML request just times out.
                                                            (2) A few times, after waiting for more than 2 minutes, all of a sudden the login page is shown and subsequently everything works as expected.
                                                            (3) When changing parameters of the freeradius2 configuration (probably freeradius2 is restarting in the background), the login screen doesn't show up again.
                                                            (4) If the captive portal is enabled without using any authentication, the login screen always appears (that's why I think it could be related to freeradius2 and not the captive portal itself).

                                                            Is this a known behavior of freeradius2? In case it just takes a couple of minutes (but why does it take so long?) until the logins work, I can live with that, as regular operation doesn't require frequent restarts or rebooting. Otherwise there might be a problem, at least for my system.

                                                            Hi,

                                                            don't know why CP isn't showing up with some delay. I don't think it has something to do with freeradius2 because if you enter a wrong RADIUS IP in CP then it is the same as freeradius not responding. But I am not sure at this.

                                                            There is a longer (repeating) startup time after reinstallation of freeradius2 package because of of the recreation of the config files. There is no way around.
                                                            But you are right - the startup of freeradius2 isn't really fast but I don't know how to speed this up.

                                                            Restart of freeradius is very fast if you:
                                                            (1) add/delete a user
                                                            (2) add/delete a client
                                                            In syslog you can see the output

                                                            Hmmm…if you find some more information when or why this is happening, please let me know. I will think about that "problem".

                                                            1 Reply Last reply Reply Quote 0
                                                            • F
                                                              Fesoj
                                                              last edited by Feb 27, 2012, 2:47 PM

                                                              Nachtfalke,

                                                              I'll keep an eye on the issue. Let me first collect more information to find out under what precise circumstances the login problem occurs. I am pretty sure that it is not the server itself as "radtest <user><user pw="">…" works immediately with a very short response time after the server is marked as running inside the gui. At the same time the client login fails (by not showing the cp login page).

                                                              There could be a delay, but it could also be a random error in the way different components interact. I need to work out a suitable test matrix to nail down the problem (booting, restarting services, login immediately or after some time period). Maybe this will give a clearer picture...</user></user>

                                                              1 Reply Last reply Reply Quote 0
                                                              • F
                                                                Fesoj
                                                                last edited by Feb 29, 2012, 2:07 PM Feb 29, 2012, 1:55 PM

                                                                Long startup time of freeradius2 with pfsense 2.0.1

                                                                Meanwhile I rebooted the pfSense2 box in question serveral times && checked the internet access after waiting at least 5 minutes. I was able to login all the time. Therefore I think that the inability to login is just a startup timing problem.

                                                                I haven't checked the exact details, but if Status->Services reports a running service, it probably just means that a pid file exists, but that doesn't mean that the service is fully available to the outside world. My box uses an Atom 510 CPU and PowerD is enabled. Besides the CP the services Squid, SquidGuard (with a rather large blacklist) and Snort (a few rules) are enabled and especially Snort uses initially a lot of CPU time after the service has started up. The combination of resource hogs and a relatively weak CPU seem to be the cause of the reported problem.

                                                                1 Reply Last reply Reply Quote 0
                                                                • N
                                                                  Nachtfalke
                                                                  last edited by Feb 29, 2012, 2:01 PM

                                                                  @Fesoj:

                                                                  Long startup time of freeradius2 with pfsense 2.0.1

                                                                  Meanwhile I rebooted the pfSense2 box in question serveral times && checked the internet access after waiting at least 5 minutes. I was able to login all the time. Therefore I think that the inability to login is just a startup timing problem.

                                                                  I haven't checked the exact details, but if Status->Services reports a running service, it probably just means that a pid file exists, but that doesn't mean that the service is fully available to the outside world. My box uses an Atom 510 CPU and PowerD is enabled. Besides the CP the services Squid, SquidGard (with a rather large blacklist) and Snort (a few rules) are enabled and especially Snort uses initially a lot of CPU time after the service has started up. The combination of resource hogs and a relatively weak CPU seem to be the cause the reported problem.

                                                                  The startup of freeradius2 is probably not the best way. The problem is, that some files needs to be created/changed and after this freeradius needs a restart. I can not replace the restart of freeradius after some functions because I need the restart when changing something from GUI. I am running freeradius2 package on a xeon processor and that's probably why I do not have problems with weak CPU power ;o)

                                                                  PS: Sometimes the green service arrow isn't representing the actual state. If you have logging enabled you should see how often freeradius is restarting in the syslog.

                                                                  1 Reply Last reply Reply Quote 0
                                                                  • F
                                                                    Fesoj
                                                                    last edited by Feb 29, 2012, 2:34 PM Feb 29, 2012, 2:25 PM

                                                                    Nachtfalke,

                                                                    when you say "…and after this freeradius needs a restart" does that mean the freeradius process gets killed and restarted quite frequently, especially after new users have been added?

                                                                    1 Reply Last reply Reply Quote 0
                                                                    • N
                                                                      Nachtfalke
                                                                      last edited by Feb 29, 2012, 4:05 PM

                                                                      @Fesoj:

                                                                      Nachtfalke,

                                                                      when you say "…and after this freeradius needs a restart" does that mean the freeradius process gets killed and restarted quite frequently, especially after new users have been added?

                                                                      When adding/deleting a users it is absolutly essential to restart the freeradius service. But it is not killed (killall -9) it gets restarted (/usr/local/etc/rc.d/radiusd onerestart)
                                                                      It is further essential if you add a client, and interface, change eap settings, change SQL or LDAP settings. It is simple essential after all changes you are doing. There ist no way around - this is the way freeradius2 works  :)

                                                                      1 Reply Last reply Reply Quote 0
                                                                      • F
                                                                        Fesoj
                                                                        last edited by Feb 29, 2012, 5:45 PM

                                                                        I just looked at radiusd.c and before doing anything else gets done the configuration files are read and this is the only place where read_mainconfig() gets called (and not at later times again triggered by a signal as is done in dnsmasq). The executable is small and there are only a few small local files to read, so restarting shouldn't take a lot of time. Also I do not see any problems when new users are added, only after starting the box (I still need to verify under which conditions restarting of freeradius and/or other services cause the login problems).

                                                                        Tomorrow I'll restart the pfSense box again a few times and try to access the internet within the first 30 seconds after the box has signalled that it is ready. Meanwhile I also have a second box prepared with an older single core AMD CPU, so I can study the behavior of freeradius2 without having the Snort and the Squid stuff installed (just in case these packages slow down the entire system) and then see what happens if I add these packages again.

                                                                        Currently I tend to think that an Atom based system needs probably about 2 minutes until it is usable if many resource hungry packages are installed.

                                                                        1 Reply Last reply Reply Quote 0
                                                                        • F
                                                                          Fesoj
                                                                          last edited by Feb 29, 2012, 7:24 PM

                                                                          Maybe the problem of not being able to log in is not at all related to freeRADIUS2. The PortalAuth log has the following entries whenever I restart the Squid/SquidGuard daemons:

                                                                          Feb 29 20:03:45 squid[15693]: Squid Parent: child process 16200 exited with status 0
                                                                          Feb 29 20:03:48 squid[30849]: Squid Parent: child process 31376 started
                                                                          Feb 29 20:04:03 squid[31376]: The url_rewriter helpers are crashing too rapidly, need help!
                                                                          Feb 29 20:04:03 squid[30849]: Squid Parent: child process 31376 exited due to signal 6
                                                                          Feb 29 20:04:06 squid[30849]: Squid Parent: child process 53720 started

                                                                          I searched for the url_rewriter problem, but I did not find a real solution. This message seems to show up quite frequently, so it could just be a bogus message.

                                                                          1 Reply Last reply Reply Quote 0
                                                                          • F
                                                                            Fesoj
                                                                            last edited by Feb 29, 2012, 7:49 PM

                                                                            Somewhere else somebody suggested to check the db files of SquidGuard when SquidGuard is having problems. I did it and got:

                                                                            [2.0.1-RELEASE][admin@pfsense2.bridge]/var/db/squidGuard/blk_BL_aggressive(40): /usr/local/bin/db42/db_verify domains.db
                                                                            db_verify: Page 1: out-of-order key at entry 2
                                                                            db_verify: Page 1: out-of-order key at entry 4
                                                                            db_verify: Page 1: out-of-order key at entry 6
                                                                            db_verify: Page 1: out-of-order key at entry 10
                                                                            …
                                                                            db_verify: DB->verify: domains.db: DB_VERIFY_BAD: Database verification failed

                                                                            The files urls.db are ok, but all the domains.db files failed. Downloading the black list again and letting the system rebuild the database does not help.

                                                                            Does somebody know whether one needs to worry about this?

                                                                            1 Reply Last reply Reply Quote 0
                                                                            • N
                                                                              Nachtfalke
                                                                              last edited by Feb 29, 2012, 10:02 PM

                                                                              @Fesoj:

                                                                              Somewhere else somebody suggested to check the db files of SquidGuard when SquidGuard is having problems. I did it and got:

                                                                              [2.0.1-RELEASE][admin@pfsense2.bridge]/var/db/squidGuard/blk_BL_aggressive(40): /usr/local/bin/db42/db_verify domains.db
                                                                              db_verify: Page 1: out-of-order key at entry 2
                                                                              db_verify: Page 1: out-of-order key at entry 4
                                                                              db_verify: Page 1: out-of-order key at entry 6
                                                                              db_verify: Page 1: out-of-order key at entry 10
                                                                              …
                                                                              db_verify: DB->verify: domains.db: DB_VERIFY_BAD: Database verification failed

                                                                              The files urls.db are ok, but all the domains.db files failed. Downloading the black list again and letting the system rebuild the database does not help.

                                                                              Does somebody know whether one needs to worry about this?

                                                                              I got the same error when checking another domains.db on my machine. But I don't think this is really related to freeradius2 and this thread  ;)

                                                                              1 Reply Last reply Reply Quote 0
                                                                              • F
                                                                                Fesoj
                                                                                last edited by Feb 29, 2012, 10:46 PM

                                                                                I got the same error when checking another domains.db on my machine. But I don't think this is really related to freeradius2 and this thread

                                                                                In my case I called db_verify on an system with SquidGuard running. This might not be the best idea. Before I'll continue I need to do some mandatory reading on Berkeley DBs. So far I know that db_verify doesn't acquire any locks, but SquidGuard might. In that case the error messages could be bogus.

                                                                                … but now it's time to go home.

                                                                                1 Reply Last reply Reply Quote 0
                                                                                • S
                                                                                  saye
                                                                                  last edited by Mar 1, 2012, 8:13 AM

                                                                                  Hi
                                                                                  I am running 2.0.1 64 bit and this issue of not starting freeradius2 is still exist.

                                                                                  I really would like to know is there any fix of this bug in close future?

                                                                                  I know that the great pfsense team are working on 2.1 release but some features of pfsense may excel brilliant over other UTMs and will broaden its popularity.
                                                                                  Thus as a matter of fact I should say that this feature of pfSense( authenticating via a radius server for large number of users ) and also synchronizing pfsense and authenticating pfsense users via windows radius and then adding some parameters( such as time quota) that windows radius will miss is a great idea that I swear will be one of best features of pfsense.

                                                                                  Cheers to one of the best open source projects of all time.

                                                                                  tanx

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

                                                                                  Looks like your connection to Netgate Forum was lost, please wait while we try to reconnect.