Заработала авторизация MSCHAP-V2. Осталось только mppe прикрутить. Строчка в секции authorize - files должна быть первой среди других способов авторизации.
Но, хотя внешне все работает нормально, то это все равно неправильно. Сравнивал логи radiusd -X на старом сервере, где все работает и на новом с радиусом V2.1.
На новом - как только проходит авторизация files, все остальное динамится, и поэтому радиус не возвращает pptp демону параметры для mppe соединения, отчего он и падает, хотя радиус говорит, что соединение установлено нормально. Вот кусок лога нового сервера при установленном mppe
Код: Выделить всё
Exec-Program: returned: 0
++[auth] returns ok
[files] users: Matched entry DEFAULT at line 1
++[files] returns ok
[mschap] Found existing Auth-Type. Not changing it.
++[mschap] returns noop
++[preprocess] returns ok
++[preprocess] returns ok
++[chap] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[expiration] returns noop
++[logintime] returns noop
[pap] Found existing Auth-Type, not changing it.
++[pap] returns noop
Found Auth-Type = Accept
Auth-Type = Accept, accepting the user
+- entering group post-auth {...}
++[exec] returns noop
Sending Access-Accept of id 210 to 127.0.0.1 port 42157
Session-Timeout = 1235496
MS-MPPE-Encryption-Types = 0x00000006
Session-Octets-Limit = 2146435072
MS-CHAP2-Success = 0xab533d35454645333036423441303744313044393630463433424343354134453244443532384137423235
MS-MPPE-Encryption-Policy = 0x00000001
Acct-Interim-Interval = 60
Octets-Direction = Route-IP-No
Framed-IP-Address = 172.16.131.39
Framed-IP-Netmask = 255.255.255.255
Finished request 0.
Going to the next request
Вот кусок лога pptpd
Код: Выделить всё
RADATTR plugin wrote 9 line(s) to file /var/run/radattr.ppp1.
sent [CHAP Success id=0x3d "S=4CADD63907ECF200B7F7311C2A1B1285E7FDA35F"]
MPPE required, but keys are not available. Possible plugin problem?
sent [LCP TermReq id=0x2 "MPPE required but not available"]
rcvd [CCP ConfReq id=0x5 <mppe +H -M -S -L -D +C>]
Discarded non-LCP packet when LCP not open
rcvd [IPCP ConfReq id=0x6 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-wins 0.0.0.0> <ms-dns3 0.0.0.0> <ms-wins 0.0.0.0>]
Discarded non-LCP packet when LCP not open
rcvd [LCP TermAck id=0x2 "MPPE required but not available"]
Connection terminated.
Connect time 0.1 minutes.
Sent 0 bytes, received 0 bytes.
RADATTR plugin removed file /var/run/radattr.ppp1.
А вот кусок лога работающего radius v1.7 с mschap-v2 и mppe
Код: Выделить всё
modcall[authorize]: module "pre_auth" returns ok for request 21
modcall[authorize]: module "preprocess" returns ok for request 21
modcall[authorize]: module "chap" returns noop for request 21
rlm_mschap: Found MS-CHAP attributes. Setting 'Auth-Type = mschap'
modcall[authorize]: module "mschap" returns ok for request 21
rlm_realm: No '@' in User-Name = "misha", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 21
rlm_eap: No EAP-Message, not doing EAP
modcall[authorize]: module "eap" returns noop for request 21
users: Matched entry DEFAULT at line 1
modcall[authorize]: module "files" returns ok for request 21
rlm_pap: Found existing Auth-Type, not changing it.
modcall[authorize]: module "pap" returns noop for request 21
modcall: leaving group authorize (returns ok) for request 21
rad_check_password: Found Auth-Type MS-CHAP
auth: type "MS-CHAP"
Processing the authenticate section of radiusd.conf
modcall: entering group MS-CHAP for request 21
rlm_mschap: Told to do MS-CHAPv2 for misha with NT-Password
rlm_mschap: adding MS-CHAPv2 MPPE keys
modcall[authenticate]: module "mschap" returns ok for request 21
modcall: leaving group MS-CHAP (returns ok) for request 21
Exec-Program output: Session-Timeout = 1237588, MS-MPPE-Encryption-Types = 0x00000006, Session-Octets-Limit = 2146435072, MS-CHAP2-SUCCESS = 0x76533d35304631343942323333303246324242374539463645413643373542333238314633393037424135, MS-MPPE-Encryption-Policy = 0x00000001, Acct-Interim-Interval = 60, Octets-Direction = 0, Framed-IP-Address = 172.16.131.10, Framed-IP-Netmask = 255.255.255.255,
Exec-Program-Wait: value-pairs: Session-Timeout = 1237588, MS-MPPE-Encryption-Types = 0x00000006, Session-Octets-Limit = 2146435072, MS-CHAP2-SUCCESS = 0x76533d35304631343942323333303246324242374539463645413643373542333238314633393037424135, MS-MPPE-Encryption-Policy = 0x00000001, Acct-Interim-Interval = 60, Octets-Direction = 0, Framed-IP-Address = 172.16.131.10, Framed-IP-Netmask = 255.255.255.255,
Exec-Program: returned: 0
Sending Access-Accept of id 253 to 127.0.0.1 port 49595
MS-CHAP2-Success = 0x76533d35304631343942323333303246324242374539463645413643373542333238314633393037424135
MS-MPPE-Recv-Key = 0x4fd92b60467642213b9f57838fa2df65
MS-MPPE-Send-Key = 0x1f033b44eddda0bc9f4421324322fee9
MS-MPPE-Encryption-Policy = 0x00000002
MS-MPPE-Encryption-Types = 0x00000004
Session-Timeout = 1237588
Session-Octets-Limit = 2146435072
Acct-Interim-Interval = 60
Octets-Direction = Route-IP-No
Framed-IP-Address = 172.16.131.10
Framed-IP-Netmask = 255.255.255.255
Finished request 21
Те радиус должен определить, что это mschap-v2 c mppe и выдать pptpd дополнительные атрибуты
Код: Выделить всё
MS-MPPE-Recv-Key = 0x4fd92b60467642213b9f57838fa2df65
MS-MPPE-Send-Key = 0x1f033b44eddda0bc9f4421324322fee9
Чего в новом радиусе не происходит.
Куда дальше копать - даже и не знаю. А mppe - мне очень нужен.