Hello freeradius-users, I want freeradius to assign different IP addresses (from different networks) according to traffic balance of users. It means that if user have no traffic left for this month, freeradius will give him IP address from 192.168.222.0/24, and if user still have a traffic on a account he will receive 192.168.111.0/24. Algorythm is simple, but i'm stuck with check-reply items. Now i have this in 'users' file:
DEFAULT Service-Type == Framed-User Traffic-Limit := `%{expr: %{reply:Rad-Traffic-limit} - %{sql:SELECT sum(AcctInputOctets)+sum(Acc tOutputOctets) FROM radacct WHERE UserName = '%u' AND Month(AcctStopTime) =Month(NOW()) AND Year(Acc tStopTime) = Year(NOW())}}`, Fall-Through = 1 Reply item Rad-Traffic-Limit is coming from LDAP. And if i understanding documentation right, i need something like this: DEFAULT Traffic-Limit > 0, Pool-Name := "legal_pool" Fall-Through = 1 DEFAULT Traffic-Limit <= 0, Pool-Name := "illegal_pool" Fall-Through = 1 But, of course, radiusd blames me for this - '>' and '<=' is not applicable to reply items. So i think i need to put value of reply attribute Traffic-Limit to some check attribute and then compare it and assign pool name, am i right? And if i am, then - how can i do it? I tried many ways, but have no success. For now those users, who have <= 0 of traffic left, just being rejected and that's all, but i need to pass them with harder restrictions. Main idea: they will work with the different ip addresses, and i will configure my firewall in such manner that they will only can use corporative mail, corporative site, all corporative and no outer internet. So if freeradius can assign addresses from different pools - can it assign them according to traffic limits? p.s.: always forgetting to say "sorry for my bad English". -- Best regards, Alexander mailto:[EMAIL PROTECTED] - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html