Accounting copying to specific systems

Joe Maimon jmaimon at ttec.com
Thu Sep 24 19:07:44 CEST 2009



Alan DeKok wrote:
> Joe Maimon wrote:
>> Would that be this freeradius internal attribute?
>>
>> Home-Server-Pool
> 
>   It's used to proxy requests to a home server pool, without involving
> realms.
> 
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


It doesnt work with Home-Server-Pool, but it does work with Proxy-To-Realm.

Server is built from git-stable-20090923

Also, I havent been able to figure out how to get unlang to do the job 
here. Server wont even start with my attempt.

Expected comparison at: =*
/etc/freeradius/sites-enabled/copy-acct-to-noc03-8e6[9]: Errors parsing 
preacct section

Currently I am using the rlm_policy language.

I would appreciate any suggestions, tips and advice.

Thank you for all your help.

Joe


Here is my semi-finished product:

radiusd.conf:
=============

         detail detail-copy-noc03-8e6 {

                 detailfile = ${radacctdir}/detail-reader/noc03-8e6.log
                 detailperm = 0600
                 header = "%t"
         }

         policy policy-copy-acct-to-noc03-8e6 {

                 filename = ${confdir}/policy-copy-acct-to-noc03-8e6.txt

         }

proxy.conf:
===========

home_server noc03-8e6 {

         type = acct
         ipaddr = xx.yy.53.10
         secret = test
         src_ipaddr = ${local_address}
         port = 1646
}

home_server_pool pool-noc03-8e6 {
         home_server = noc03-8e6
}


realm noc03-8e6.realms {

         acct_pool = pool-noc03-8e6
}


sites-available/default:
========================

#Add this line to the accounting section
        detail-copy-noc03-8e6

sites-available/copy-acct-to-noc03-8e6:
=======================================

server copy-acct-to-no03-8e6 {
         listen {
                 type = detail
                 filename = ${radacctdir}/detail-reader/noc03-8e6.log
                 load_factory = 10
         }

         preacct {


# doesnt work, server wont start.
#               if (request:Class =* "" ) {
#                       if (request:Client-Short-Name == "noc03rt07") {
#                               update control {
#                                   Home-Server-Pool := "pool-noc03-8e6"
#                               }
#                       }
#               }

                 policy-copy-acct-to-noc03-8e6
                 preprocess
         }

         accounting {
                 ok
         }

         pre-proxy {

         }

         post-proxy {

         }
}

policy-copy-acct-to-noc03-8e6.txt:
==================================

policy set-acct-home-server {

         if (request:Class =* "" ) {
                 if (request:Client-Short-Name == "noc03rt07") {
                         control .= {
#Home-Server-Pool doesnt seem to do anything even post 2.1.7
                              Home-Server-Pool := "pool-noc03-8e6"
                              Proxy-To-Realm   := "noc03-8e6.realms"
                         }
                 }
         }
}

policy preacct {
         set-acct-home-server()
}








More information about the Freeradius-Users mailing list