Verify that the user belongs to a specific ipv4 network
Alan DeKok
alan.dekok at inkbridge.io
Thu Sep 4 18:22:00 UTC 2025
On Sep 4, 2025, at 2:23 AM, Dzmitry Shykuts <dshykuts at brest.beltelecom.by> wrote:
> 1. I'm tryingto dothisinthe usersfile:
>
> test Cleartext-Password := "password", NAS-IP-Address == 10.1.1.0/24
> Cisco-AVPair = "shell:priv-lvl=1",
> Service-Type = Administrative-User
Unfortunately, this isn't supported in v3. It is in v4, but...
You can do the same thing in unlang:
if (NAS-IP-Address < 10.1.1.0/24) {
update control {
...
}
update reply {
...
}
}
Alan DeKok.
More information about the Freeradius-Users
mailing list