Grant access to a groups of users to a determinated subnets

Condor condor_bulto at yahoo.com
Mon Jan 27 14:37:55 CET 2020


  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!


More information about the Freeradius-Users mailing list