2016-04-01 14 views
0

実際に私はmysqlによってAAAを持っており、すべて正常に動作します。特に、10分(600秒)接続後にユーザを切断するには、Max-Daily-Session属性を使用します。 私は最近カスタムphpスクリプトを使用してauthenticazioneの方法を変更しました。Freeradius Max-Daily-Session in custom authentication

authorize{ 
update control { 
    Auth-Type := `/usr/bin/php -f /etc/raddb/yourscript.php '%{User-Name}' '%{User-Password}' '%{Client-IP-Address}'` 
} 

では/ etc/FreeRADIUSの/ユーザー:attributes.phpで

DEFAULT Auth-Type = Accept 
Exec-Program-Wait = "/usr/bin/php -f /etc/raddb/attributes.php '%{User-Name}' '%{User-Password}' '%{Client-IP-Address}'" 

:サイト対応/ defaultファイルで

<?php 
$User = $argv[1]; 
$Pass = $argv[2]; 
$Ip = $argv[3]; 
if ($User == "test") 
    echo "Max-Daily-Session:=600"; 
?> 

サーバーにはないようですMax-Daily-Session属性を気にし、Disconnectのパケットを送信しません。 mysqlとカスタム認証の違いは何ですか?

答えて

0

あなたのnasは何ですか?半径セッションタイムアウトの方法がある:NASによってNAS 600S後

  • から
  • 半径応答Session-Timeout 600sを半径

    1. ユーザログイン、NASがユーザAを切断これに切断のパケットを送る半径ありませんnas。

    属性Session-Timeout := 600を使用してください。