Grant access to a groups of users to a determinated subnets

Condor condor_bulto at yahoo.com
Wed Jan 29 15:06:46 CET 2020


  Sorry for ask again, there is an alternative to hunt group regex for subnet? unlang is possible maybe, but i don't understand how to use it. Someone could please point me some example
Thanks!

    On Tuesday, January 28, 2020, 08:41:50 AM GMT-3, Condor <condor_bulto at yahoo.com> wrote:  
 
    Hi all, sorry for bother again, i like to grant access to a groups of users to a determinated subnets. For example:
In clients:
client 192.168.0.0/16 {        ipaddr          = 192.168.0.0/16        shortname       = LAN        secret          = ****}
In users:
test003 Crypt-Password := "$1$Z71rzgee$ZIJbcaMDyHtUtKN/", Huntgroup-Name == gNetworking, Huntgroup-Name == Servers        Auth-Type = System,        Service-Type = Login,        Reply-Message = "Hello Test003",
(user: test003 belong to two huntgroups)
In huntgroups:Servers   NAS-IP-Address =~ "/^172\.16\.0\.(1?\d\d?|2[0-4]\d|25[0-5])$/" 
gNetworking        NAS-IP-Address =~ /^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5])$/
Trying also (gNetworking        NAS-IP-Address =~ "/^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5])$/")Trying also (gNetworking        NAS-IP-Address =~ ^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5]))
Trying also (gNetworking        NAS-IP-Address =~ ^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5]), NAS-Group := "networking")
I get this error "Parse error (check) for entry gNetworking: Expected end of line or comma", or not work anyway
Using this to verify the regex: https://regex101.com/
Following this thread: http://freeradius.1045715.n5.nabble.com/Matching-a-value-within-an-IP-subnet-td3216040.html
Using:FreeRADIUS Version 3.0.4
Any idea? Thanks!


    On Monday, January 27, 2020, 10:38:12 AM GMT-3, Condor via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:  
 
 
  Hi all, sorry for bother again, i like to grant access to a groups of users to a determinated subnets. For example:
In clients:
client 192.168.0.0/16 {        ipaddr          = 192.168.0.0/16        shortname       = LAN        secret          = ****}
In users:
test003 Crypt-Password := "$1$Z71rzgee$ZIJbcaMDyHtUtKN/", Huntgroup-Name == gNetworking, Huntgroup-Name == Servers        Auth-Type = System,        Service-Type = Login,        Reply-Message = "Hello Test003",
(user: test003 belong to two huntgroups)
In huntgroups:Servers   NAS-IP-Address =~ "/^172\.16\.0\.(1?\d\d?|2[0-4]\d|25[0-5])$/" 
gNetworking        NAS-IP-Address =~ /^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5])$/
Trying also (gNetworking        NAS-IP-Address =~ "/^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5])$/")Trying also (gNetworking        NAS-IP-Address =~ ^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5]))
Trying also (gNetworking        NAS-IP-Address =~ ^192\.168\.(1?\d\d?|2[0-4]\d|25[0-5])\.(1?\d\d?|2[0-4]\d|25[0-5]), NAS-Group := "networking")
I get this error "Parse error (check) for entry gNetworking: Expected end of line or comma", or not work anyway
Using this to verify the regex: https://regex101.com/
Following this thread: http://freeradius.1045715.n5.nabble.com/Matching-a-value-within-an-IP-subnet-td3216040.html
Using:FreeRADIUS Version 3.0.4
Any idea? Thanks!
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html    


More information about the Freeradius-Users mailing list