radiusplugin-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re: [Radiusplugin-users] Anyone knows how to use Radiusplugin to lim


From: Tony Zhou
Subject: RE: Re: [Radiusplugin-users] Anyone knows how to use Radiusplugin to limit client's traffic?
Date: Mon, 7 Jun 2010 22:40:47 -0400

I know what crontab is, but not quite sure how should use a script to read from SQL database.

 

What type of script do you use? Perl? Or just simple shell script?

 

Thanks.

 

 

From: yegle [mailto:address@hidden
Sent: Monday, June 07, 2010 10:38 PM
To: address@hidden
Cc: address@hidden
Subject: Re: Re: [Radiusplugin-users] Anyone knows how to use Radiusplugin to limit client's traffic?

 

well...You should remember to reply all...

You need to know what crontab is, which script language can be used for accessing postgresql.

Do a crontab every hour to check sum of traffics every user generated and either delete user from radcheck table or set there password to random ones.Here I assume you are using the table schema from freeradius.

the code can be like this:

for each user:
    traffic = sum(acctinputoctets+acctoutputoctets) where acctstarttime >= the beginning of this month
    quota = user's quota
    if (traffic>=quota) then
        delete this user
        (or) change user password to sOmEThinGUnreAdable
end for


On Tue, Jun 8, 2010 at 10:11 AM, <address@hidden> wrote:

Exactly how?



On Jun 7, 2010 9:59pm, yegle <address@hidden> wrote:
> Use crontab to delete/deactivate user when the monthly traffic exceeded.
>
> On Tue, Jun 8, 2010 at 9:56 AM, Tony Zhou address@hidden> wrote:
>
> Hi all,
>  I'm running Freeradius 2.1+Postgresql 8.4.4+OpenVPN on Ubuntu 9.10 x86. It runs smoothly now, however, I want to know that if there is any way to limit per user's traffic, like 10G/month, and disconnect/reject their connection when the limitation has been reached.
>  I have asked this on FreeRADIUS maillist and they said that is NAS client related. Is there any function in Radiusplugin or any additional script could do this?
>  Thanks in advance.
>
>
> _______________________________________________
>
> Radiusplugin-users mailing list
>
> address@hidden
>
> http://lists.nongnu.org/mailman/listinfo/radiusplugin-users
>
>
>
>
>

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]