Grant access to a groups of users to a determinated subnets
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... Using:FreeRADIUS Version 3.0.4 Any idea? Thanks!
On Jan 27, 2020, at 8:37 AM, Condor via Freeradius-Users <freeradius-users@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 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])$/
v3 doesn't support regular expressions in hunt groups. Write a policy in "unlang", in sites-enabled/default Alan DeKok.
participants (2)
-
Alan DeKok -
Condor