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

    NEW Package: freeRADIUS 2.x

    pfSense Packages
    80
    628
    736.2k
    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

      If you add a user on freeradius –> USERS tab this will add a user on local "users" file. Not less and not more.
      If you want to use a mysqld server - then you must add users on your mysql database. This cannot be done from freeradius GUI.
      The only thing you can do on freeradius is to configure the connection to an external mysql database.

      So the log is telling you what is happening:

      Attempting to connect to radius@172.22.2.12:3306/radius
      

      freeradius tries to connect to your mysql server on IP172.22.2.12 on port 3306 - bot probably something went wrong.
      Wrong database user and password and/or wrong database.

      This could help you:
      http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package#MySQL

      1 Reply Last reply Reply Quote 0
      • S
        skoenman
        last edited by

        So what you trying to tell me is that the users are local??? what would happen if i have a user called koos trying to connect ….lets say he is in the mysql database but not in the local one????
        will the user still be able to auth???

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

          Example:
          You add a user in freeradius –> "Users" tab with username "testuser" and password "testpw".
          Then your CaptivePortal authenticates against RADIUS then you are able to authenticate on CP with username "testuser" and "testpw"
          This account info is stored on pfsense in /usr/local/etc/raddb/users

          If you want to store your users on a mysql database then you must add "testuser" and "testpw" on the mysql database in the correct table.
          If CP now sends RADIUS an authentication request, then freeradius must know where there account information is stored.
          So you have to tell freeradius to talk to a mysql server. To read data on a mysql database you need privileges - a username/password on mysql who is allowed to read/write on mysql.
          This username/password is idependent from the credentials you enter on CP. The username/password for mysql must be entered on freeradius --> SQL.

          Did this answer your question ?

          1 Reply Last reply Reply Quote 0
          • S
            skoenman
            last edited by

            I thought the username and password info was saved on the mysql server and not on the local db…does anybody know of a way to sync local db with mysql db??? Thing is i need to be able to add koos with rate limit of 2000 and cap of 1000 to sql database ..and i need pfsense to manage it...if that makes any sense??

            so if i have it correct at the moment if the user isnt in the local db then it goes and has a look on sql database???

            1 Reply Last reply Reply Quote 0
            • F
              Fesoj
              last edited by

              As the night owl said, you need to add the user data to the mysql database. If you want to use a GUI for that you have to supply your own one. The entries in the user list are written to the mysql database, which could be done, but you would loose some freedom on how you define the tables. My setups usually have a few extra columns.

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

                @Fesoj:

                As the night owl said…

                If you want to anger me then you call it "owl" - but the correct translation should be "hawk" - just kidding :-)
                I took this name from an old game called "Betrayal at Krondor".

                @skoenman
                Why do you want to use mysql ?
                Do you have so many users ?
                Do you need any special options that cannot be done bei the local "users" file ?

                1 Reply Last reply Reply Quote 0
                • S
                  skoenman
                  last edited by

                  Well i have a whmcs server with mysql/freeradius interface which basicly loads the usernames and passwords in the mysql database….so this is why i want pfsense to sync the usernames so that i can do rate limiting and capping from pfsense.

                  1 Reply Last reply Reply Quote 0
                  • E
                    emperorsum
                    last edited by

                    @qbik:

                    I got it to work, I edited the files but did not know the config resets on reboot, so I edited freeradius.inc on line 362 and 1633, now all is working. On the other server I am using the normal freeradius package installed by me. I just need some more customization for french error message, working on it right now, i will upload the screenshots for the vouchers soon. This package is great, thanks again!

                    @Nachtfalke:

                    @qbik:

                    Hi I am using this package and created a group with 2 attributes: Max-All-Session := 600 (5 min) Simultaneous-Use := 1. I've enabled the noresetcounter on radiusd.conf, users on that group are able to authenticate ok, however they do not get disconnected after 600 sec have past. CP is enabled, interim updates enabled, authenticate users every minute is enabled. I have the same setup on another pf sense server with freeradius installed but not with this package and all is working ok on that one. I am using MySQL on both.

                    Thanks

                    Hi,
                    do you use freeradius2 package on both pfsense or not ? That's not clear for me.

                    the attribute: Max-All-Session is not a predefined attribute in GUI. So you probably created this attribute in your mysql database ? And if you use mysql as database for accounting then you need to use the sqlcounter.conf file. This file is NOT supported from GUI. You need to check and perhaps edit this file from shell.

                    I don't how it works with mxsql but if I use the ../raddb/modules/counter module (without external database) then this modul is ONLY running on accounting-stop packets, interim-updates do not work. So make sure that it does with mysql.

                    re-authenticate every minute should be enabled on CP so that the user gets disconnected. that's right what you did. You should enabled "Disable acct_unique" in FreeRADIUS -> Settings to make accounting work properly.

                    For anybody still in doubt pfsense indeed resets few .conf files on reboot eg radiusd.conf sql.conf clients.conf . the file freeradius.inc is responsible for this. freeradius.inc is located in /usr/local/pkg/ ( I am just writing this to help anyone facing any problems with this.. like i did )

                    1 Reply Last reply Reply Quote 0
                    • M
                      markuhde
                      last edited by

                      I "upgraded" to 64-bit pfSense 2.1 Beta 1 in order to get more available RAM and now FreeRadius is broken. It doesn't respond to authentication attempts and radiusd now sits at a steady 25% CPU load when running. Configuration files were the same (I messed around a little with EAP type and stuff which I really don't understand and created new certificates but it's now set back mostly at least how it was when working fine on 32-bit). It just appears broken on 64-bit. Any ideas?

                      1 Reply Last reply Reply Quote 0
                      • P
                        pszafer
                        last edited by

                        maybe try to click 'Save' in eg EAP tab, so config of freeradius will be recreated. Then if problem still occurs paste some System logs of radiusd process.

                        1 Reply Last reply Reply Quote 0
                        • M
                          markuhde
                          last edited by

                          I completely redid the configuration, deleted freeradius from config.xml and reinstalled package and started over. Same 25% CPU from the moment the package started. I'm clueless… what should I post?

                          Here's the output of radiusd -X :

                          [2.1-BETA1][admin@glacierfire.glaciercamp]/root(1): radiusd -X
                          FreeRADIUS Version 2.2.0, for host amd64-portbld-freebsd8.3, built on Dec 20 2012 at 23:20:32
                          Copyright (C) 1999-2012 The FreeRADIUS server project and contributors.
                          There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
                          PARTICULAR PURPOSE.
                          You may redistribute copies of FreeRADIUS under the terms of the
                          GNU General Public License v2.
                          Starting - reading configuration files …
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/radiusd.conf
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/clients.conf
                          including files in directory /usr/pbi/freeradius-amd64/etc/raddb/modules/
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/wimax
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/always
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_filter
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_rewrite
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cache
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/chap
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/checkval
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cui
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.example.com
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.log
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dhcp_sqlippool
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sql/mysql/ippool-dhcp.conf
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/digest
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dynamic_clients
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/echo
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/etc_group
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expiration
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/files
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/inner-eap
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ippool
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/krb5
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ldap
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/linelog
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/otp
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/logintime
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2ip
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2vlan
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mschap
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ntlm_auth
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/opendirectory
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pam
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pap
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/passwd
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/perl
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/policy
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/preprocess
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radrelay
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radutmp
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/realm
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/redis
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/rediswho
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/replicate
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smbpasswd
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smsotp
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/soh
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sql_log
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sqlcounter_expire_on_login
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sradutmp
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/unix
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/acct_unique
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/motp
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/datacounter_acct
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/eap.conf
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/policy.conf
                          including files in directory /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/
                          including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/default
                          main {
                          allow_core_dumps = no
                          }
                          including dictionary file /usr/pbi/freeradius-amd64/etc/raddb/dictionary
                          main {
                          name = "radiusd"
                          prefix = "/usr/pbi/freeradius-amd64"
                          localstatedir = "/var"
                          sbindir = "/usr/pbi/freeradius-amd64/sbin"
                          logdir = "/var/log"
                          run_dir = "/var/run"
                          libdir = "/usr/pbi/freeradius-amd64/lib/freeradius-2.1.12"
                          radacctdir = "/var/log/radacct"
                          hostname_lookups = no
                          max_request_time = 30
                          cleanup_delay = 5
                          max_requests = 1024
                          pidfile = "/var/run/radiusd.pid"
                          checkrad = "/usr/pbi/freeradius-amd64/sbin/checkrad"
                          debug_level = 0
                          proxy_requests = yes
                          log {
                          stripped_names = no
                          auth = yes
                          auth_badpass = no
                          auth_goodpass = no
                          msg_badpass = ""
                          msg_goodpass = ""
                          }
                          security {
                          max_attributes = 200
                          reject_delay = 1
                          status_server = no
                          }
                          }
                          radiusd: #### Loading Realms and Home Servers ####
                          radiusd: #### Loading Clients ####
                          client teakettle2 {
                          ipaddr = 172.21.12.2
                          require_message_authenticator = no
                          secret = "mqh6rWnxbTkgQkVn"
                          shortname = "teakettle2"
                          nastype = "other"
                          }
                          client cafeteria {
                          ipaddr = 172.21.12.3
                          require_message_authenticator = no
                          secret = "8UmEX8Xr6sRz64R4"
                          shortname = "cafeteria"
                          nastype = "other"
                          }
                          client lodgelobby {
                          ipaddr = 172.21.12.4
                          require_message_authenticator = no
                          secret = "5TEEQULqqTB49bYc"
                          shortname = "lodgelobby"
                          nastype = "other"
                          }
                          client conferenceroom {
                          ipaddr = 172.21.12.5
                          require_message_authenticator = no
                          secret = "5vQTATZSLBGqKNhx"
                          shortname = "conferenceroom"
                          nastype = "other"
                          }
                          client sector1 {
                          ipaddr = 172.21.12.6
                          require_message_authenticator = no
                          secret = "LgVKSbJ6eRcwdJzU"
                          shortname = "sector1"
                          nastype = "other"
                          }
                          client sector2 {
                          ipaddr = 172.21.12.7
                          require_message_authenticator = no
                          secret = "aHfBaTuxytqLKXFG"
                          shortname = "sector2"
                          nastype = "other"
                          }
                          client sector3 {
                          ipaddr = 172.21.12.8
                          require_message_authenticator = no
                          secret = "ZubfCx8NZ2z6uTyJ"
                          shortname = "sector3"
                          nastype = "other"
                          }
                          client sector4 {
                          ipaddr = 172.21.12.9
                          require_message_authenticator = no
                          secret = "mnSmhmWezPySNpbw"
                          shortname = "sector4"
                          nastype = "other"
                          }
                          client 5sector1 {
                          ipaddr = 172.21.12.10
                          require_message_authenticator = no
                          secret = "rsFmNjDNAEFGhWvP"
                          shortname = "5sector1"
                          nastype = "other"
                          }
                          client midway {
                          ipaddr = 172.21.12.12
                          require_message_authenticator = no
                          secret = "UF4KbWRT7KGPbY2s"
                          shortname = "midway"
                          nastype = "other"
                          }
                          radiusd: #### Instantiating modules ####
                          instantiate {
                          Module: Linked to module rlm_exec
                          Module: Instantiating module "exec" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
                            exec {
                          wait = no
                          input_pairs = "request"
                          shell_escape = yes
                            }
                          Module: Linked to module rlm_expr
                          Module: Instantiating module "expr" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
                          Module: Linked to module rlm_counter
                          Module: Instantiating module "daily" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                            counter daily {
                          filename = "/var/log/radacct/timecounter/db.daily"
                          key = "User-Name"
                          reset = "daily"
                          count-attribute = "Acct-Session-Time"
                          counter-name = "Daily-Session-Time"
                          check-name = "Max-Daily-Session"
                          reply-name = "Session-Timeout"
                          cache-size = 5000
                            }
                          rlm_counter: Counter attribute Daily-Session-Time is number 11273
                          rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 1361257200 [2013-02-19 00:00:00]
                          Module: Instantiating module "weekly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                            counter weekly {
                          filename = "/var/log/radacct/timecounter/db.weekly"
                          key = "User-Name"
                          reset = "weekly"
                          count-attribute = "Acct-Session-Time"
                          counter-name = "Weekly-Session-Time"
                          check-name = "Max-Weekly-Session"
                          reply-name = "Session-Timeout"
                          cache-size = 5000
                            }
                          rlm_counter: Counter attribute Weekly-Session-Time is number 11275
                          rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 1361689200 [2013-02-24 00:00:00]
                          Module: Instantiating module "monthly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                            counter monthly {
                          filename = "/var/log/radacct/timecounter/db.monthly"
                          key = "User-Name"
                          reset = "monthly"
                          count-attribute = "Acct-Session-Time"
                          counter-name = "Monthly-Session-Time"
                          check-name = "Max-Monthly-Session"
                          reply-name = "Session-Timeout"
                          cache-size = 5000
                            }
                          rlm_counter: Counter attribute Monthly-Session-Time is number 11277
                          rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 1362121200 [2013-03-01 00:00:00]
                          Module: Instantiating module "forever" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                            counter forever {
                          filename = "/var/log/radacct/timecounter/db.forever"
                          key = "User-Name"
                          reset = "never"
                          count-attribute = "Acct-Session-Time"
                          counter-name = "Forever-Session-Time"
                          check-name = "Max-Forever-Session"
                          reply-name = "Session-Timeout"
                          cache-size = 5000
                            }
                          rlm_counter: Counter attribute Forever-Session-Time is number 11279
                          rlm_counter: Current Time: 1361179135 [2013-02-18 02:18:55], Next reset 0 [2013-02-18 02:00:00]
                          rlm_counter: add_defaults: Start

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

                            A problem could be the different versions of freeradius on pfsense 2.0 and 2.1
                            jimp did some changes on the pfsense server and updated some freeradius files for new freeradius 2.2.0 version.

                            pfsense 2.1 is using freeradius 2.2.0 and pfsense 2.0.x is using freeradius 2.1.12. The reinstall could give you the newer version and the freeradius.inc file didn't get that.

                            Try to edit the /usr/local/pkg/freeradius.inc file on line 83 and 216

                            I will contact jimp to check if it is possible to make a new freeradius2 .tbz file for pfsense 2.0 so that all system use the same version and .inc file can be fixed.

                            1 Reply Last reply Reply Quote 0
                            • M
                              markuhde
                              last edited by

                              Thanks, I edited those lines, FreeRADIUS still just locks at 25% CPU load when started. If you are interested to help troubleshoot the package, I can give you login credentials if you PM me. Unfortunately, I can't pay anything since I'm doing this work for free for a non-profit camp…

                              [2.1-BETA1][admin@glacierfire.glaciercamp]/root(1): radiusd -X
                              FreeRADIUS Version 2.2.0, for host amd64-portbld-freebsd8.3, built on Dec 20 2012 at 23:20:32
                              Copyright (C) 1999-2012 The FreeRADIUS server project and contributors.
                              There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
                              PARTICULAR PURPOSE.
                              You may redistribute copies of FreeRADIUS under the terms of the
                              GNU General Public License v2.
                              Starting - reading configuration files …
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/radiusd.conf
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/clients.conf
                              including files in directory /usr/pbi/freeradius-amd64/etc/raddb/modules/
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/wimax
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/always
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_filter
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/attr_rewrite
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cache
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/chap
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/checkval
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/cui
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.example.com
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/detail.log
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dhcp_sqlippool
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sql/mysql/ippool-dhcp.conf
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/digest
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/dynamic_clients
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/echo
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/etc_group
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expiration
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/files
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/inner-eap
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ippool
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/krb5
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ldap
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/linelog
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/otp
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/logintime
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2ip
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mac2vlan
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/mschap
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/ntlm_auth
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/opendirectory
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pam
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/pap
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/passwd
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/perl
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/policy
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/preprocess
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radrelay
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/radutmp
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/realm
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/redis
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/rediswho
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/replicate
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smbpasswd
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/smsotp
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/soh
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sql_log
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sqlcounter_expire_on_login
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/sradutmp
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/unix
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/acct_unique
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/motp
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/modules/datacounter_acct
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/eap.conf
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/policy.conf
                              including files in directory /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/
                              including configuration file /usr/pbi/freeradius-amd64/etc/raddb/sites-enabled/default
                              main {
                              allow_core_dumps = no
                              }
                              including dictionary file /usr/pbi/freeradius-amd64/etc/raddb/dictionary
                              main {
                              name = "radiusd"
                              prefix = "/usr/pbi/freeradius-amd64"
                              localstatedir = "/var"
                              sbindir = "/usr/pbi/freeradius-amd64/sbin"
                              logdir = "/var/log"
                              run_dir = "/var/run"
                              libdir = "/usr/pbi/freeradius-amd64/lib/freeradius-2.1.12"
                              radacctdir = "/var/log/radacct"
                              hostname_lookups = no
                              max_request_time = 30
                              cleanup_delay = 5
                              max_requests = 1024
                              pidfile = "/var/run/radiusd.pid"
                              checkrad = "/usr/pbi/freeradius-amd64/sbin/checkrad"
                              debug_level = 0
                              proxy_requests = yes
                              log {
                              stripped_names = no
                              auth = yes
                              auth_badpass = no
                              auth_goodpass = no
                              msg_badpass = ""
                              msg_goodpass = ""
                              }
                              security {
                              max_attributes = 200
                              reject_delay = 1
                              status_server = no
                              }
                              }
                              radiusd: #### Loading Realms and Home Servers ####
                              radiusd: #### Loading Clients ####
                              client teakettle2 {
                              ipaddr = 172.21.12.2
                              require_message_authenticator = no
                              secret = "mqh6rWnxbTkgQkVn"
                              shortname = "teakettle2"
                              nastype = "other"
                              }
                              client cafeteria {
                              ipaddr = 172.21.12.3
                              require_message_authenticator = no
                              secret = "8UmEX8Xr6sRz64R4"
                              shortname = "cafeteria"
                              nastype = "other"
                              }
                              client lodgelobby {
                              ipaddr = 172.21.12.4
                              require_message_authenticator = no
                              secret = "5TEEQULqqTB49bYc"
                              shortname = "lodgelobby"
                              nastype = "other"
                              }
                              client conferenceroom {
                              ipaddr = 172.21.12.5
                              require_message_authenticator = no
                              secret = "5vQTATZSLBGqKNhx"
                              shortname = "conferenceroom"
                              nastype = "other"
                              }
                              client sector1 {
                              ipaddr = 172.21.12.6
                              require_message_authenticator = no
                              secret = "LgVKSbJ6eRcwdJzU"
                              shortname = "sector1"
                              nastype = "other"
                              }
                              client sector2 {
                              ipaddr = 172.21.12.7
                              require_message_authenticator = no
                              secret = "aHfBaTuxytqLKXFG"
                              shortname = "sector2"
                              nastype = "other"
                              }
                              client sector3 {
                              ipaddr = 172.21.12.8
                              require_message_authenticator = no
                              secret = "ZubfCx8NZ2z6uTyJ"
                              shortname = "sector3"
                              nastype = "other"
                              }
                              client sector4 {
                              ipaddr = 172.21.12.9
                              require_message_authenticator = no
                              secret = "mnSmhmWezPySNpbw"
                              shortname = "sector4"
                              nastype = "other"
                              }
                              client 5sector1 {
                              ipaddr = 172.21.12.10
                              require_message_authenticator = no
                              secret = "rsFmNjDNAEFGhWvP"
                              shortname = "5sector1"
                              nastype = "other"
                              }
                              client midway {
                              ipaddr = 172.21.12.12
                              require_message_authenticator = no
                              secret = "UF4KbWRT7KGPbY2s"
                              shortname = "midway"
                              nastype = "other"
                              }
                              radiusd: #### Instantiating modules ####
                              instantiate {
                              Module: Linked to module rlm_exec
                              Module: Instantiating module "exec" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/exec
                                exec {
                              wait = no
                              input_pairs = "request"
                              shell_escape = yes
                                }
                              Module: Linked to module rlm_expr
                              Module: Instantiating module "expr" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/expr
                              Module: Linked to module rlm_counter
                              Module: Instantiating module "daily" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                                counter daily {
                              filename = "/var/log/radacct/timecounter/db.daily"
                              key = "User-Name"
                              reset = "daily"
                              count-attribute = "Acct-Session-Time"
                              counter-name = "Daily-Session-Time"
                              check-name = "Max-Daily-Session"
                              reply-name = "Session-Timeout"
                              cache-size = 5000
                                }
                              rlm_counter: Counter attribute Daily-Session-Time is number 11273
                              rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 1361257200 [2013-02-19 00:00:00]
                              Module: Instantiating module "weekly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                                counter weekly {
                              filename = "/var/log/radacct/timecounter/db.weekly"
                              key = "User-Name"
                              reset = "weekly"
                              count-attribute = "Acct-Session-Time"
                              counter-name = "Weekly-Session-Time"
                              check-name = "Max-Weekly-Session"
                              reply-name = "Session-Timeout"
                              cache-size = 5000
                                }
                              rlm_counter: Counter attribute Weekly-Session-Time is number 11275
                              rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 1361689200 [2013-02-24 00:00:00]
                              Module: Instantiating module "monthly" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                                counter monthly {
                              filename = "/var/log/radacct/timecounter/db.monthly"
                              key = "User-Name"
                              reset = "monthly"
                              count-attribute = "Acct-Session-Time"
                              counter-name = "Monthly-Session-Time"
                              check-name = "Max-Monthly-Session"
                              reply-name = "Session-Timeout"
                              cache-size = 5000
                                }
                              rlm_counter: Counter attribute Monthly-Session-Time is number 11277
                              rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 1362121200 [2013-03-01 00:00:00]
                              Module: Instantiating module "forever" from file /usr/pbi/freeradius-amd64/etc/raddb/modules/counter
                                counter forever {
                              filename = "/var/log/radacct/timecounter/db.forever"
                              key = "User-Name"
                              reset = "never"
                              count-attribute = "Acct-Session-Time"
                              counter-name = "Forever-Session-Time"
                              check-name = "Max-Forever-Session"
                              reply-name = "Session-Timeout"
                              cache-size = 5000
                                }
                              rlm_counter: Counter attribute Forever-Session-Time is number 11279
                              rlm_counter: Current Time: 1361209237 [2013-02-18 10:40:37], Next reset 0 [2013-02-18 10:00:00]
                              rlm_counter: add_defaults: Start
                              ^C
                              [2.1-BETA1][admin@glacierfire.glaciercamp]/root(2):

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

                                Hi again,

                                I did and upgrade of an "old" pfsense 2.1-BETA0 with freeradius2.1.12 to todays pfsense snapshot and freeradius2.2.0

                                Service started and no problems with high CPU usage.
                                But nevertheless there is something which needs to be corrected and please make sure you did that.

                                Edit the freeradius.inc file:

                                
                                vi /usr/local/pkg/freeradius.inc
                                
                                

                                Remove this line 83:

                                exec("chown -R root:wheel " . FREERADIUS_BASE . "/etc/raddb && chown -R root:wheel " . FREERADIUS_BASE . "/lib/freeradius-2.1.12 && chown -R root:wheel /var/log/radacct");
                                

                                With this line:

                                [code]exec("chown -R root:wheel " . FREERADIUS_BASE . "/etc/raddb && chown -R root:wheel " . FREERADIUS_BASE . "/lib/freeradius-2.2.0 && chown -R root:wheel /var/log/radacct");[/code]
                                

                                Remove this line 216:

                                libdir = \${exec_prefix}/lib/freeradius-2.1.12
                                

                                with this line:

                                libdir = \${exec_prefix}/lib/freeradius-2.2.0
                                

                                Save the freeradius.inc

                                Now go to Diagnoctics –> Command Prompt and put the following into the PHP Execute:

                                require_once('/usr/local/pkg/freeradius.inc');
                                freeradius_install_command();
                                

                                This command will take some time. It will recreate all folders and config files and restart freeradius service.
                                After that try again if it is working.

                                Question:
                                Do you "just" have problems with high CPU usage or do you have problems with freeradius at all? Does it show you "Ready to process requests" ?

                                PS: No need to SSH and no need to pay money. Use your money for usefull things or donate to pfsense but not to me ;-)

                                1 Reply Last reply Reply Quote 0
                                • M
                                  markuhde
                                  last edited by

                                  No, it's not just high CPU usage, it doesn't work, never gets to ready to process. I sent you exactly what it does :) I edited those files but I never ran that command you told me to, just did that. It still gets stuck on the same line (add defaults: start). Here's the radiusd thread causing the 25% CPU use:

                                  59445 root        119    0 34040M  9348K CPU1    1  1:13 100.00% radiusd

                                  100% use on that virtual core, it's like it's pegging it out in some kind of loop. Always worked fine on 32-bit. Maybe a complete system reinstall as 64-bit is in order, but it won't be able to happen for a month or so (though the RADIUS is only needed for youth camps come summer, right now it's all rental groups that don't get to bypass the proxy server :) )

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

                                    Perhaps just try with a complete fresh install.

                                    Do not mix architectures between snapshots. Just start with amd64 and stay on amd64 or do a fresh install.
                                    And after you installed the freeradius2 package again, do the changes, run the command I wrote and then try again :-)

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      markuhde
                                      last edited by

                                      Yeah, but I can't do a fresh install for about three weeks :) Going to just do that!

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

                                        Is freeradius2 starting if you remove all config entries from config.xml file and do a fresh freeradius2 installation ?
                                        The only thing you need to configure is a listening interface and then freeradius must start. If it starts it could be an config problem - some special char or some syntax error.

                                        Just a suggestion.

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          markuhde
                                          last edited by

                                          Nope, I tried that already, no luck. I actually deleted my entire configuration and started over. Thus why there's no users except the one test user…

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            AJOto
                                            last edited by

                                            Try to install and….

                                            $ pkg_add -r http://files.pfsense.org/packages/8/All/freeradius-2.1.12_1.tbz
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: tar: Failed to set default locale
                                            Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            
                                            ************************************************************
                                            
                                            The OpenLDAP client package has been successfully installed.
                                            
                                            Edit
                                              /usr/local/etc/openldap/ldap.conf
                                            to change the system-wide client defaults.
                                            
                                            Try `man ldap.conf' and visit the OpenLDAP FAQ-O-Matic at
                                              http://www.OpenLDAP.org/faq/index.cgi?file=3
                                            for more information.
                                            
                                            ************************************************************
                                            
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            
                                            ====
                                            Note that some of the standard modules are provided as separate
                                            ports since they require extra dependencies:
                                            
                                            bsddb           databases/py-bsddb
                                            gdbm            databases/py-gdbm
                                            sqlite3		databases/py-sqlite3
                                            tkinter         x11-toolkits/py-tkinter
                                            
                                            Install them as needed.
                                            ====
                                            
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            Removing stale symlinks from /usr/bin...
                                                Skipping /usr/bin/perl
                                                Skipping /usr/bin/perl5
                                                Removing /usr/local/bin/perl5.14.2 installed by an older perl port
                                            Done.
                                            Creating various symlinks in /usr/bin...
                                                Symlinking /usr/local/bin/perl5.12.4 to /usr/bin/perl
                                                Symlinking /usr/local/bin/perl5.12.4 to /usr/bin/perl5
                                            Done.
                                            cd: can't cd to /usr/include
                                            Cleaning up /etc/make.conf... Done.
                                            Spamming /etc/make.conf... Done.
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            pkg_add: warning: package 'libxml2-2.7.8_3' requires 'libiconv-1.14', but 'libiconv-1.13.1_1' is installed
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            tar: Failed to set default locale
                                            pkg_add: warning: package 'postgresql-client-8.4.12' requires 'libiconv-1.14', but 'libiconv-1.13.1_1' is installed
                                            
                                            The PostgreSQL port has a collection of "side orders":
                                            
                                            postgresql-docs
                                              For all of the html documentation
                                            
                                            p5-Pg
                                              A perl5 API for client access to PostgreSQL databases.
                                            
                                            postgresql-tcltk 
                                              If you want tcl/tk client support.
                                            
                                            postgresql-jdbc
                                              For Java JDBC support.
                                            
                                            postgresql-odbc
                                              For client access from unix applications using ODBC as access
                                              method. Not needed to access unix PostgreSQL servers from Win32
                                              using ODBC. See below.
                                            
                                            ruby-postgres, py-PyGreSQL
                                              For client access to PostgreSQL databases using the ruby & python
                                              languages.
                                            
                                            postgresql-plperl, postgresql-pltcl & postgresql-plruby
                                              For using perl5, tcl & ruby as procedural languages.
                                            
                                            postgresql-contrib
                                              Lots of contributed utilities, postgresql functions and
                                              datatypes. There you find pg_standby, pgcrypto and many other cool
                                              things.
                                            
                                            etc...
                                            
                                            ===> Setting user and group in radiusd.conf
                                            ===> Creating users and/or groups.
                                            Using existing group 'freeradius'.
                                            Using existing user 'freeradius'.
                                            ===> Bootstrapping default certificates, please wait...
                                            tar: tar: Failed to set default localeFailed to set default locale
                                            
                                            ===> Adjusting ownership of directory /usr/local/etc/raddb
                                            ===> Adjusting ownership of directory /var/log/radacct
                                            ===> Adjusting ownership of directory /var/run/radiusd
                                            ===> Adjusting ownership of /var/log/radius.log
                                            ===> Adjusting ownership of /var/log/radutmp
                                            ===> Adjusting ownership of /var/log/radwtmp
                                            ===> Updating libdir in /usr/local/etc/raddb/radiusd.conf
                                            pkg_add: warning: package 'freeradius-2.1.12_1' requires 'libiconv-1.14', but 'libiconv-1.13.1_1' is installed
                                            
                                            ===============================================================================
                                            
                                            To enable FreeRADIUS, put the following line in /etc/rc.conf
                                            
                                            radiusd_enable="YES"
                                            
                                            The sample configuration can be found at
                                            /usr/local/share/examples/freeradius/raddb
                                            
                                            If you are upgrading FreeRADIUS, you are advised to use this as a reference
                                            for updating your configuration.
                                            
                                            FreeRADIUS will look for its configuration directory at
                                            /usr/local/etc/raddb by default.
                                            
                                            If you did not already have a configuration at this location, the sample
                                            configuration has been copied to this location and has been bootstrapped.
                                            
                                            If you wish to point FreeRADIUS to a configuration at a different
                                            location, put the following line in /etc/rc.conf
                                            
                                            radiusd_flags="-d /path/to/raddb"
                                            
                                            To start the server in normal (daemon) mode, run:
                                            
                                            /usr/local/etc/rc.d/radiusd start
                                            
                                            and to stop the server, run:
                                            
                                            /usr/local/etc/rc.d/radiusd stop
                                            
                                            To start the server in debugging mode, run:
                                            
                                            /usr/local/etc/rc.d/radiusd debug
                                            
                                            You are advised to make cautious changes to the configuration, and to test
                                            frequently, using debugging mode where necessary. Try to resist the
                                            temptation to disable or delete things that you don't understand - you may
                                            well break things!
                                            
                                            The documentation has been installed at /usr/local/share/doc/freeradius
                                            
                                            Useful configuration advice can be found in the FreeRADIUS Wiki at
                                            http://wiki.freeradius.org
                                            
                                            ===============================================================================
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.