For example users logging in from radius client x would authenticate against realm x and all users logging in from radius client y should authenticate against realm y.
This is so the users never should need to submit what realm they are logging in to.
Is this possible, else I would liek to make this a feature request?
Is there a way to get the policy to be triggered by the Radius Client IP?
My setup is using LinOTP on a Debian distribution with the perl module.
The perl module is pointing to:
/usr/lib/linotp/radius_linotp.pm
and there I find:
my $useNasIdentifier = true;
if ( $Config->{PREFER_NAS_IDENTIFIER} =~ /^\s*false\s*$/i ) {
$useNasIdentifier = false;
}
Is this perhaps the correct place to edit to get the wanted behaviour..?
I think you misunderstood now.
It's not the Radius Server, it's the radius client IP (the same IP's specified in /etc/freeradius/clients.conf) that I want to configure policys depending on.
When I empty the "Override authentication client" the LinOTP servers (same server as FreeRadius, IP is shown as client IP, and not the Radius client.
I really appreciate your effort in this. I look forward to hear the results from your testing.
Did you have a chance to test this?
finally :)
A quick work around:
* Allow to hand on the client's IP addresses - go to /manage -> "LinOTP Config" -> "System Config" -> "Override authentication client:" and enter the IP of the RADIUS server here (e.g. "127.0.0.1" if FreeRADIUS is running on the LinOTP server)
* Activate the processing of the NAS-IP-ADDRESS attribute in /etc/linotp2/rlm_perl.ini
PREFER_NAS_IDENTIFIER=True
* Add to the authorize section in /etc/freeradius/sites-enabled/linotp
update request{
NAS-IP-ADDRESS := "%{CLIENT-IP-ADDRESS}"
}
It is possible to make the update conditional (e.g. only for some CLIENT-IP-ADDRESS values).
An alternative to the last step would be to configure the RADIUS client to submit a NAS-IP-ADDRESS attribute containing the correct IP.
Best Regards,
Mirko
Many thanks, Mirko!