I started debugging this morning with a VPN server which acts fine in Access-Challenge with an older Radius / OTP installation.
The problem seems that the Radius server does not add the attributes received from rlm_perl module:
rlm_perl: return RLM_MODULE_HANDLED
(1) perl : &request:User-Name = $RAD_REQUEST{'User-Name'} -> 'raoul'
(1) perl : &request:Event-Timestamp = $RAD_REQUEST{'Event-Timestamp'} -> 'Sep 22 2016 12:01:57 CEST'
(1) perl : &request:User-Password = $RAD_REQUEST{'User-Password'} -> 'password'
(1) perl : &request:NAS-IP-Address = $RAD_REQUEST{'NAS-IP-Address'} -> '192.168.1.1'
(1) perl : &reply:Reply-Message = $RAD_REPLY{'Reply-Message'} -> 'please enter otp: '
(1) perl : &reply:Service-Type = $RAD_REPLY{'Service-Type'} -> 'Administrative-User'
(1) perl : &reply:Class = $RAD_REPLY{'Class'} -> '0x000000000000000000000000000000000000000000000000000000000000000'
(1) perl : &reply:State = $RAD_REPLY{'State'} -> '0000000000000000000'
(1) perl : &control:Response-Packet-Type = $RAD_CHECK{'Response-Packet-Type'} -> 'Access-Challenge'
(1) perl : &control:Ldap-UserDn = $RAD_CHECK{'Ldap-UserDn'} -> 'uid=raoul,ou=users,dc=example,dc=com'
(1) perl : &control:Auth-Type = $RAD_CHECK{'Auth-Type'} -> 'Perl'
(1) [perl] = handled
(1) } # Auth-Type Perl = handled
(1) Sending Access-Challenge packet to host 192.168.1.1 port 34786, id=196, length=0
(1) Class = 0x000000000000000000000000000000000000000000000000000000000000000
Class = 0x000000000000000000000000000000000000000000000000000000000000000
(1) Finished request
Waking up in 4.9 seconds.
(1) Cleaning up request packet ID 196 with timestamp +24
Ready to process requests
You can see that perl sends Class and State attributes, but only Class attribute is submitted. My access_challenge attributes file allows to send State and Reply-Message:
DEFAULT
EAP-Message =* ANY,
State =* ANY,
Message-Authenticator =* ANY,
Reply-Message =* ANY,
Proxy-State =* ANY,
Session-Timeout =* ANY,
Idle-Timeout =* ANY
Do you have a hint on how to get this working?
Regards,
Raoul