Network ranges in users files
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 Kind regards, Sophie
On 10 Sep 2015, at 13:24, Sophie Loewenthal <sophie.loewenthal@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@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
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@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@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
On 10 Sep 2015, at 14:09, Sophie Loewenthal <sophie.loewenthal@trimbletl.com> wrote:
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.
If it had worked, it would have been comparing ip addresses in their 32bit unsigned integer form which wouldn't have been what you wanted anyway. The .spec file in v3.0.x works fine for RHEL6 I roll my own RPMs daily... Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (2)
-
Arran Cudbard-Bell -
Sophie Loewenthal