Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In the  FreeRADIUS users file /etc/raddb/users, replace <your_username> and <your_password> with a RADIUS username and password.

    1. <your_username> Auth-Type:=Local, User-Password==<"your_password">

    2. Fall-Through = No

  2. Verify the DEFAULT Authorization Type is Reject. Edit the FreeRadius users file /etc/raddb/users. Add the following line at the end of the file, if missing

    1. # IF NOTHING ELSE MATCHES, REJECT USER

    2. DEFAULT Auth-Type:= Reject

  3. For Free Radius 2.x Series, modify the Detail File Rollover Interval /etc/raddb/radiusd.conf file. This is required for users with high call rates as the details file could reach the max file size in < 24 hours. This can cause incoming calls to be blocked and additional CDR records to not be logged.

    1. Look for the following line around line 1030 (~ half way through file):
      # Write a detailed log of all accounting records received

    2. Look for the following line around line 1056:
      detailfile =”,
      At the end of this line add the %H to have the log files roll over every hour.

  4. For Free Radius 3.0.x Series, Modify the /etc/raddb/mods-enabled/detail file, look for "filename" and add :%H, This will create a new detail file for every hour.

    1. filename = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d:%H

  5. Add access for each IMG 2020 by editing the clients.conf file located in the /etc/raddb directory. If there are multiple IMG 2020s, the username should be different for each

    1. shortname = The username configured in the RADIUS users file and Web GUI. A unique username is recommended for each IMG 2020.username
      secret = A password that you choose for each IMG 2020 that is used in the Web GUI Radius Server Authentication & Accounting configuration. Key used to encrypt sensitive account information transmitted between the IMG 2020 and the RADIUS server.
      Password = The RADIUS password configured in the RADIUS users file and Web GUI:

    2. Example:
      client 10.129.44.240 {
      secret = server_secret
      shortname = your_username
      password = your_password }

  6. Copy the dictionary.dialogic file to the /usr/share/freeradius directory. In the /usr/share/freeradius/ folder, edit the dictionary file and add the following include line. If required, the dictionary.dialogic file can be downloaded from Sangoma BBS (Bulletin Board System) http://excelbbs.sangoma.com. The dictionary.dialogic file is zipped up in a file labeled bdn2020_ver230_supplement_files.zip. Refer to the RADIUS Overview topic for further information on downloading the dictionary.dialogic file.

    1. $INCLUDE dictionary.dialogic  

  7. Start the Radius service by entering the following command:

    1. For Red Hat Linux:
      $service radiusd restart

    2. For CentOs Linux:
      $systemctl restart radiusd.service

  8. Set the Radius service to restart when the system restarts:

    1. For RedHat Linux:
      $chkconfig radiusd on

    2. For CentOS Linux:
      $systemctl enable radiusd.service

  9. In the WeGUI, Configure a RADIUS Client and RADIUS Server on the IMG 2020.
    See Configure RADIUS

  10. Verify CDRs are being generated. 

    1. By default the files will roll over once a day. 

    2. Follow the instructions in step 3 to roll the log files over once an hour. 

    3. CDRs stored at: /var/log/radius/radacct/<IMG_IP>. 

    4. The file names are: detail-YYYYMMDDHH and detail-2005081801

  11. Archive & delete CDR detail files.

  12. In the /var/log/radius/radacct folder create a script to archive files. Name the file CDR.
    #!/bin/sh
    #  CDR
    #       Sample script to archive CDR's.
    #       Files are archived if more than 1 days old
    #       Files are deleted if more than 31 days old
    find /var/log/radius/radacct/*/detail* -mtime +1 -exec gzip {} \;
    find /var/log/radius/radacct/*/detail* -mtime +31 -exec rm -f {} \;

  13. Create a cron task to run this script. This cron task can be run hourly or daily. The example below will run it hourly.
    #!/bin/bash
    crontab<<EOF
    #cron.dat-cdr - cron file for CDR's
    #
    # This script restarts the CDR log files each hour.
    0 * * * * /var/log/radius/radacct/CDR
    #
    EOF

  14. After creating this script, either restart the cron service or restart the server. 

    1. In the /etc/cron.hourly folder, create a file to run the script created in the previous step.

...