Linux + abills 0.35 (Три дня не сплю)

Установка, настройка, поддержка
Ответить
valik
Сообщения: 1
Зарегистрирован: Вс апр 08, 2007 12:20 pm

Linux + abills 0.35 (Три дня не сплю)

Сообщение valik »

Постоянна ошибка:
rad_recv: Access-Request packet from host 127.0.0.1:32768, id=8, length=84
Service-Type = Framed-User
Framed-Protocol = PPP
User-Name = "qwerty"
CHAP-Password = 0x54b8cfeb476e5cd98c0ae09e1d48aeb229
Calling-Station-Id = "192.168.1.2"
NAS-IP-Address = 127.0.0.1
NAS-Port = 0
Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 19
modcall[authorize]: module "preprocess" returns ok for request 19
radius_xlat: '/usr/abills/libexec/rauth.pl pre_auth'
Exec-Program: /usr/abills/libexec/rauth.pl pre_auth
Exec-Program output: Auth-Type := Accept
Exec-Program-Wait: value-pairs: Auth-Type := Accept
Exec-Program: returned: 0
modcall[authorize]: module "pre_auth" returns ok for request 19
modcall[authorize]: module "mschap" returns noop for request 19
rlm_realm: No '@' in User-Name = "qwerty", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 19
users: Matched entry DEFAULT at line 53
modcall[authorize]: module "files" returns ok for request 19
modcall: leaving group authorize (returns ok) for request 19
rad_check_password: Found Auth-Type Accept
rad_check_password: Auth-Type = Accept, accepting the user
radius_xlat: '/usr/abills/libexec/rauth.pl'
Exec-Program: /usr/abills/libexec/rauth.pl
Exec-Program output: Reply-Message = "Wrong CHAP password 'qwerty'"
Exec-Program-Wait: value-pairs: Reply-Message = "Wrong CHAP password 'qwerty'"
Exec-Program: returned: 1
Found Post-Auth-Type
Processing the post-auth section of radiusd.conf
modcall: entering group REJECT for request 19
radius_xlat: '/usr/abills/libexec/rauth.pl post_auth'
Exec-Program: /usr/abills/libexec/rauth.pl post_auth
Exec-Program output:
Exec-Program: returned: 0
modcall[post-auth]: module "post_auth" returns ok for request 19
modcall: leaving group REJECT (returns ok) for request 19
Delaying request 19 for 1 seconds
Finished request 19
Going to the next request
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Sending Access-Reject of id 8 to 127.0.0.1 port 32768
Reply-Message = "Wrong CHAP password 'qwerty'"
Waking up in 3 seconds...
--- Walking the entire request list ---
Cleaning up request 19 ID 8 with timestamp 4618def7
Nothing to do. Sleeping until we see a request.
Закоментировал :
/usr/abills/Abills/mysql/Auth.pm
if (defined($RAD->{CHAP_PASSWORD}) && defined($RAD->{CHAP_CHALLENGE})) {
if (check_chap("$RAD->{CHAP_PASSWORD}", "$self->{PASSWD}", "$RAD->{CHAP_CHALLENGE}", 0) == 0) {
$RAD_PAIRS{'Reply-Message'}="Wrong CHAP password '$self->{PASSWD}'";
# return 1, \%RAD_PAIRS;
}
}
Полный брет присваеваеться
rad_recv: Access-Request packet from host 127.0.0.1:32768, id=5, length=84
Service-Type = Framed-User
Framed-Protocol = PPP
User-Name = "qwerty"
CHAP-Password = 0xbb89f7be8de9f8f74c6940adf79d2b938b
Calling-Station-Id = "192.168.1.2"
NAS-IP-Address = 127.0.0.1
NAS-Port = 0
Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 16
modcall[authorize]: module "preprocess" returns ok for request 16
radius_xlat: '/usr/abills/libexec/rauth.pl pre_auth'
Exec-Program: /usr/abills/libexec/rauth.pl pre_auth
Exec-Program output: Auth-Type := Accept
Exec-Program-Wait: value-pairs: Auth-Type := Accept
Exec-Program: returned: 0
modcall[authorize]: module "pre_auth" returns ok for request 16
modcall[authorize]: module "mschap" returns noop for request 16
rlm_realm: No '@' in User-Name = "qwerty", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 16
users: Matched entry DEFAULT at line 53
modcall[authorize]: module "files" returns ok for request 16
modcall: leaving group authorize (returns ok) for request 16
rad_check_password: Found Auth-Type Accept
rad_check_password: Auth-Type = Accept, accepting the user
radius_xlat: '/usr/abills/libexec/rauth.pl'
Exec-Program: /usr/abills/libexec/rauth.pl
Exec-Program output: Reply-Message = Wrong CHAP password 'qwerty', Session-Timeout = 1917884, Octets-Direction = 0, Framed-IP-Address = 192.168.0.5, Session-Octets-Limit = 2147483648, Framed-IP-Netmask = 255.255.255.0,
Exec-Program-Wait: plaintext: Reply-Message = Wrong CHAP password 'qwerty', Session-Timeout = 1917884, Octets-Direction = 0, Framed-IP-Address = 192.168.0.5, Session-Octets-Limit = 2147483648, Framed-IP-Netmask = 255.255.255.0,
Exec-Program: returned: 0
Sending Access-Accept of id 5 to 127.0.0.1 port 32768
Finished request 16
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Accounting-Request packet from host 127.0.0.1:32768, id=6, length=111
Acct-Session-Id = "4618DCD417BD00"
User-Name = "qwerty"
Acct-Status-Type = Start
Service-Type = Framed-User
Framed-Protocol = PPP
Calling-Station-Id = "192.168.1.2"
Acct-Authentic = RADIUS
NAS-Port-Type = Async
Framed-IP-Address = 192.168.1.1
NAS-IP-Address = 127.0.0.1
NAS-Port = 0
Acct-Delay-Time = 0
Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 17
modcall[preacct]: module "preprocess" returns noop for request 17
rlm_acct_unique: Hashing 'NAS-Port = 0,Client-IP-Address = 127.0.0.1,NAS-IP-Address = 127.0.0.1,Acct-Session-Id = "4618DCD417BD00",User-Name = "qwerty"'
rlm_acct_unique: Acct-Unique-Session-ID = "5d3dd58873e625cf".
modcall[preacct]: module "acct_unique" returns ok for request 17
rlm_realm: No '@' in User-Name = "qwerty", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[preacct]: module "suffix" returns noop for request 17
acct_users: Matched entry DEFAULT at line 7
modcall[preacct]: module "files" returns ok for request 17
modcall: leaving group preacct (returns ok) for request 17
Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 17
radius_xlat: '/var/log/radius/radacct/127.0.0.1/detail-20070408'
rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/radius/radacct/127.0.0.1/detail-20070408
modcall[accounting]: module "detail" returns ok for request 17
modcall[accounting]: module "unix" returns ok for request 17
radius_xlat: '/var/log/radius/radutmp'
radius_xlat: 'qwerty'
modcall[accounting]: module "radutmp" returns ok for request 17
modcall: leaving group accounting (returns ok) for request 17
radius_xlat: '/usr/abills/libexec/racct.pl'
Exec-Program: /usr/abills/libexec/racct.pl
Sending Accounting-Response of id 6 to 127.0.0.1 port 32768
Finished request 17
Going to the next request
--- Walking the entire request list ---
Waking up in 5 seconds...
--- Walking the entire request list ---
Cleaning up request 16 ID 5 with timestamp 4618dcd3
Cleaning up request 17 ID 6 with timestamp 4618dcd4
Nothing to do. Sleeping until we see a request.


Такое ощущения что радиус пердает abills только логин то есму вообще ничего не передает.
И откуда этот 192.168.1.1 взялся......

Ткните носом гдето туплю, а где не вижу :(

old_man
Сообщения: 2
Зарегистрирован: Пт апр 06, 2007 2:46 am

Сообщение old_man »

Мдя... Глас вопиющего в пустыне :(
А голос разработчика что-то не слыхать :(

> И откуда этот 192.168.1.1 взялся......

Была та же фигня. 192.168.1.1 вылазит потому, что в /etc/pptpd.conf закомментарен remoteip (если туда что-то написать (в смысле диапазон адресов), то будет вылезать оно).

А получить remoteip равным IP клиента из базы Abills можно только если в словаре радиуса корректно прописаны атрибуты:

ATTRIBUTE Acct-Interim-Interval 85 integer
ATTRIBUTE Session-Octets-Limit 227 integer
ATTRIBUTE Octets-Direction 228 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit 230 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit 231 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-1 232 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-1 233 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-2 234 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-2 235 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-3 236 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-3 237 integer

(невооружённым глазом видно, что эти атрибуты касаются лишь лимитов... казалось бы, зачем им влиять на remoteip??? просто шаманство какое-то...)

Причём лучше это написать в _оба_ файла: /etc/freeradius/dictionary и
/etc/radiusclient/dictionary. Без radiusclient не получается правильных данных в /var/run/radattr.pppX. При этом, кстати, и traffic-limit заработал.

Надо признать, это описано здесь:
http://abills.asmodeus.com.ua/forum/vie ... ce2b3537df
но очень ненавязчиво :)

PS: Debian Etch, pptpd...

Ответить