Hello,

If my understanding is correct, your authorize section should look similar to this:

authorize {
        ...
        test
        ...
}

Have you done this?

Best Regards,

[EMAIL PROTECTED] wrote:
Hi am trying to excecute a program before autentification so I could deny access if it is on a callingstationnumber ban list on mysql..

But Script is not being Excecuting.. what seems the problem?

radiud.conf

   exec  test{
           wait = yes
           program = "/usr/local/bin/php -f /scriptest/test.php"
           input_pairs = request
           output_pairs = reply
           packet_type = Access-Request
        }



Test.php

<?php
ob_start();
$clientcallingstation = $_ENV['CALLING_STATION_ID'];
$calledstationid = $_ENV['CALLED_STATION_ID'];
ob_end_clean();

//log to txt
function logtotxt($somecontent)
{
$filename = 'log.txt';
$handle = fopen($filename, 'a');
fwrite($handle, $somecontent);
fclose($handle);
}
logtotxt("Script Was Excecuted");
// Make a test
if (!empty($clientcallingstation) && !empty($calledstationid))
{
    logtotxt("$clientcallingstation:$calledstationid");
    $retval = 0;
} else {
    // otherwise reject
    $retval = 1;
}
exit ($retval);
?>


- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-- George Chelidze


- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to