Use network range in hungroups file

classic Classic list List threaded Threaded
4 messages Options
| Threaded
Open this post in threaded view
|

Use network range in hungroups file

Daniel Finger
Hi!

I would like to compare the Client-IP-Address to a network in the huntgroup
file.

Since FreeRADIUS 2 I am using something like this:

     huntgroup1       Client-IP-Address =~ 192\.168\..*

With FR3 I hoped I could use something like:

     huntgroup1       Client-IP-Address < 192.168/16

But this results in an Error:
Error: /etc/raddb/mods-config/preprocess/huntgroups[56]: Parse error (check)
for entry huntgroup1: Invalid IPv4 mask length "/16".  Only "/32" permitted
for non-prefix types

Is it somehow possible with FR3 to compare the Client-IP-Address to a
network range in the huntgroups file?

Sincerely,
Daniel

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Use network range in hungroups file

Alan Buxey
Don't use huntgroup, it's much much slower than using eg unlang in your
server policy. Just use unlang to check the range prefix

alan

On Fri, 4 Jan 2019, 13:38 Daniel Finger <[hidden email] wrote:

> Hi!
>
> I would like to compare the Client-IP-Address to a network in the
> huntgroup
> file.
>
> Since FreeRADIUS 2 I am using something like this:
>
>      huntgroup1       Client-IP-Address =~ 192\.168\..*
>
> With FR3 I hoped I could use something like:
>
>      huntgroup1       Client-IP-Address < 192.168/16
>
> But this results in an Error:
> Error: /etc/raddb/mods-config/preprocess/huntgroups[56]: Parse error
> (check)
> for entry huntgroup1: Invalid IPv4 mask length "/16".  Only "/32"
> permitted
> for non-prefix types
>
> Is it somehow possible with FR3 to compare the Client-IP-Address to a
> network range in the huntgroups file?
>
> Sincerely,
> Daniel
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Use network range in hungroups file

Alan DeKok-2
In reply to this post by Daniel Finger
On Jan 4, 2019, at 8:37 AM, Daniel Finger <[hidden email]> wrote:

>
> I would like to compare the Client-IP-Address to a network in the huntgroup file.
>
> Since FreeRADIUS 2 I am using something like this:
>
>     huntgroup1       Client-IP-Address =~ 192\.168\..*
>
> With FR3 I hoped I could use something like:
>
>     huntgroup1       Client-IP-Address < 192.168/16
>
> But this results in an Error:
> Error: /etc/raddb/mods-config/preprocess/huntgroups[56]: Parse error (check) for entry huntgroup1: Invalid IPv4 mask length "/16".  Only "/32" permitted for non-prefix types
>
> Is it somehow possible with FR3 to compare the Client-IP-Address to a network range in the huntgroups file?

  No.  The hunt groups (and hints and users file) don't support that.  Use "unlang".

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Use network range in hungroups file

Daniel Finger
In reply to this post by Daniel Finger
On Fri, 4 Jan 2019 15:51:14, Alan Buxey wrote:


 > Don't use huntgroup, it's much much slower than using eg unlang in your
 > server policy. Just use unlang to check the range prefix.

Thanks, it is now working like a charm with unlang.

Greetings,
Daniel

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html