Navigation

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

    NEW Package: freeRADIUS 2.x

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

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

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

        Updates pkg v1.4.4:

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

        Updates pkg v1.4.5:

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

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

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

        • Updated: Documentation on docs.pfsense.org

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

          Hi,

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

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

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

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

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

            @zlyzwy:

            Hi,

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

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

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

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

            Hi,

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

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

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

              @Nachtfalke:

              @zlyzwy:

              Hi,

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

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

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

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

              Hi,

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

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

              Thanks for the quick reply!

              Looking forward to the update version:)

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

                zlyzwy,

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

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

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

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

                Help a community developer! ;D

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

                  Updates pkg v1.4.6:

                  • Fixed: When Plain MAC Auth is enabled we are now able to not only check against EAP-X but against all other modules. The MAC check is now before all other checks and if it fails it proceeds with the rest.
                  1 Reply Last reply Reply Quote 0
                  • N
                    Nachtfalke last edited by

                    Updates pkg v1.4.7:

                    • Added: extended features for MySQL, PostgreSQL, LDAP, Kerberos support

                    • Changed: Path to new packages and its dependencies

                    • Updated: FreeRADIUS 2.x package documentation on doc.pfsense.org

                    And the oscar goes to:
                    marcelloc
                    Thank you for compiling freeradius2 with the extended features and hosting the packages!

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

                      I'm trying to get LDAP working but I'm getting the following output:

                      
                        [ldap] ldap_search() failed: Operations error
                      [ldap] search failed
                        [ldap] ldap_release_conn: Release Id: 0
                      ++[ldap] returns fail
                      Invalid user:  [USER/PASSW]
                      
                      

                      Does anyone know why this is happening? When I manually do an ldap search with another program with the same user I do get a result back.

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

                        Hello!
                        So Nachtfalke and marcelloc,  thank you for great job!

                        I've done the same job about two weeks ago and I regret now not sharing my work :/
                        I've compiled ldap, kerberos modules (don't needed mysql and other db's).

                        So now to make AD integration possible it is necessary to have Samba and Kerberos packages.
                        why?
                        simple version, maybe little mixed up. samba has winbind, which allow kerberos to authenticate in windows domain.
                        winbind has module ntlm_auth which can ask server about the user, but we have to be member of domain.

                        so what am I doing is tryin' to compile Samba 3 for Pfsense, next Kerberos and will post here about results

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

                          @sandern:

                          I'm trying to get LDAP working but I'm getting the following output:

                          
                            [ldap] ldap_search() failed: Operations error
                          [ldap] search failed
                            [ldap] ldap_release_conn: Release Id: 0
                          ++[ldap] returns fail
                          Invalid user:  [USER/PASSW]
                          
                          

                          Does anyone know why this is happening? When I manually do an ldap search with another program with the same user I do get a result back.

                          you didn't give anything about your config, but I'll try guess:

                          If you have MS AD try to filter:
                          (sAMAccountName=%{mschap:User-Name})
                          otherwise maybe:
                          (uid=%{mschap:User-Name})

                          I don't know if you have your Identity configured properly, show it for us

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

                            Hi,

                            Sorry, its indeed MS AD (2008R2). I already tried with the sAMAccountName but didn't had the MSCHAP in it, tried it again, but still no luck:

                            radtest nas PASSW localhost 1 testpass
                            
                            [ldap] performing user authorization for nas
                            [ldap]  expand: (sAMAccountName=%{mschap:User-Name}) -> (sAMAccountName=nas)
                            [ldap]  expand: o=intersui,c=local -> o=intersui,c=local
                              [ldap] ldap_get_conn: Checking Id: 0
                              [ldap] ldap_get_conn: Got Id: 0
                              [ldap] attempting LDAP reconnection
                              [ldap] (re)connect to 10.10.1.1:389, authentication 0
                              [ldap] bind as WDSINST/***** to 10.10.1.1:389
                              [ldap] waiting for bind result ...
                              [ldap] Bind was successful
                              [ldap] performing search in o=intersui,c=local, with filter (sAMAccountName=nas)
                              [ldap] ldap_search() failed: Operations error
                            [ldap] search failed
                              [ldap] ldap_release_conn: Release Id: 0
                            ++[ldap] returns fail
                            Invalid user: [nas/****] (from client pfsense2 port 1)
                            
                            

                            Base Filter: (objectclass=*)
                            Filter: (sAMAccountName=%{mschap:User-Name})
                            Basedn: o=intersui,c=local

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

                              @sandern:

                              Hi,

                              Sorry, its indeed MS AD (2008R2). I already tried with the sAMAccountName but didn't had the MSCHAP in it, tried it again, but still no luck:

                              radtest nas PASSW localhost 1 testpass
                              
                              [ldap] performing user authorization for nas
                              [ldap]  expand: (sAMAccountName=%{mschap:User-Name}) -> (sAMAccountName=nas)
                              [ldap]  expand: o=intersui,c=local -> o=intersui,c=local
                                [ldap] ldap_get_conn: Checking Id: 0
                                [ldap] ldap_get_conn: Got Id: 0
                                [ldap] attempting LDAP reconnection
                                [ldap] (re)connect to 10.10.1.1:389, authentication 0
                                [ldap] bind as WDSINST/***** to 10.10.1.1:389
                                [ldap] waiting for bind result ...
                                [ldap] Bind was successful
                                [ldap] performing search in o=intersui,c=local, with filter (sAMAccountName=nas)
                                [ldap] ldap_search() failed: Operations error
                              [ldap] search failed
                                [ldap] ldap_release_conn: Release Id: 0
                              ++[ldap] returns fail
                              Invalid user: [nas/****] (from client pfsense2 port 1)
                              
                              

                              Base Filter: (objectclass=*)
                              Filter: (sAMAccountName=%{mschap:User-Name})
                              Basedn: o=intersui,c=local

                              change basedn to
                              basedn: cn=Users,dc=intersui,dc=local
                              as far as I know if you want filter sAMAccountName you have to use Microsoft style, so dc, dc ;)

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

                                That did the trick :) BUT he still doesn't give me an accept message:

                                ++[files] returns noop
                                [ldap] performing user authorization for nas
                                [ldap]  expand: (sAMAccountName=%{mschap:User-Name}) -> (sAMAccountName=nas)
                                [ldap]  expand: ou=Accounts,dc=intersui,dc=local -> ou=Accounts,dc=intersui,dc=local
                                  [ldap] ldap_get_conn: Checking Id: 0
                                  [ldap] ldap_get_conn: Got Id: 0
                                  [ldap] performing search in ou=Accounts,dc=intersui,dc=local, with filter (sAMAccountName=nas)
                                [ldap] looking for check items in directory...
                                [ldap] looking for reply items in directory...
                                WARNING: No "known good" password was found in LDAP.  Are you sure that the user is configured correctly?
                                [ldap] user nas authorized to use remote access
                                  [ldap] ldap_release_conn: Release Id: 0
                                ++[ldap] returns ok
                                rlm_counter: Entering module authorize code
                                rlm_counter: Could not find Check item value pair
                                ++[daily] returns noop
                                rlm_counter: Entering module authorize code
                                rlm_counter: Could not find Check item value pair
                                ++[weekly] returns noop
                                rlm_counter: Entering module authorize code
                                rlm_counter: Could not find Check item value pair
                                ++[monthly] returns noop
                                rlm_counter: Entering module authorize code
                                rlm_counter: Could not find Check item value pair
                                ++[forever] returns noop
                                rlm_checkval: Could not find item named Calling-Station-Id in request
                                rlm_checkval: Could not find attribute named Calling-Station-Id in check pairs
                                ++[checkval] returns notfound
                                ++[expiration] returns noop
                                ++[logintime] returns noop
                                [pap] WARNING! No "known good" password found for the user.  Authentication may fail because of this.
                                ++[pap] returns noop
                                ERROR: No authenticate method (Auth-Type) found for the request: Rejecting the user
                                Failed to authenticate the user.
                                Login incorrect: [nas/*****] (from client pfsense2 port 1)
                                Using Post-Auth-Type Reject
                                
                                

                                On Google this gives me lots of results but not really a solution. (The DN bind user is Administrator, so its not a permission issue - found some posts refering to this)

                                Also "set_auth_type = yes/no" as mentioned on Google doesn't help.

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

                                  @pszafer

                                  Thank you very much for your feedback. I read about the samba and winbind "problematic" to use an Active Directory with freeradius. But I am not sure at all now - I thought that Win Server 2003 and higher has LDAP compatibility but you first have to enable something on Windows Server. But I am not sure on that and I do not find the documentation…

                                  freeradius2 has an "rlm_smb" module but this is still experimental. This is the excerpt of the makefile:

                                  # No SMB option yet; rlm_smb is still unbuildable
                                  .ifdef(WITH_SMB)
                                  LIB_DEPENDS=	smbclient.0:${PORTSDIR}/net/samba-libsmbclient
                                  CONFIGURE_ARGS+=--with-rlm_smb
                                  CONFIGURE_ARGS+=--with-rlm-smb-lib-dir=${LOCALBASE}/lib
                                  CONFIGURE_ARGS+=--with-rlm-smb-include-dir=${LOCALBASE}/include
                                  PLIST_SUB+=	SMB=""
                                  .else
                                  CONFIGURE_ARGS+=--without-rlm_smb
                                  PLIST_SUB+=	SMB="@comment "
                                  .endif
                                  
                                  # SMB module is still experimental
                                  .if defined(WITH_SMB) && !defined(WITH_EXPERIMENTAL)
                                  WITH_EXPERIMENTAL=	yes
                                  .endif
                                  

                                  The third thing I read about here in the forum is/was that someone had installed samba on pfsense but it breaks the hole system.

                                  @pszafer:
                                  You wrote you worked on freeradius2 (compiling) in the past. Did you use it on pfsense and how did you get it work with LDAP and/or AD ?
                                  If there are samba binaries which don't breake the system I am sure we can add these to freeradius2 package and the create a GUI to edit the smb.conf. That shouldn't be to hard if we know the command lines.

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

                                    @sandern
                                    in /usr/local/etc/raddb/sites-enabled/default
                                    you have authentication section

                                    so far we've got plaint text password and this is our problem, we need nt-domain hash.
                                    you could try comment line with unix auth
                                    and uncomment Auth-Type LDAP, but this will propably cause other errors.
                                    I've done this before so linux users with pap auth were authenticated succesfully,  but trully I remove this and backuped in wrong place (it's gone) so I can't easy come back to this, but I don't want to.

                                    @Nachtfalke
                                    AD is compatible with LDAP in way we wanted to.
                                    We need Kerberos to get ticket to get authenticated - http://www.google.pl/imgres?q=kerberos+eap&um=1&hl=pl&authuser=0&biw=1920&bih=913&tbm=isch&tbnid=4SMvBpPK_Big9M:&imgrefurl=http://anil-identity.blogspot.com/2009_02_01_archive.html&docid=xeW3QfB9c27wtM&imgurl=http://identitymeme.org/wp-content/uploads/2009/02/krbandweb-opps_06-700x366.png&w=700&h=366&ei=gUcLT5qpEcmq-AaFwL20AQ&zoom=1&iact=hc&vpx=1506&vpy=159&dur=1520&hovh=162&hovw=311&tx=119&ty=97&sig=107427534317749718724&page=1&tbnh=86&tbnw=164&start=0&ndsp=53&ved=1t:429,r:8,s:0

                                    To get Kerberos working with AD we need get winbind (which is in Samba packet). Winbind is service allows to get authenticated over Windows PDC.
                                    rlm_smb is something worth to try and interesting.

                                    About Samba compiling, I think someone could try to use samba as file sharing server so firewall would be messed up.
                                    I wanted to use Samba only for purpose to authenticate user and I think it is possible ;)

                                    Two weeks ago I've bought new netgear router to my workplace, upgraded to OpenWRT and wanted to authenticate wifi via 802.1x.
                                    As Domain Controller shouldn't be used for this for security reasons I decided to do it on pfsense router. Didn't search forum what's going on with this packet, didn't see this in GUI so recompiled freeradius on freebsd virtual machine and added necessary libraries for that.
                                    I've come here because I was exhausted for tryin' ntlm_auth to work. Squid package has some ntlm_auth without samba, so I assumed it is possible. Now I think my assumption was wrong :P

                                    Okay, now I'm reading about rlm_smb, maybe do something with that.

                                    –------------------
                                    one weird thing, in dd-wrt it is for 5 years and it is still experimental? am I missing something?

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

                                      I wanted to use Samba only for purpose to authenticate user and I think it is possible

                                      Only if you do it by hand, installing freebsd packages.Samba as a pfSense package is really not a good idea for firewall.

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

                                      Help a community developer! ;D

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

                                        in freebsd packages there are no security=ads. Unfortunately we need only this from samba :/

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

                                          Ddid you tried with kerberos? there is a way to do this without samba.

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

                                          Help a community developer! ;D

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

                                            @marcelloc
                                            I will try tomorrow morning do this (in 7 hours) [other time zone  ;)]

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

                                              Updates pkg v1.4.8:

                                              • Added: Support for Redundant / LoadBalancing two LDAP Servers (authorize and authentication)

                                              I will add redundant SQL server support in near futur, too.

                                              PS: I found something about MS AD and LDAP and how to enable LDAP in MS Server 2003 and higher. This is not directly pointed to freeradius but perhaps it will help the guys who know more about this than me :D

                                              http://www.petri.co.il/anonymous_ldap_operations_in_windows_2003_ad.htm

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

                                                Hello, here is the same and shorter version for 2008 AD, http://technet.microsoft.com/pl-pl/library/cc816788(WS.10).aspx,
                                                but I'm not sure if this is what we want to do.
                                                Make connection safer in one place, but less safe in other place.

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

                                                  @pszafer:

                                                  Hello, here is the same and shorter version for 2008 AD, http://technet.microsoft.com/pl-pl/library/cc816788(WS.10).aspx,
                                                  but I'm not sure if this is what we want to do.
                                                  Make connection safer in one place, but less safe in other place.

                                                  I don't think this is the case here. We are authenticating to ldap so its not anonymous as in the technet article. I'll try some more this afternoon to get this working.

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

                                                    just tell me, is command kinit working for you?
                                                    I have problem with a lot of libraries.
                                                    Now I'm stuck at error:
                                                    /usr/local/lib/libgssrpc.so: Undefined symbol "gss_mech_krb5"

                                                    –---------------------------

                                                    @marcelloc
                                                    look at this configure error of compiling Kerberos from hand :P

                                                    configure: error: krb5 libs don't have all features required for Active Directory support

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

                                                      Hi,

                                                      I got this on i386 and amd64 - does this help you?

                                                      [2.0.1-RELEASE][admin@pfsense.localdomain]/root(1): kinit
                                                      /libexec/ld-elf.so.1: /usr/local/lib/libkrb5.so: Undefined symbol "add_error_table"
                                                      
                                                      
                                                      1 Reply Last reply Reply Quote 0
                                                      • marcelloc
                                                        marcelloc last edited by

                                                        No, i'll Google for it.  ???

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

                                                        Help a community developer! ;D

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

                                                          put this code into sh script, execute and krb should work:

                                                          #!/bin/sh
                                                          export PACKAGESITE="ftp://ftp-archive.freebsd.org/pub/FreeBSD/releases/i386/i386/9.0-RELEASE/packages/Latest/"
                                                          pkg_add -r krb5-19
                                                          pkg_add -f -r heimdal
                                                          

                                                          krb5-19 you should have, but this is just in case ;)

                                                          now create file:
                                                          vi /etc/krb5.conf

                                                          [libdefaults]
                                                                  default_realm = DOMAIN.NAME
                                                                  dns_lookup_kds = TRUE
                                                                  default_keytab_name = /etc/krb5.keytab
                                                          [domain_realm]
                                                                  .domain.name = DOMAIN.NAME
                                                          [realms]
                                                                  DOMAIN.NAME = {
                                                                    auth_to_local = RULE:[1:$0\$1](^DOMAIN\.NAME\\.*)s/^DOMAIN\.NAME\\//
                                                                    auth_to_local = DEFAULT
                                                          }
                                                          
                                                          

                                                          My name for admin user is: Administrator (maybe other name in you language).
                                                          And now in console:

                                                          $ kinit Administrator@DOMAIN.NAME [don't know why but only upper case for me]
                                                          password: xxxx
                                                          

                                                          and now:

                                                          $ klist
                                                          

                                                          But trully have no idea what next :P
                                                          I've tryin' get ntlm_auth and winbindd to work without samba :P

                                                          trully ntlm_auth use only command from winbind like get_domain_name, so I'm thinking about editing source code :P

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

                                                            export PACKAGESITE="ftp://ftp-archive.freebsd.org/pub/FreeBSD/releases/i386/i386/9.0-RELEASE/packages/Latest/"

                                                            Install freebsd9 packages on 8.1 install could break many dependencies.

                                                            pkg_add -r krb5-19
                                                            pkg_add -f -r heimdal

                                                            kerberos conflicts with heimdal, why do you need both?

                                                            But trully have no idea what next
                                                            I've tryin' get ntlm_auth and winbindd to work without samba

                                                            I know some extra steps, i'll try to find it and post here.

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

                                                            Help a community developer! ;D

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

                                                              I did not found any compile arg to fix Undefined symbol "add_error_table"

                                                              For now, pszafer suggestion works.

                                                              Just fix path for heimdal

                                                              amd64
                                                              pkg-add -r  http://e-sac.siteseguro.ws/packages/amd64/8/All/heimdal-1.4_1.tbz

                                                              i386
                                                              pkg-add -r http://e-sac.siteseguro.ws/packages/8/All/heimdal-1.4_1.tbz

                                                              I'm not sure if it breaks other packages that call krb5.

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

                                                              Help a community developer! ;D

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

                                                                @marcelloc:

                                                                export PACKAGESITE="ftp://ftp-archive.freebsd.org/pub/FreeBSD/releases/i386/i386/9.0-RELEASE/packages/Latest/"

                                                                Install freebsd9 packages on 8.1 install could break many dependencies.

                                                                pkg_add -r krb5-19
                                                                pkg_add -f -r heimdal

                                                                kerberos conflicts with heimdal, why do you need both?

                                                                But trully have no idea what next
                                                                I've tryin' get ntlm_auth and winbindd to work without samba

                                                                I know some extra steps, i'll try to find it and post here.

                                                                it's my mistake. I used 8.1 packages, but only testing 9.0 packages ;)
                                                                Be aware that this operation could cause problems with ldconfig, I had one :P

                                                                if you can give me a hint what to do, because I'm tryin and tryin and I'm become impatient :D

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

                                                                  Updates pkg v1.4.9

                                                                  • Added: Support for second SQL database (failover/loadbalancing)

                                                                  ===============================================================
                                                                  @marcelloc:
                                                                  I noticed a problem with libmysqlclient.so.18 not found after a reboot:

                                                                  What I did:
                                                                  I did a fresh install of pfsense (i386/amd64) and a fresh install of freeradius2.
                                                                  I enabled SQL with MySQL - the service would start if it could find a mysql server.
                                                                  I did a reboot of pfsense and after the reboot the libmysqlclient.so.18 cannot be found. See the following:

                                                                  [2.0.1-RELEASE][admin@pfsense.localdomain]/root(6): ldd /usr/local/lib/freeradius-2.1.12/rlm_sql_mysql.so
                                                                  /usr/local/lib/freeradius-2.1.12/rlm_sql_mysql.so:
                                                                          libmysqlclient.so.18 => not found (0x0)
                                                                          libz.so.5 => /lib/libz.so.5 (0x281b4000)
                                                                          libm.so.5 => /lib/libm.so.5 (0x281c6000)
                                                                          libthr.so.3 => /lib/libthr.so.3 (0x281e0000)
                                                                          libc.so.7 => /lib/libc.so.7 (0x28097000)
                                                                  
                                                                  [2.0.1-RELEASE][admin@pfsense.localdomain]/root(7): find / -name "*libmysqlclient.so.18*"
                                                                  /usr/local/lib/mysql/libmysqlclient.so.18
                                                                  
                                                                  [2.0.1-RELEASE][admin@pfsense.localdomain]/root(8): pkg_info
                                                                  bsdinstaller-2.0.2011.0913 BSD Installer mega-package
                                                                  cyrus-sasl-2.1.25_1 RFC 2222 SASL (Simple Authentication and Security Layer)
                                                                  db41-4.1.25_4       The Berkeley DB package, revision 4.1
                                                                  freeradius-2.1.12   A free RADIUS server implementation
                                                                  gdbm-1.9.1          The GNU database manager
                                                                  gettext-0.18.1.1    GNU gettext package
                                                                  grub-0.97_4         GRand Unified Bootloader
                                                                  krb5-1.9.2_1        An authentication system developed at MIT, successor to Ker
                                                                  libiconv-1.13.1_1   A character set conversion library
                                                                  libltdl-2.4_1       System independent dlopen wrapper
                                                                  mysql-client-5.5.19 Multithreaded SQL database (client)
                                                                  openldap-sasl-client-2.4.26 Open source LDAP client implementation with SASL2 support
                                                                  perl-5.12.4_3       Practical Extraction and Report Language
                                                                  postgresql-client-9.1.2 PostgreSQL database (client)
                                                                  
                                                                  [2.0.1-RELEASE][admin@pfsense.localdomain]/root(9): pkg_add -f http://e-sac.siteseguro.ws/packages/8/All/mysql-client-5.5.19.tbz
                                                                  Fetching http://e-sac.siteseguro.ws/packages/8/All/mysql-client-5.5.19.tbz... Done.
                                                                  
                                                                  [2.0.1-RELEASE][admin@pfsense.localdomain]/root(10): ldd /usr/local/lib/freeradius-2.1.12/rlm_sql_mysql.so
                                                                  /usr/local/lib/freeradius-2.1.12/rlm_sql_mysql.so:
                                                                          libmysqlclient.so.18 => /usr/local/lib/mysql/libmysqlclient.so.18 (0x28300000)
                                                                          libz.so.5 => /lib/libz.so.5 (0x281b4000)
                                                                          libm.so.5 => /lib/libm.so.5 (0x281c6000)
                                                                          libthr.so.3 => /lib/libthr.so.3 (0x281e0000)
                                                                          libc.so.7 => /lib/libc.so.7 (0x28097000)
                                                                          libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28611000)
                                                                          libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x281f5000)
                                                                  

                                                                  As you can see, the file is on the system, the mysqlclient pkg is installed and after I forced a reinstall of mysqlclient the MySQL module is working again - but until a reboot.

                                                                  I tried to work around this following this instruction from freeradius.org page:

                                                                  #
                                                                  # libdir: Where to find the rlm_* modules.
                                                                  #
                                                                  #   This should be automatically set at configuration time.
                                                                  #
                                                                  #   If the server builds and installs, but fails at execution time
                                                                  #   with an 'undefined symbol' error, then you can use the libdir
                                                                  #   directive to work around the problem.
                                                                  #
                                                                  #   The cause is usually that a library has been installed on your
                                                                  #   system in a place where the dynamic linker CANNOT find it.  When
                                                                  #   executing as root (or another user), your personal environment MAY
                                                                  #   be set up to allow the dynamic linker to find the library.  When
                                                                  #   executing as a daemon, FreeRADIUS MAY NOT have the same
                                                                  #   personalized configuration.
                                                                  #
                                                                  #   To work around the problem, find out which library contains that symbol,
                                                                  #   and add the directory containing that library to the end of 'libdir',
                                                                  #   with a colon separating the directory names.  NO spaces are allowed.
                                                                  #
                                                                  #   e.g. libdir = /usr/local/lib:/opt/package/lib
                                                                  #
                                                                  #   You can also try setting the LD_LIBRARY_PATH environment variable
                                                                  #   in a script which starts the server.
                                                                  #
                                                                  #   If that does not work, then you can re-configure and re-build the
                                                                  #   server to NOT use shared libraries, via:
                                                                  #
                                                                  #	./configure --disable-shared
                                                                  #	make
                                                                  #	make install
                                                                  #
                                                                  libdir = @libdir@
                                                                  

                                                                  I added the /usr/local/lib/mysql path to the radiusd.conf but with no luck.

                                                                  There isn't any problem with PostgreSQL, and ldap as well as krb5 are still working after a reboot.

                                                                  I'm sorry I didn't test that some days before when you started compiling. Don't know how to fix that :(

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

                                                                    Ok, I'll take a look.

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

                                                                    Help a community developer! ;D

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

                                                                      @Nachtfalke
                                                                      if you see that library there and it is not seen by ldconfig just run:

                                                                      ldconfig -m /usr/local/lib/mysql/

                                                                      Unfortunately ldconfig doesn't run recursively…

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

                                                                        @pszafer:

                                                                        @Nachtfalke
                                                                        if you see that library there and it is not seen by ldconfig just run:

                                                                        ldconfig -m /usr/local/lib/mysql/

                                                                        Unfortunately ldconfig doesn't run recursively…

                                                                        Thanks! Will try that tomorrow. Will go to bed now to get at least 5h of sleep ;)

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

                                                                          @pszafer:

                                                                          @Nachtfalke
                                                                          if you see that library there and it is not seen by ldconfig just run:

                                                                          ldconfig -m /usr/local/lib/mysql/

                                                                          Unfortunately ldconfig doesn't run recursively…

                                                                          Hi,
                                                                          this worked - unfortunately only until reboot.
                                                                          Is this perhaps of write protection of pfsense ?
                                                                          Or is there a possibility to make this "permanent" ? I don't want to put this into the rc_start_file.

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

                                                                            you need to edit rc.conf file,
                                                                            just type:

                                                                            cat /etc/defaults/rc.conf | grep ldconfig
                                                                            

                                                                            and you should figure out what to do ;)

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

                                                                              You can check and Fix it via freeradius.inc file if you do not whant to change system files

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

                                                                              Help a community developer! ;D

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

                                                                                Updates pkg v1.5.0

                                                                                • Fixed: loading rlm_sql_mysql.so module after reboot (Thanks: pszafer + marcelloc)

                                                                                • Fixed: XMLRPC sync for MACs

                                                                                • Fixed: restart of service when adding MACs

                                                                                • Modfied: handling of cert-managers in GUI

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

                                                                                  @pszafer:

                                                                                  @sandern:

                                                                                  I'm trying to get LDAP working but I'm getting the following output:

                                                                                  
                                                                                    [ldap] ldap_search() failed: Operations error
                                                                                  [ldap] search failed
                                                                                    [ldap] ldap_release_conn: Release Id: 0
                                                                                  ++[ldap] returns fail
                                                                                  Invalid user:  [USER/PASSW]
                                                                                  
                                                                                  

                                                                                  Does anyone know why this is happening? When I manually do an ldap search with another program with the same user I do get a result back.

                                                                                  you didn't give anything about your config, but I'll try guess:

                                                                                  If you have MS AD try to filter:
                                                                                  (sAMAccountName=%{mschap:User-Name})
                                                                                  otherwise maybe:
                                                                                  (uid=%{mschap:User-Name})

                                                                                  I don't know if you have your Identity configured properly, show it for us

                                                                                  Hi,

                                                                                  I googled a little bit around for some of the errors:

                                                                                  Did you:
                                                                                  Enable Active Directory support in LDAP GUI ? You should enable this if there is "operations error".
                                                                                  http://freeradius.1045715.n5.nabble.com/Ldap-search-and-AD-operations-error-td2787134.html

                                                                                  Perhaps try with "ldasearch:

                                                                                  ldapsearch -v -h <ad server=""> -D "cn= <account to="" bind="">dc=ad, dc=hud, dc=ac,
                                                                                  dc=uk"  -w <password> -x -b "dc=ad, dc=hud, dc=ac, dc=uk"
                                                                                  "(sAMAccountName=mytestusername)"</password></account></ad>
                                                                                  

                                                                                  Perhaps it can help if you change

                                                                                  /usr/local/etc/raddb/modules/pap
                                                                                  

                                                                                  and enable this:

                                                                                  auto_header = yes
                                                                                  

                                                                                  Perhaps this mini how-to will help us with kerberos and AD
                                                                                  http://lists.cistron.nl/pipermail/freeradius-devel/2006-January/009250.html

                                                                                  I hope you'll find a solution :D

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

                                                                                    hello, I have PAP fully working (wpa_suplicant get connected to wlan), no lucky with any EAP.
                                                                                    I'm thinking and want to have your opinion, what is better:

                                                                                    • MS-CHAPv2?
                                                                                    • certificates?
                                                                                    • both?

                                                                                    is it possible to get certificates auth working via Kerberos?
                                                                                    I'm thinking I'm misunderstaning how this certificates working ;)

                                                                                    1 Reply Last reply Reply Quote 0
                                                                                    • First post
                                                                                      Last post