Network ranges in users files

Sophie Loewenthal sophie.loewenthal at trimbletl.com
Thu Sep 10 15:09:53 CEST 2015


Thanks Arran.  Sadly not for me : freeradius-2.1.12-1.el6.x86_64
And radius was sick when I tried with your suggestion. I had to try just 
in case.

Kind regards,
Sophie

-- 

On 9/10/2015 2:32 PM, Arran Cudbard-Bell wrote:
>> On 10 Sep 2015, at 13:24, Sophie Loewenthal <sophie.loewenthal at trimbletl.com> wrote:
>>
>> Hi,
>>
>>     I'dl ike to add some addresses into /etc/raddb/users
>>
>> Currently I have this,
>>     DEFAULT NAS-IP-Address == 195.222.222.0, Pool-Name := vodafone-nas-m2m
>>
>> But I should change this to,
>> 195.232.191.50
>> 195.232.191.51
>> 195.232.191.52
>> 195.232.191.53
>>
>> Maybe I could use 195.232.191.52/29 allowing 195.232.191.49 - 195.232.191.54
>>
>> Would these ideas work?
>>   DEFAULT NAS-IP-Address ==  195.232.191.52/29, Pool-Name := vodafone-nas-m2m
>>
>> Or,
>>   DEFAULT NAS-IP-Address ==  195.232.191.50, Pool-Name := vodafone-nas-m2m
>> DEFAULT NAS-IP-Address ==  195.232.191.51, Pool-Name := vodafone-nas-m2m
>> DEFAULT NAS-IP-Address ==  195.232.191.52, Pool-Name := vodafone-nas-m2m
>> DEFAULT NAS-IP-Address ==  195.232.191.53, Pool-Name := vodafone-nas-m2m
> Unfortunately the users file uses older condition evaluation code, so I don't think that will work.
>
> If you're using a v3.0.x version and unlang you should be able to do:
>
> if (&NAS-IP-Address < 195.232.191.52/29) {
> 	update control {
> 		Pool-Name := vodafone-nas-m2m
> 	}
> }
>
> The operators change meaning with the types of the operand, so '<' means 'within the set of', instead of 'less than' in this instance.
>
> -Arran
>
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
> FreeRADIUS development team
>
> FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
>
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list