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.
    • Z
      zlyzwy last edited by

      @Nachtfalke

      First I am sorry. I didn't see that you updated your post ;-)
      First it is good that Plain-MAC-Auth is working
      Second:
      Disable Plain-MAC-Auth and put this in "FreeRADIUS -> Users tab"
      Username:  00-02-a5-4e-df-67
      Password:    (The shared secret from Captive Portal below the point "Enable MAC authorization)
      Delete the entry in "FreeRADIUS -> MACs" with this MAC address: 00-02-a5-4e-df-67

      Then it should work.

      I confirm this works.:) Nice~~

      Uuuhh..hmm..I am out of ideas why this is happening. But to make it clear "rlm_radutmp" is containing all clients which are authorized. This is the file which checks for "Simultaneous-Use". You increased the "Simultaneous-Use" - that is what I had told you, too. Check again that there is not a double entry in "MACs" and "Users" with this MAC address: 00-02-a5-4e-df-67.

      I am sure there is only one MAC for one record. I also tried to remove all the record and just put server's MAC to list. The result is the same– only host can access the Internet, vm machine can't.
      I have an idea for this issue, because my host server and VM_debian are actually using one physical network card (VM is directly bridged on host). FreeRadius recognize there are two clients using the same MAC to get passed? Of course, this is only my guess.
      But if this is correct, 'simultaneous connections' should solve the problem if I set the value as '2'.. :(
      I google with the error log, very little information...

      I read about this behaviour on some forum posts. It has something to do with that CP is only changing bandwidth for users which authenticate new. It doesn't change this for existing connections.
      When I tested this at home I found out that you have to enable "Bandwidth Limits" on CP first. You can enter a value but if you set a setting on FreeRADIUS then the value of the CP will be overwritten (that's what we want). And then I am not sure if there is the same bug in this function as with "amount of traffic". The traffic which goes through CP is for example 1MB but accounting will tell RADIUS that there are 6MB. Not sure if this affects Bandwidth Limits in any way, too.
      So I am sorry but I could not tell you where the problem for Bandwidth Limits is. Need to test this more and find out which checkboxes on CP I need to enable and which services needs to be restartet.

      I did a quick test on your point. Basically the 'Bandwidth Limits' in CP works.
      For FreeRadius's bandwidth limits, it does not always override the setting in CP. Usually CP's setting will override FreeRadius.

      I am afraid I have little time today and these testings may not complete.

      In next a couple of days, I can't access my PF box so I will not do any more testing… But I would like to continue this topic later.

      Thanks && have a nice day:)

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

        @zlyzwy

        As far as I know in VMware Workstation you are able to change the MAC address of every interface. So you could try to change/check if all interfaces have different MACs.

        To make sure that freeradius does not have old entries, delete the file:

        rm /var/log/radutmp
        

        Bandwidth Limits:
        I think I cannot do anything against this. freeRADIUS is sending the correct attributes and CP recognizes these attributes but the problem seems to be deeper in the CP code (QoS) and so on. ( I had a very short conversation on mailing-lists about that with ermal).

        We will see :)

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

          Updates pkg v1.5.5:

          • Added/Fixed: We are now able to use the "Amount of Download/Upload/Time" limits as intended. There are some problems between CP and "rlm_acct_unique module in freeradius. I added an option in "FreeRADIUS -> Settings" to disable this module. Then the counter work as they should."

          • Updated: FreeRADIUS documentation (counters)

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

            @Nachtfalke:

            @zlyzwy

            As far as I know in VMware Workstation you are able to change the MAC address of every interface. So you could try to change/check if all interfaces have different MACs.

            To make sure that freeradius does not have old entries, delete the file:

            rm /var/log/radutmp
            

            We will see :)

            @Nachtfalke

            There are two kinds of network connection method in VM : Bridged, NAT and host only.
            I am now using Bridged on host and VM_Debian. Their MACs are:
            Host : 00-02-a5-4e-df-67
            VM_Debian:00-0c-29-ee-88-30
            The host's MAC is also the physical MAC.
            I found the FreeRaius can only accept one client. It will always be the lastest one who refresh the network settings.
            In windows it's

            ipconfig/renew
            

            In Debian it's

            /etc/init.d/networking restart
            

            I changed the debian's MAC to be the same as host, but no lucky.
            Tried to put Debian's MAC to pass list, no lucky…

            I am running out of idea for this issue... I have the feeling this should be the problem of FreeRadius not CP.
            I am ready to post this question to FreeRadius Mail list...This is the only free support method I found for FreeRadius...
            (I may need to mention this topic in the mail. Will that bring you any inconvenience?)

            About bandwidth, I think I may try to do it in Firewall. But just thinking about it....

            BTW: I tried to configure the PF in remote, it seems to be as good as local..

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

              You can post your question where you want and you can point to this thread if you want. I do not have a problem with that.
              But I do not think that RADIUS is the problem. The RADIUS is only doing what the NAS (CP) is telling.

              The problem could be perhaps the NAS Port sent in the Access-Request. If both Access-Request do have the same attribute-values.
              Try radiusd in debug mode  (radiusd -X) and compare the Access-Request when connection with one and then with the other VM.

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

                @Nachtfalke:

                You can post your question where you want and you can point to this thread if you want. I do not have a problem with that.
                But I do not think that RADIUS is the problem. The RADIUS is only doing what the NAS (CP) is telling.

                I think you are right. It's not the problem of FreeRadius. I change the auth method to local database. The error is the same. I am sorry I was wrong.
                Even I sent mail to FreeRadius list, they don't think it's about VM and it should be something about PF.

                The problem could be perhaps the NAS Port sent in the Access-Request. If both Access-Request do have the same attribute-values.
                Try radiusd in debug mode  (radiusd -X) and compare the Access-Request when connection with one and then with the other VM.

                In fact, I can't control who between VM and host will login successful first. Once it was working with refresh the network interface but I just tried several times. It doesn't work.

                I am going to post this question in CP and hope there is some solution for this..

                Many thanks for your help!

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

                  hi,
                  i have a problem, i have pfsense that have:
                  LAN card(172.16.0.1) with DHCP turned on(172.16.3.1-172.16.6.250), where PC-s are connected.
                  WAN conenction, configurated as pppoe(dynamic IP)
                  from packadges there are:
                  squid
                  lightsquid
                  ntop
                  freeradius2

                  i did everything by this video:
                  http://www.youtube.com/watch?v=B6Hjxd1Af-s

                  in freeradius2:
                  for Client IP Address i put my LAN card address(172.16.0.1)
                  for Client IP Address (for port 1812,1813) i put also my LAN card address

                  in captive portal:
                  Primary RADIUS server IP address i put 172.16.0.1
                  RADIUS NAS IP attribute also 172.16.0.1

                  but every time when i tried to authentificate by username and password i gave, authentification
                  page appears again.

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

                    @filip_pag:

                    hi,
                    i have a problem, i have pfsense that have:
                    LAN card(172.16.0.1) with DHCP turned on(172.16.3.1-172.16.6.250), where PC-s are connected.
                    WAN conenction, configurated as pppoe(dynamic IP)
                    from packadges there are:
                    squid
                    lightsquid
                    ntop
                    freeradius2

                    i did everything by this video:
                    http://www.youtube.com/watch?v=B6Hjxd1Af-s

                    in freeradius2:
                    for Client IP Address i put my LAN card address(172.16.0.1)
                    for Client IP Address (for port 1812,1813) i put also my LAN card address

                    in captive portal:
                    Primary RADIUS server IP address i put 172.16.0.1
                    RADIUS NAS IP attribute also 172.16.0.1

                    but every time when i tried to authentificate by username and password i gave, authentification
                    page appears again.

                    Hi,

                    that is no problem of freeradius.
                    Check System Logs and make sure that thre is "Login OK" for the username. Then authentication from CP user is working.

                    The redirection problm is another one - as far as i know. Try this:
                    Configure DHCP on LAN interface.
                    DNS Server is pfsense LAN interface (172.16.0.1). The client must use this DNS as first DNS.

                    If this doesn't work search the forum for captivportal and redirection

                    1 Reply Last reply Reply Quote 0
                    • O
                      osvaldotcf last edited by

                      Auth with EAP (TLS + TTLS) with dynamic VLAN

                      I wonder if this is the case for configure a specific VLAN to a specific IP that would be passed from freeradius for a NAS with a encryted conection using AES.

                      Is there any test?

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

                        @osvaldotcf:

                        Auth with EAP (TLS + TTLS) with dynamic VLAN
                        (…)

                        I think you found this in the pfsense docs, right ?

                        It means that a Client which is connected with EAP-TLS or EAP-TTLS will be put in a specific VLAN which RADIUS tells it.
                        VLAN attributes can be sent from FreeRADIUS - that is working - but when using TLS or TTLS than we need to send the reply attribute tunneled. This can be configured via "FreeRADIUS -> EAP" on GUI.
                        In general this should work - but I could not test this till now.

                        Dynamic VLAN assignment for the NAS does mean that the NAS gets the VLAN attributes from the RADIUS server and than changes the state of the port on NAS. This must be supported by the NAS.

                        I hope this is what you asked !?

                        1 Reply Last reply Reply Quote 0
                        • O
                          osvaldotcf last edited by

                          Thank you.
                          I set up a test environment.

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

                            Updates pkg v1.5.6:

                            • Fixed: typos in description (interfaces, users, macs)

                            • Fixed: syntax error in additional check-items (users,macs)

                            • Added: GUI TLS support for LDAP

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

                              in freeradius2,

                              can i form groups and add users into groups and create groups rules?  :D
                              and how to bind user to mac address?

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

                                @filip_pag:

                                in freeradius2,

                                can i form groups and add users into groups and create groups rules?  :D

                                This isn't possible from GUI at the moment. And I don't know if groups can be build without any SQL database. In SQL you can create a group and put users into this group.

                                Then you can add the following as "Additional RADIUS Attributes on the TOP of this entry":

                                DEFAULT Group == "disabled", Auth-Type := Reject
                                

                                DEFAULT Group == "disabled": matches all users in the group "disabled"
                                Auth-Type := Reject: sets auth-type to reject and so rejects all users in this group.
                                You can work with:

                                Fall-Through = yes
                                

                                If other attributes should be assigned like VLAN and so on. But this isn't easy to handle from GUI so it would be perhaps easier to configure all attributes for every user.

                                http://wiki.freeradius.org/FAQ#How+do+I+deny+access+to+a+specific+user%2C+or+group+of+users%3F

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

                                  @Nachtfalke

                                  coming back to AD with PAP
                                  for me it is only one thing to change against webgui:
                                  /usr/local/etc/raddb/sites-enabled/default:

                                  authenticate
                                  {
                                          Auth-Type LDAP {
                                                          ldap
                                          }
                                  }

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

                                    @pszafer:

                                    @Nachtfalke

                                    coming back to AD with PAP
                                    for me it is only one thing to change against webgui:
                                    /usr/local/etc/raddb/sites-enabled/default:

                                    authenticate
                                    {
                                           Auth-Type LDAP {
                                                           ldap
                                           }
                                    }

                                    I am not familar with AD or LDAP so perhaps it is possible for you to give the example - using the pfsense web GUI (Screenshot) or something else how you configured it for your domain  :P
                                    So that we know what you filled out for "Base DN" and so on  ::)

                                    PS: Which samba package do we need ? Which version ? Link to freebsd ftp ?
                                    I am thinking about to make a possibility to install samba and configure it this was but not installing samba by default when installing freeradius2 package.

                                    1 Reply Last reply Reply Quote 0
                                    • H
                                      Hermel last edited by

                                      Hi Nachtfalke,

                                      I am using the pfSense on an embedded device (ALIX board).
                                      After system boot the file system (/) is mounted as read only.
                                      When starting the freeradius server it reports following error mesages:

                                      Jan 26 20:38:50 radiusd[53305]: /usr/local/etc/raddb/modules/counter[71]: Instantiation failed for module "daily"
                                      Jan 26 20:38:50 radiusd[53305]: /usr/local/etc/raddb/modules/counter[71]: Instantiation failed for module "daily"
                                      Jan 26 20:38:50 radiusd[53305]: rlm_counter: Failed to open file /usr/local/etc/raddb/db.daily: Read-only file system
                                      Jan 26 20:38:50 radiusd[53305]: rlm_counter: Failed to open file /usr/local/etc/raddb/db.daily: Read-only file system

                                      Do you think it is possible to locate these file within the /var/.. or /tmp/…  folder.
                                      These folders are RAM drives (/dev/md[0|1]) which are mounted as read-write after system boot.
                                      Could you be so kind to locate also other runtime/temporal files in these folders?

                                      Thanks a lot & best wishes
                                      Hermel

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

                                        @Hermel:

                                        Hi Nachtfalke,

                                        I am using the pfSense on an embedded device (ALIX board).
                                        After system boot the file system (/) is mounted as read only.
                                        When starting the freeradius server it reports following error mesages:

                                        Jan 26 20:38:50 radiusd[53305]: /usr/local/etc/raddb/modules/counter[71]: Instantiation failed for module "daily"
                                        Jan 26 20:38:50 radiusd[53305]: /usr/local/etc/raddb/modules/counter[71]: Instantiation failed for module "daily"
                                        Jan 26 20:38:50 radiusd[53305]: rlm_counter: Failed to open file /usr/local/etc/raddb/db.daily: Read-only file system
                                        Jan 26 20:38:50 radiusd[53305]: rlm_counter: Failed to open file /usr/local/etc/raddb/db.daily: Read-only file system

                                        Do you think it is possible to locate these file within the /var/.. or /tmp/…  folder.
                                        These folders are RAM drives (/dev/md[0|1]) which are mounted as read-write after system boot.
                                        Could you be so kind to locate also other runtime/temporal files in these folders?

                                        Thanks a lot & best wishes
                                        Hermel

                                        Hi Hermel,

                                        I am not using an embedded device. Do you know if it is possible to installe pfsense embedded in a VM ?
                                        If there is a way to virtualize this than I could spent some time on doing and testing this. Don't know how much work this will be.

                                        The "db.daily" is a database and needs to be persistent after a reboot.

                                        You can test and edit freeradius.inc starting at line 2544 - 2674:

                                        /usr/local/pkg/freeradius.inc
                                        

                                        original:

                                        counter daily {
                                        	filename = \${raddbdir}/db.daily
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = daily
                                        	counter-name = Daily-Session-Time
                                        	check-name = Max-Daily-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter weekly {
                                        	filename = \${raddbdir}/db.weekly
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = weekly
                                        	counter-name = Weekly-Session-Time
                                        	check-name = Max-Weekly-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter monthly {
                                        	filename = \${raddbdir}/db.monthly
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = monthly
                                        	counter-name = Monthly-Session-Time
                                        	check-name = Max-Monthly-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter forever {
                                        	filename = \${raddbdir}/db.forever
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = never
                                        	counter-name = Forever-Session-Time
                                        	check-name = Max-Forever-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxdailyupload {
                                        	filename = \${raddbdir}/db.maxdailyupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = daily
                                        	counter-name = Daily-Input-Octets
                                        	check-name = Max-Daily-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxdailydownload {
                                        	filename = \${raddbdir}/db.maxdailydownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = daily
                                        	counter-name = Daily-Output-Octets
                                        	check-name = Max-Daily-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxweeklyupload {
                                        	filename = \${raddbdir}/db.maxweeklyupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = weekly
                                        	counter-name = Weekly-Input-Octets
                                        	check-name = Max-Weekly-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxweeklydownload {
                                        	filename = \${raddbdir}/db.maxweeklydownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = weekly
                                        	counter-name = Weekly-Output-Octets
                                        	check-name = Max-Weekly-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxmonthlyupload {
                                        	filename = \${raddbdir}/db.maxmonthlyupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = monthly
                                        	counter-name = Monthly-Input-Octets
                                        	check-name = Max-Monthly-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxmonthlydownload {
                                        	filename = \${raddbdir}/db.maxmonthlydownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = monthly
                                        	counter-name = Monthly-Output-Octets
                                        	check-name = Max-Monthly-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxupload {
                                        	filename = \${raddbdir}/db.maxforeverupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = never
                                        	counter-name = Forever-Input-Octets
                                        	check-name = Max-Forever-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxdownload {
                                        	filename = \${raddbdir}/db.maxforeverdownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = never
                                        	counter-name = Forever-Output-Octets
                                        	check-name = Max-Forever-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        

                                        this will save the db.daily and the other dbs in /tmp

                                        counter daily {
                                        	filename = /tmp/db.daily
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = daily
                                        	counter-name = Daily-Session-Time
                                        	check-name = Max-Daily-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter weekly {
                                        	filename = /tmp/db.weekly
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = weekly
                                        	counter-name = Weekly-Session-Time
                                        	check-name = Max-Weekly-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter monthly {
                                        	filename = /tmp/db.monthly
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = monthly
                                        	counter-name = Monthly-Session-Time
                                        	check-name = Max-Monthly-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter forever {
                                        	filename = /tmp/db.forever
                                        	key = User-Name
                                        	count-attribute = Acct-Session-Time
                                        	reset = never
                                        	counter-name = Forever-Session-Time
                                        	check-name = Max-Forever-Session
                                        	reply-name = Session-Timeout
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxdailyupload {
                                        	filename = /tmp/db.maxdailyupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = daily
                                        	counter-name = Daily-Input-Octets
                                        	check-name = Max-Daily-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxdailydownload {
                                        	filename = /tmp/db.maxdailydownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = daily
                                        	counter-name = Daily-Output-Octets
                                        	check-name = Max-Daily-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxweeklyupload {
                                        	filename = /tmp/db.maxweeklyupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = weekly
                                        	counter-name = Weekly-Input-Octets
                                        	check-name = Max-Weekly-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxweeklydownload {
                                        	filename = /tmp/db.maxweeklydownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = weekly
                                        	counter-name = Weekly-Output-Octets
                                        	check-name = Max-Weekly-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxmonthlyupload {
                                        	filename = /tmp/db.maxmonthlyupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = monthly
                                        	counter-name = Monthly-Input-Octets
                                        	check-name = Max-Monthly-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxmonthlydownload {
                                        	filename = /tmp/db.maxmonthlydownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = monthly
                                        	counter-name = Monthly-Output-Octets
                                        	check-name = Max-Monthly-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxupload {
                                        	filename = /tmp/db.maxforeverupload
                                        	key = User-Name
                                        	count-attribute = Acct-Input-Octets
                                        	reset = never
                                        	counter-name = Forever-Input-Octets
                                        	check-name = Max-Forever-Input
                                        	reply-name = Acct-Input-Octets
                                        	cache-size = 5000
                                        }
                                        
                                        counter maxdownload {
                                        	filename = /tmp/db.maxforeverdownload
                                        	key = User-Name
                                        	count-attribute = Acct-Output-Octets
                                        	reset = never
                                        	counter-name = Forever-Output-Octets
                                        	check-name = Max-Forever-Output
                                        	reply-name = Acct-Output-Octets
                                        	cache-size = 5000
                                        }
                                        

                                        Give it a try.

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

                                          i want to limit bandwith for one user, I enter bandwith limit(upload&downlaod) for
                                          user account but it isnt working, I tried also for MAC address but it dont work, do I
                                          have to enable some rule or?

                                          1 Reply Last reply Reply Quote 0
                                          • H
                                            Hermel last edited by

                                            Hi Nachtfalke,

                                            I have tested the changes you proposed and after a reboot, the server has the status "running"

                                            But root (/) is not mounted as read only.
                                            I currently do not know why.
                                            The only log entries which could relate on this topic are:

                                            Jan 27 00:55:32 php: : freeRADIUS: Switched to pfSense Cert-Manager. Creating new DH and random file in /usr/local/etc/raddb/certs
                                            Jan 27 00:55:29 php: : FreeRADIUS: Restoring the original file from /usr/local/etc/raddb/policy.conf.backup and /usr/local/etc/raddb/files.backup
                                            Jan 27 00:55:28 php: : FreeRADIUS: Restoring the original file from /usr/local/etc/raddb/policy.conf.backup and /usr/local/etc/raddb/files.backup

                                            But today it is too late to make a more detailed analysis and at the weekend I will not be at home, thus I have to shift this topic to next week.

                                            However finally I would like to reply to your comments/questions:

                                            I am not using an embedded device. Do you know if it is possible to installe pfsense embedded in a VM ?
                                            So far as I know this is not possible.

                                            The "db.daily" is a database and needs to be persistent after a reboot.
                                            Well if my understanding is corret, then the files have to be stored at shutdown and restored at boot.
                                            This may be quite complex … I am open minded to support you at the development - also if I do not have too much time.

                                            Have a good time
                                            Hermel

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

                                              Updates pkg v1.5.6:

                                              • fixed: a bug when the shortname of a NAS contains whitespace(s).

                                              • Updated FreeRADIUS 2.x package documentation (FreeRADIUS + CaptivePortal - hints)

                                              ================================================================
                                              @Hermel:

                                              Hi Nachtfalke,

                                              I have tested the changes you proposed and after a reboot, the server has the status "running"

                                              But root (/) is not mounted as read only.
                                              I currently do not know why.
                                              The only log entries which could relate on this topic are:

                                              Jan 27 00:55:32 php: : freeRADIUS: Switched to pfSense Cert-Manager. Creating new DH and random file in /usr/local/etc/raddb/certs
                                              Jan 27 00:55:29 php: : FreeRADIUS: Restoring the original file from /usr/local/etc/raddb/policy.conf.backup and /usr/local/etc/raddb/files.backup
                                              Jan 27 00:55:28 php: : FreeRADIUS: Restoring the original file from /usr/local/etc/raddb/policy.conf.backup and /usr/local/etc/raddb/files.backup

                                              But today it is too late to make a more detailed analysis and at the weekend I will not be at home, thus I have to shift this topic to next week.

                                              However finally I would like to reply to your comments/questions:

                                              I am not using an embedded device. Do you know if it is possible to installe pfsense embedded in a VM ?
                                              So far as I know this is not possible.

                                              The "db.daily" is a database and needs to be persistent after a reboot.
                                              Well if my understanding is corret, then the files have to be stored at shutdown and restored at boot.
                                              This may be quite complex … I am open minded to support you at the development - also if I do not have too much time.

                                              Have a good time
                                              Hermel

                                              Hi Hermel,

                                              Jan 27 00:55:32 	php: : freeRADIUS: Switched to pfSense Cert-Manager. Creating new DH and random file in /usr/local/etc/raddb/certs
                                              

                                              This error ist related on the certificates which are located in /usr/local/etc/raddb/certs/
                                              So it wouldn't be possible to create and import new certs to freeradius2 because the directory is write-protected. We only need write access if we store there the new certs after this it is ok for "read-only". I think I can fix this idependent from pfsense version (embedded or install).

                                              Jan 27 00:55:29 	php: : FreeRADIUS: Restoring the original file from /usr/local/etc/raddb/policy.conf.backup and /usr/local/etc/raddb/files.backup
                                              Jan 27 00:55:28 	php: : FreeRADIUS: Restoring the original file from /usr/local/etc/raddb/policy.conf.backup and /usr/local/etc/raddb/files.backup
                                              

                                              This error is related to the fact that you can switch between the "normal" 802.1X auth (default) or the possibility to enable "Plain-MAC-Auth" in "Settings". I made this because I do not know if there are site-effects when enabling this but as far as I can see that there is no problem. So there shouldn't be a problem for embedded devices.

                                              On weekend I will give thought to this and try to find a solution.

                                              But the basic features of freeradius2 should work so give it some more tests if you found time and post problems.

                                              @filip_pag

                                              i want to limit bandwith for one user, I enter bandwith limit(upload&downlaod) for
                                              user account but it isnt working, I tried also for MAC address but it dont work, do I
                                              have to enable some rule or?

                                              Bandwidth-Limit needs - as most of the settings - support of your NAS. The NAS can be your switch, access-point or pfSense Captive Portal.
                                              The attributes the NAS must understand are the following:

                                              WISPr-Bandwidth-Max-Up
                                              WISPr-Bandwidth-Max-Down
                                              

                                              Check your NAS documentation or post the NAS then we perhaps can find out how to handle this.

                                              When using Captive Portal on pfSense then take a look here:
                                              http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package#Amount_of_Bandwidth

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

                                                @Nachtfalke:

                                                @filip_pag

                                                i want to limit bandwith for one user, I enter bandwith limit(upload&downlaod) for
                                                user account but it isnt working, I tried also for MAC address but it dont work, do I
                                                have to enable some rule or?

                                                Bandwidth-Limit needs - as most of the settings - support of your NAS. The NAS can be your switch, access-point or pfSense Captive Portal.
                                                The attributes the NAS must understand are the following:

                                                WISPr-Bandwidth-Max-Up
                                                WISPr-Bandwidth-Max-Down
                                                

                                                Check your NAS documentation or post the NAS then we perhaps can find out how to handle this.

                                                When using Captive Portal on pfSense then take a look here:
                                                http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package#Amount_of_Bandwidth

                                                hm, do I have to put just this in CP index?

                                                count-attribute = WISPr-Bandwidth-Max-Down
                                                count-attribute = WISPr-Bandwidth-Max-Up

                                                this is my index code

                                                
                                                <title>Welcome to network</title>
                                                
                                                <form method="post" action="$PORTAL_ACTION$">
                                                
                                                		 **![](captiveportal-header.png)
                                                
                                                		![](captiveportal-network_logo.png)** Welcome to network wirelless.
                                                
                                                		Username i password "free"
                                                
                                                		Username i passwordticket / Voucher **Username**
                                                
                                                		**Password**
                                                
                                                		**Ticket / Voucher**
                                                
                                                		for assistence write to:
                                                		 [network@mail.com](mailto:network@mail.com)
                                                
                                                		![](captiveportal-ios_ikone.png)
                                                
                                                		![](captiveportal-Centar.png)
                                                
                                                		network © 2012 ł Design by networkł Powered by 
                                                		pfSense
                                                
                                                </form>
                                                
                                                
                                                1 Reply Last reply Reply Quote 0
                                                • N
                                                  Nachtfalke last edited by

                                                  The attributes in my documentation are only to show which attributes are needed for this to work. If the NAS does not support these attributes than bandwidth limit will not work. But Captive Portal can do this.

                                                  What you have to do is:

                                                  Go to:
                                                  SERVICES => CAPTIVE PORTAL
                                                  scroll down and enable "Per-user bandwidth restriction"
                                                  leave bothe fields empty (so all users have unlimited bandwidth).

                                                  Go to:
                                                  SERVICES => FreeRADIUS => USERS
                                                  there you create all users you want. For the one user you want to limit its bandwidth scroll down to:
                                                  "Maximum Download Bandwidth" and "Maximum Upload Bandwidth".
                                                  There you have to enter the bandwidth limit for the user.
                                                  Important: You have to enter "BIT per second"….8Bit = 1Byte and 1024Byte = 1Kilobyte

                                                  After you have changed bandwidth limits for a user AND this user is connected while you changed the settings than the will not take effect. So make sure that you disconnect the user after you made changes so that the user needs to reconnect.

                                                  PS: Not sure if it works 100% because there seems to be a bug in CP and/or ipfw which counts sometimes different. For example when using "Amount of traffic" then if in real 1MB passes CP than CP sends back 6MB to the RADIUS server.

                                                  So do some tests and try to find out how it works.

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

                                                    I've done all you saied ant got this with radtest:

                                                    $ radtest test test 172.16.0.1:1812 0 ldskfjldskdfjslkf4
                                                    Sending Access-Request of id 16 to 172.16.0.1 port 1812
                                                    User-Name = "test"
                                                    User-Password = "test"
                                                    NAS-IP-Address = 172.16.0.1
                                                    NAS-Port = 0
                                                    Message-Authenticator = 0x00000000000000000000000000000000
                                                    rad_recv: Access-Accept packet from host 172.16.0.1 port 1812, id=16, length=44
                                                    WISPr-Bandwidth-Max-Up = 81920
                                                    WISPr-Bandwidth-Max-Down = 819200

                                                    is that OK?

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

                                                      @filip_pag:

                                                      I've done all you saied ant got this with radtest:

                                                      $ radtest test test 172.16.0.1:1812 0 ldskfjldskdfjslkf4
                                                      Sending Access-Request of id 16 to 172.16.0.1 port 1812
                                                      User-Name = "test"
                                                      User-Password = "test"
                                                      NAS-IP-Address = 172.16.0.1
                                                      NAS-Port = 0
                                                      Message-Authenticator = 0x00000000000000000000000000000000
                                                      rad_recv: Access-Accept packet from host 172.16.0.1 port 1812, id=16, length=44
                                                      WISPr-Bandwidth-Max-Up = 81920
                                                      WISPr-Bandwidth-Max-Down = 819200

                                                      is that OK?

                                                      Yes it is.

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

                                                        Updates pkg v1.5.7:

                                                        • Added: checks for CA, certs when using EAP-TLS

                                                        • Added: ability to export certs in .p12 format which can be used on windows systems when using EAP-TLS

                                                        • Fixed: a bug when NAS shortname contains whitespace(s)

                                                        • I will update FreeRADIUS 2.x package documentation: How-to for EAP-TLS (LAN), EAP-PEAP (LAN), match common name, match issuer

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

                                                          Hi Nachtfalke,

                                                          I've received a patch from freeradius maintainer to compile it with heimdal instead of krb5.

                                                          I'll test compiling it but as usual I need help on testing.

                                                          :)

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

                                                          Help a community developer! ;D

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

                                                            @marcelloc:

                                                            Hi Nachtfalke,

                                                            I've received a patch from freeradius mainteinet to compile it with heimdal instead of krb5.

                                                            I'll test compiling it but as usual I need help on testing.

                                                            :)

                                                            Of course I'll do that :)

                                                            But help me - I forgot it - what will heimdal improve/change instead of using kerberos ?  ???

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

                                                              @Nachtfalke:

                                                              what will heimdal improve/change instead of using kerberos ?  ???

                                                              Some pages ago, to get kerberos working, we need to force heimdal(A popular BSD-licensed implementation of Kerberos 5) package install.

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

                                                              Help a community developer! ;D

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

                                                                @Nachtfalke

                                                                The issue about VM is not woking with CP. I think I had found a solution here.

                                                                In the past, VM is running a Debian and I assigned the IP in manual.

                                                                allow-hotplug eth0
                                                                iface eth0 inet static
                                                                address 192.168.1.25
                                                                netmask 255.255.255.0
                                                                gateway 192.168.1.1
                                                                
                                                                

                                                                Today, I tired to let Debian get the IP from PF's DHCP and then add its MAC to pass list.

                                                                auto lo eth0
                                                                iface lo inet loopback
                                                                iface eth0 inet dhcp
                                                                

                                                                Then it works. Both the host and VM can access the Internet without any trouble.

                                                                I will do some further testing later and post the result here.
                                                                ;)

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

                                                                  @zlyzwy

                                                                  Thanky for feedback and nice to hear that :D
                                                                  But we both thought that it probably would be a problem of VMware/interfaces and not directly CP and/or freeradius2.

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

                                                                    Updates pkg v1.5.8:

                                                                    • Added: option to disable weak EAP types for authentication

                                                                    • Added: some checks if it is really neccessary to create new DH and random file

                                                                    • Fixed: description in EAP

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

                                                                      @Nachtfalke

                                                                      I double checked that the CP is now working with VM and host. :)

                                                                      There is only one condition : use pass-through MAC in CP

                                                                      If I tried the RADIUS MAC authentication (MAC as username;share secret as password), it will not work..

                                                                      It's not a big trouble for me because I just wanna to add a few MACs to pass list, and I don't need to manage them with FreeRadius.

                                                                      Furthermore I did some other basic testing, they all seems to be no problem.
                                                                      I created the test user in FreeRadius, it's woking properly.
                                                                      I created the Vouchers in CP and it will work, FreeRadius will also log it. Great.
                                                                      (note: I found if I need to use Vouchers , I must disable 'Reauthenticate connected users every minute'. Otherwise the client will have to input the code every minute)

                                                                      I will go online this hotspot soon and give a feed here.

                                                                      Great thanks for your help and the package~

                                                                      1 Reply Last reply Reply Quote 0
                                                                      • V
                                                                        valshare last edited by

                                                                        Hi,

                                                                        can´t update to latest package:

                                                                        
                                                                        Checking for package installation... 
                                                                         Downloading http://e-sac.siteseguro.ws/packages/8/All/freeradius-2.1.12.tbz ...  could not download from there or http://ftp2.FreeBSD.org/pub/FreeBSD/ports/i386/packages-8.1-release/All/freeradius-2.1.12.tbz.
                                                                        of freeradius-2.1.12 failed!
                                                                        
                                                                        

                                                                        Regards, Valle

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

                                                                          @valshare:

                                                                          Hi,

                                                                          can´t update to latest package:

                                                                          
                                                                          Checking for package installation... 
                                                                           Downloading http://e-sac.siteseguro.ws/packages/8/All/freeradius-2.1.12.tbz ...  could not download from there or http://ftp2.FreeBSD.org/pub/FreeBSD/ports/i386/packages-8.1-release/All/freeradius-2.1.12.tbz.
                                                                          of freeradius-2.1.12 failed!
                                                                          
                                                                          

                                                                          Regards, Valle

                                                                          I'll contact my administrator marcelloc that he should fix his server problem  :P

                                                                          1 Reply Last reply Reply Quote 0
                                                                          • B
                                                                            blasterreal last edited by

                                                                            @valshare:

                                                                            Hi,

                                                                            can´t update to latest package:

                                                                            
                                                                            Checking for package installation... 
                                                                             Downloading http://e-sac.siteseguro.ws/packages/8/All/freeradius-2.1.12.tbz ...  could not download from there or http://ftp2.FreeBSD.org/pub/FreeBSD/ports/i386/packages-8.1-release/All/freeradius-2.1.12.tbz.
                                                                            of freeradius-2.1.12 failed!
                                                                            
                                                                            

                                                                            Regards, Valle

                                                                            The same problem goes for me…
                                                                            I hope that improves as soon as possible

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

                                                                              Sorry guys,

                                                                              Just contacted my provider, they are fixing it right now.

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

                                                                              Help a community developer! ;D

                                                                              1 Reply Last reply Reply Quote 0
                                                                              • V
                                                                                valshare last edited by

                                                                                working again. Thanx!

                                                                                1 Reply Last reply Reply Quote 0
                                                                                • E
                                                                                  eri-- last edited by

                                                                                  Why do you use your own site to host things marcelloc?

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

                                                                                    ermal,

                                                                                    Freeradius2 conflicts with current compiled version available on files.pfsense.org.

                                                                                    We are also testing many different package compilations until whe find a final solution to publish on files.pfsense.org.(asterisk, dansguardian, subversion,…)
                                                                                    Also there are some missing libs to get cyrus-sasl working to(You helped me diagnosing it on postfix thread).

                                                                                    But, if I can have a folder on files.pfsense.org I can publish these packages there ;D

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

                                                                                    Help a community developer! ;D

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