0

I configured freeradius with mysql and fortigate when I authorize one user every thing go fine but the radacct table is empty and there is no data was inserted into it I don't know where is the wrong even if I uncommented sql int /etc/freeradius/sites-enabled/default in account , authorize and sesseion section when I run freeradius -X command the result into command line is

Going to the next request

Ready to process requests.

rad_recv: Accounting-Request packet from host 192.168.3.1 port 1029, id=28, length=102

           Acct-Status-Type = Start

        Acct-Session-Id = "0abf623e"

        User-Name = "zaib"

        NAS-Identifier = "ftg"

        Framed-IP-Address = 192.168.3.2

        Fortinet-Client-IP-Address = 192.168.3.2

        Fortinet-Vdom-Name = "root"

        Calling-Station-Id = "192.168.3.2"

        Event-Timestamp = "Jun 19 2017 13:21:57 +03"

        Acct-Delay-Time = 25

Executing section preacct from file /etc/freeradius/sites-enabled/default

+group preacct {

++[preprocess] = ok
[acct_unique] WARNING: Attribute NAS-Port was not found in request, unique ID 

MAY be inconsistent

[acct_unique] Hashing ',NAS-Identifier = "ftg",NAS-IP-Address = 

192.168.3.1,Acct-Session-Id = "0abf623e",User-Name = "zaib"'


[acct_unique] Acct-Unique-Session-ID = "e208d05f34bb9f17".

++[acct_unique] = ok

[suffix] No '@' in User-Name = "zaib", looking up realm NULL

[suffix] No such realm "NULL"

++[suffix] = noop

+} # group preacct = ok

 Executing section accounting from file /etc/freeradius/sites-enabled/default

+group accounting {

[detail]        expand: %{Packet-Src-IP-Address} -> 192.168.3.1

[detail]        expand: /var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-

%{Packet-Src-IPv6-Address}}/detail-%Y%m%d -> 

/var/log/freeradius/radacct/192.168.3.1/detail-20170619


[detail] /var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-

IPv6-Address}}/detail-%Y%m%d expands to 

/var/log/freeradius/radacct/192.168.3.1/detail-20170619

[detail]        expand: %t -> Mon Jun 19 13:21:57 2017

++[detail] = ok

[radutmp]       expand: /var/log/freeradius/radutmp -> 

/var/log/freeradius/radutmp

[radutmp]       expand: %{User-Name} -> zaib

  rlm_radutmp: No NAS-Port seen.  Cannot do anything.

  rlm_radumtp: WARNING: checkrad will probably not work!

++[radutmp] = noop

[sradutmp]      expand: /var/log/freeradius/sradutmp -> 

/var/log/freeradius/sradutmp

[sradutmp]      expand: %{User-Name} -> zaib

  rlm_radutmp: No NAS-Port seen.  Cannot do anything.

  rlm_radumtp: WARNING: checkrad will probably not work!

++[sradutmp] = noop

rlm_checkval: Item Name: Calling-Station-Id, Value: 192.168.3.2

rlm_checkval: Could not find attribute named Calling-Station-Id in check pairs

++[checkval] = notfound

+} # group accounting = notfound

Finished request 12.

Cleaning up request 12 ID 28 with timestamp +59

Going to the next request

1 Answer 1

0

You're not calling the sql module anywhere, so it's not inserting records into your database. edit raddb/sites-available/default, look for the accounting {} section.

Find the call to sql with the hash in front of it # sql. Remove the hash so the line is just sql.

Assuming you've configured the SQL module correctly, the server will now insert accounting records into your database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.