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

NEW Package: freeRADIUS 2.x

pfSense Packages
80
628
736.4k
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.
  • U
    unixaccent
    last edited by Mar 6, 2015, 4:57 AM Mar 6, 2015, 12:02 AM

    Hi zlyzwy;
    Hi Nachtfalke;
    Hi Everyone;
    Your conversation on the following thread makes my learning curve easier.
    https://forum.pfsense.org/index.php?topic=43675.msg235475#msg235475
    I want to thank you both for this.
    I hope I am not asking too much. I have a question about how to setup sqlcounter in reference to zlyzwy and if I understand it right, the setup is "pfsense+freeradius" + "external databse." Its like after connecting "pfsense+freeradius" to "external database", all accounting stuffs will be logged to the "radacct" table of the external database. I wonder how to setup the counter in pfsense box and how does pfsense send a "disconnect message" if a user has reached a quota like the "download size" in a day or "maximum session" in a day.
    Regards;

    1 Reply Last reply Reply Quote 0
    • J
      jetberrocal
      last edited by Apr 24, 2015, 9:44 PM

      @Nachtfalke:

      Updates pkg v1.4.3:

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

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

      Reference Version: pfsense 2.1.5 Freeradius 2.2.5_3 pkg v1.6.11

      I think there is a misunderstanding on LDAP Authorization and Authentication.  When I uncheck "Enable LDAP For Authorization", the General Configuration fields are disabled and emptied.  Without this values the Authentication does not know how to connect to LDAP, so it fails.  The way is working in my reference Version, you have to Authorize to be able to Authenticate, and that is not correct for all the cases.

      I had to modify manually the sites-enable file in order to disable LDAP Authorize for my configuration to work correctly.  If you want, follow the freeradius user mailing list for the detail in my situation.

      http://freeradius.1045715.n5.nabble.com/Authenticating-users-on-LDAP-based-on-Group-name-td5732701i20.html

      1 Reply Last reply Reply Quote 0
      • R
        reggie14
        last edited by Jul 6, 2015, 2:36 AM

        I set up FreeRADIUS for use on my guest wifi network with EAP.  At this time I'm not planning on using Captive Portal- I just wanted to be able to provide per-user passwords and bandwidth limits.

        However, I'd like to be able to disable users without deleting them.  I don't see a "disable" button, but I figure there might be a way to do something similar.  I tried setting "Number of simultaneous connections" to 0 and wasn't overly surprised when it didn't work (I'm just using a Asus consumer-grade AP).

        Is there a way to effectively disable a user without deleting it?

        1 Reply Last reply Reply Quote 0
        • L
          l.capriotti
          last edited by Jul 6, 2015, 8:10 AM

          I need to customise freeradius with a custom site file and a custom script for the authentication, where should I place these files in order for them to survive a pfsense upgrade?
          Until now I saved these files in /usr/pbi/freeradius/etc/raddb but they are not restored after a system upgrade.
          I saw reference to /usr/local/etc/raddb, chall I use that directory instead?

          1 Reply Last reply Reply Quote 0
          • N
            Nachtfalke
            last edited by Jul 6, 2015, 7:56 PM

            @reggie14:

            I set up FreeRADIUS for use on my guest wifi network with EAP.  At this time I'm not planning on using Captive Portal- I just wanted to be able to provide per-user passwords and bandwidth limits.

            However, I'd like to be able to disable users without deleting them.  I don't see a "disable" button, but I figure there might be a way to do something similar.  I tried setting "Number of simultaneous connections" to 0 and wasn't overly surprised when it didn't work (I'm just using a Asus consumer-grade AP).

            Is there a way to effectively disable a user without deleting it?

            Hi,

            bandwidth limit and number of connections are features that must be supported by your Wireless AP. If the AP does not support it it will not work. A chance that it could work is if your AP supports "accounting" but then you need the coresponding RADIUS attributes from your vendor.

            To disable a user there is no "disable" button but I think you can workaround with the "Expiration date". Thi will only work for a specific date.
            If you need to disable an account for a specific time then you should add possible time ranges with the "Possiblöe Time Ranges" option. Using both together should allow you to disable a user.

            1 Reply Last reply Reply Quote 0
            • N
              Nachtfalke
              last edited by Jul 6, 2015, 8:12 PM

              @l.capriotti:

              I need to customise freeradius with a custom site file and a custom script for the authentication, where should I place these files in order for them to survive a pfsense upgrade?
              Until now I saved these files in /usr/pbi/freeradius/etc/raddb but they are not restored after a system upgrade.
              I saw reference to /usr/local/etc/raddb, chall I use that directory instead?

              Hi,
              I would give you a suggestion to use the additional package "System Patches". The make a "diff" of the original and your new file and paste the diff into the "System Patches" package and then you can enable "auto apply" so it should apply after upgrades - unless there is no change on the original file.

              For complete new custom scripts - don't know where the best place on pfsense is. Here is a path where freeradius stores custom scripts:
              /usr/pbi/freeradius-amd64/etc/raddb/scripts
              or you add your script to the freeradius.inc so it will be created on specific action:

              https://github.com/pfsense/pfsense-packages/blob/master/config/freeradius2/freeradius.inc

              Have a look at lines 4143 - 4180

              
              function freeradius_datacounter_auth_resync() {
              	global $config;
              	$conf = '';
              
              	$conf .= <<<eod<br>#!/bin/sh
              ### USAGE: datacounter_auth.sh USERNAME TIMERANGE
              ### We need this parameters from freeradius users file and ../raddb/modules/datacounter_acct
              USERNAME=`echo -n "\\$1" | sed 's/[^0-9a-zA-Z._:-]/X/g' `
              TIMERANGE=`echo -n "\\$2" | sed 's/[^a-z]//g' `
              
              ### This is to make sure there is a used-octets file after the cronjob resetted the counter
              if [ -e "/var/log/radacct/datacounter/\$TIMERANGE/max-octets-\$USERNAME" ] && [ ! -e "/var/log/radacct/datacounter/\$TIMERANGE/used-octets-\$USERNAME" ]; then
              	echo 0 > "/var/log/radacct/datacounter/\$TIMERANGE/used-octets-\$USERNAME"
              fi
              
              ### The next two lines are just for getting values for logging output
              MAXOCTETSUSERNAMEMB=$((`cat "/var/log/radacct/datacounter/\$TIMERANGE/max-octets-\$USERNAME"`/1024/1024))
              USEDOCTETSUSERNAMEMB=$((`cat "/var/log/radacct/datacounter/\$TIMERANGE/used-octets-\$USERNAME"`/1024/1024))
              
              ### We check if MAX-OCTETS-USERNAME is greater than USED-OCTETS-USERNAME and accept or reject the user
              if [ `cat "/var/log/radacct/datacounter/\$TIMERANGE/max-octets-\$USERNAME"` -gt `cat "/var/log/radacct/datacounter/\$TIMERANGE/used-octets-\$USERNAME"` ]; then
              	logger -f /var/log/system.log "FreeRADIUS: Used amount of \$TIMERANGE traffic by \$USERNAME is \$USEDOCTETSUSERNAMEMB MB of \$MAXOCTETSUSERNAMEMB MB! The user was accepted!!!"
              	exit 0
              else
              	logger -f /var/log/system.log "FreeRADIUS: Credentials are probably correct but the user \$USERNAME has reached the \$TIMERANGE Amount of Upload and Download Traffic which is \$USEDOCTETSUSERNAMEMB MB of \$MAXOCTETSUSERNAMEMB MB! The user was rejected!!!"
              	exit 99
              fi
              EOD;
              
              	$filename = FREERADIUS_ETC . '/raddb/scripts/datacounter_auth.sh';
              	conf_mount_rw();
              	file_put_contents($filename, $conf);
              	chmod($filename, 0750);
              	conf_mount_ro();
              
              }</eod<br> 
              

              You can replace the /bin/bash script there with your own and then give the function an new name, edit the path where you want to save the script and if you want add the function below line 422 so that it will be executed every time you click "Save" on the Freeradius "Settings" menu in the GUI.

              1 Reply Last reply Reply Quote 0
              • B
                biGdada
                last edited by Oct 10, 2015, 2:40 PM

                Hi.
                Is it possible to use mOTP with MSCHAPv2?
                I am getting a reject, while PAP with mOTP works.

                1 Reply Last reply Reply Quote 0
                • S
                  sisko212
                  last edited by Oct 27, 2015, 7:47 AM

                  Good day to everybody,
                  As you maybe know, latest package Freeradius2 1.6.15 that contains a Freeradius 2.2.6 daemon, has a trouble on EAP-TLS authentication.
                  Above all with latest Android 6.0 Marshmallow.
                  Some tech details are available here:
                  https://code.google.com/p/android/issues/detail?id=188867#c29
                  Someone known if it exists a workaround, perhaps editing some configuration files on freeradius, or also on Android with some apps, in order to avoid this issue ?
                  Thanks a lot in advance for your time and for any suggestion.

                  1 Reply Last reply Reply Quote 0
                  • D
                    David_W
                    last edited by Oct 29, 2015, 3:33 AM

                    The issues you mention should be fixed in FreeRADIUS 2.2.9, which is now in FreeBSD ports.

                    FreeRADIUS 2.x is now end of life. Hopefully someone will come forward to develop a FreeRADIUS 3.x package, though I would suggest any development efforts target the forthcoming pfSense 2.3.

                    1 Reply Last reply Reply Quote 0
                    • T
                      thetrevster
                      last edited by Oct 30, 2015, 3:50 PM Oct 30, 2015, 3:47 PM

                      I'm on the latest version of pfSense (2.2.4 - 64 bit) with Captive Portal and the FreeRADIUS 2.x package setup for traffic capping. Everything is working properly to re-authenticate users every minute and I'm using the MAC address as the username. I'm currently capping users at 6000MB (total upload and download) per day. I added a test machine in and noticed that the traffic counter isn't working correctly. I was aware of this issue on older version of pfSense, but it seems that I am having a similar issue in the latest build. Any thoughts? See below an output from the system logs.

                      Oct 30 15:37:56 root: FreeRADIUS: Used amount of daily traffic by 247703xxxxxx is 35 MB of 6000 MB! The user was accepted!!!
                      Oct 30 15:38:58 root: FreeRADIUS: Used amount of daily traffic by 247703xxxxxx is 70 MB of 6000 MB! The user was accepted!!!

                      I have a local counter on the test machine, counting all traffic in/out of the wireless NIC. Within that time period, it shows I've only transferred 800KB, but the logs are showing 30+ MB. Thanks in advance for any input.

                      1 Reply Last reply Reply Quote 0
                      • T
                        tamersherif
                        last edited by Nov 1, 2015, 7:21 PM

                        @thetrevster:

                        I'm on the latest version of pfSense (2.2.4 - 64 bit) with Captive Portal and the FreeRADIUS 2.x package setup for traffic capping. Everything is working properly to re-authenticate users every minute and I'm using the MAC address as the username. I'm currently capping users at 6000MB (total upload and download) per day. I added a test machine in and noticed that the traffic counter isn't working correctly. I was aware of this issue on older version of pfSense, but it seems that I am having a similar issue in the latest build. Any thoughts? See below an output from the system logs.

                        Oct 30 15:37:56 root: FreeRADIUS: Used amount of daily traffic by 247703xxxxxx is 35 MB of 6000 MB! The user was accepted!!!
                        Oct 30 15:38:58 root: FreeRADIUS: Used amount of daily traffic by 247703xxxxxx is 70 MB of 6000 MB! The user was accepted!!!

                        I have a local counter on the test machine, counting all traffic in/out of the wireless NIC. Within that time period, it shows I've only transferred 800KB, but the logs are showing 30+ MB. Thanks in advance for any input.

                        Yes the the problem still exists int 2.2.4 i tried every thing and every tutorial on the internet but it's confirmed that this is a bug.

                        1 Reply Last reply Reply Quote 0
                        • T
                          thetrevster
                          last edited by Nov 2, 2015, 9:18 PM

                          That is unfortunate, I could really use this feature. Is the bug actively being worked on / any idea on when it will be fixed? Thanks.

                          1 Reply Last reply Reply Quote 0
                          • ?
                            A Former User
                            last edited by Nov 6, 2015, 6:48 AM

                            @sisko212:

                            Good day to everybody,
                            As you maybe know, latest package Freeradius2 1.6.15 that contains a Freeradius 2.2.6 daemon, has a trouble on EAP-TLS authentication.
                            Above all with latest Android 6.0 Marshmallow.
                            Some tech details are available here:
                            https://code.google.com/p/android/issues/detail?id=188867#c29
                            Someone known if it exists a workaround, perhaps editing some configuration files on freeradius, or also on Android with some apps, in order to avoid this issue ?
                            Thanks a lot in advance for your time and for any suggestion.

                            Just got Marshmallow OTA update myself and smacked into this same problem.  EAP-TLS configuration that has been working fine for quite a while, now no longer works on upgraded Nexus 7.

                            Symptoms are that the device appears to negotiate authentication, FreeRADIUS logs indicate the device was authenticated, but the device never finishes joining the network, and just keeps repeating.

                            From the Google thread, the issue is tied to the use of TLSv1.2 and downgrading to TLSv1.1 or 1.0, the final keying is correct.  But downgrading to broken encryption standards is not what I'd consider a workaround.

                            From other forum reading, it sounds like this is going to be a quickly growing problem as Marshmallow is currently being rolled out OTA to all Nexus devices and expected to hit OEM devices soon.

                            So really the only question then is how soon an updated release that contains a fix for this issue can be made available.

                            1 Reply Last reply Reply Quote 0
                            • D
                              David_W
                              last edited by Nov 7, 2015, 3:07 PM

                              @TechyTech:

                              Just got Marshmallow OTA update myself and smacked into this same problem.  EAP-TLS configuration that has been working fine for quite a while, now no longer works on upgraded Nexus 7.

                              As I said earlier in the thread, the package needs to be respun with FreeRADIUS 2.2.9 to solve this problem. If the package has a maintainer, hopefully he/she can deal with this, otherwise it would be helpful if someone built and tested an upgraded package, then submitted a pull request.

                              The longer term issue is that FreeRADIUS 2.x is now End of Life. A new package is needed, based on FreeRADIUS 3.x, though, depending on the timeline for pfSense 2.3, there may well be little point building a FreeRADIUS 3.x package for pfSense 2.2. It might be best to build a FreeRADIUS 3.x package for pfSense 2.3 rather than upgrading the FreeRADIUS 2.x package for the Bootstrap based pfSense 2.3 GUI.

                              1 Reply Last reply Reply Quote 0
                              • S
                                sisko212
                                last edited by Nov 11, 2015, 1:53 PM

                                @David_W:

                                …package needs to be respun with FreeRADIUS 2.2.9 to solve this problem....The longer term issue is that FreeRADIUS 2.x is now End of Life. A new package is needed, based on FreeRADIUS 3.x...

                                I Agree with you, but for users like me, developing a new pfsense package with latest freeradius 3 version, requires a skill and time (to read pfsense package build documentation) that not everybody has …
                                At moment, only as temporary workaround, I installed a Zeroshel distribution, only for wifi authentication, because it has a newer freeradius (maybe 2.2.12 or .19) than pfsense, and it is able to work with latest Android and iOS releases.

                                1 Reply Last reply Reply Quote 0
                                • D
                                  David_W
                                  last edited by Nov 12, 2015, 1:30 PM

                                  @sisko212:

                                  At moment, only as temporary workaround, I installed a Zeroshel distribution, only for wifi authentication, because it has a newer freeradius (maybe 2.2.12 or .19) than pfsense, and it is able to work with latest Android and iOS releases.

                                  FreeRADIUS 2.2.9 is the latest - and quite possibly the last - release in the 2.2.x series. If you see version numbers higher than that, they're not using the version numbering from the FreeRADIUS developers.

                                  Your work-round is probably the best for now. I don't have the time to do any work on fixing the package and I'm not sure anyone is maintaining it. The chances are that all that is needed is to upgrade the FreeRADIUS code to 2.2.9, though there might be other changes necessary for the package to work correction with 2.2.9.

                                  A FreeRADIUS 3.x package is a much larger undertaking. Arguably the correct approach - as I have advocated elsewhere - is to produce a FreeRADIUS 3.x package for pfSense 2.3 rather than upgrading the current 2.x package for Bootstrap. Considering the limited life remaining of pfSense 2.2.x, it's hard to justify the effort involved in developing a FreeRADIUS 3.x package for non Bootstrap versions of pfSense.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    sloper
                                    last edited by Jan 20, 2016, 9:38 PM Jan 20, 2016, 9:05 PM

                                    @David_W:

                                    The chances are that all that is needed is to upgrade the FreeRADIUS code to 2.2.9, though there might be other changes necessary for the package to work correction with 2.2.9.

                                    I am 100% willing to do this and test it. I'm having trouble finding (in the package's source) where it finds the actual Freeradius software. If anyone can point me in the right direction, I'll definitely update the package.

                                    See the other topic specifically about the TLS issue which I've outlined what I'm looking for a bit more: https://forum.pfsense.org/index.php?topic=104343.msg588608#msg588608

                                    1 Reply Last reply Reply Quote 0
                                    • jimpJ
                                      jimp Rebel Alliance Developer Netgate
                                      last edited by Jan 26, 2016, 9:17 PM

                                      It's not something that can be fixed in the package code in our repositories. The PBI needs to be rebuilt, but due to other changes in the ports tree after the last version was made, rebuilding it is non-trivial. There is an open ticket for it here: https://redmine.pfsense.org/issues/5318

                                      In the meantime, FreeRADIUS on pfSense 2.3 is using FreeRADIUS 2.2.9 and is in a good/usable state. If someone absolutely requires it, upgrading to pfSense 2.3 beta (or at least having a VM with it running for FreeRADIUS!) is not a bad suggestion at this point in time.

                                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                      Need help fast? Netgate Global Support!

                                      Do not Chat/PM for help!

                                      1 Reply Last reply Reply Quote 0
                                      • N
                                        nxsfan
                                        last edited by Jan 31, 2016, 11:48 PM

                                        Just installed freeRADIUS on a relatively fresh (2.2.6) PFSense install. After minimal configuration clients were served with an expired (1/28/16) "Example Server Certificate". Is this intentional? I originally assumed that bootstrap was called after installing and starting freeRADIUS 2 the first time, but this isn't the case? After deleting the certificate and running bootstrap a new (temporally valid) certificate was generated. Perhaps this is expected? Thanks.

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          tux
                                          last edited by Feb 21, 2016, 7:41 AM

                                          Will this freeradius work with mariadb?

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