LINUX.ORG.RU
ФорумAdmin

pppd+pptp+freeradius+freenibs, radius alive пакеты


0

0

Настроил pptpd, прикрутил freeradius с freenibs'ом, все работает, аккаунтинг сейчас ведется по Acct-Status-Type = start | stop, как сделать чтобы он велся по Acct-Status-Type = alive? проблема в том как сделать чтобы pppd слал alive пакеты радиусу?
Slackware 10.2, pppd 2.4.4b2, freeradius-1.1.0

nibs.conf:
....
accounting_on_alive = yes
....
Вроде как нужен патч для pppd, но я нашел патч только для старых версий pppd...


лог /var/log/messages в студию. особенно интересуют куски где пользователи коннектятся и когда отваливаются.

vs
()

/var/log/messages:
-----------------------------------------------
Mar 1 16:13:58 LINUX pptpd[15347]: CTRL: Client 10.0.0.17 control connection started
Mar 1 16:13:58 LINUX pptpd[15347]: CTRL: Starting call (launching pppd, opening GRE)
Mar 1 16:13:58 LINUX pppd[15348]: Plugin radius.so loaded.
Mar 1 16:13:58 LINUX pppd[15348]: RADIUS plugin initialized.
Mar 1 16:13:58 LINUX pppd[15348]: Plugin radattr.so loaded.
Mar 1 16:13:58 LINUX pppd[15348]: RADATTR plugin initialized.
Mar 1 16:13:58 LINUX pppd[15348]: pppd 2.4.4b1 started by root, uid 0
Mar 1 16:13:58 LINUX pppd[15348]: Using interface ppp0
Mar 1 16:13:58 LINUX pppd[15348]: Connect: ppp0 <--> /dev/pts/4
Mar 1 16:14:01 LINUX pppd[15348]: PAP peer authentication succeeded for test
Mar 1 16:14:01 LINUX pppd[15348]: local IP address 192.168.0.1
Mar 1 16:14:01 LINUX pppd[15348]: remote IP address 192.168.1.1
Mar 1 16:15:01 LINUX pppd[15348]: LCP terminated by peer (M40M-)^@<M-Mt^@^@^@^@)
Mar 1 16:15:02 LINUX pppd[15348]: Connect time 1.0 minutes.
Mar 1 16:15:02 LINUX pppd[15348]: Sent 33 bytes, received 2418 bytes.
Mar 1 16:15:02 LINUX pppd[15348]: Modem hangup
Mar 1 16:15:02 LINUX pppd[15348]: Connection terminated.
Mar 1 16:15:02 LINUX pppd[15348]: Exit.
Mar 1 16:15:02 LINUX pptpd[15347]: CTRL: Client 10.0.0.17 control connection finished

Scream
() автор топика

/var/log/debug
Mar  1 16:24:42 LINUX pptpd[15403]: MGR: Launching /usr/sbin/pptpctrl to handle client
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: local address = 192.168.0.1
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: remote address = 192.168.1.1
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: pppd options file = /etc/ppp/options.pptpd
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Received PPTP Control Message (type: 1)
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Made a START CTRL CONN RPLY packet
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: I wrote 156 bytes to the client.
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Sent packet to client
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Received PPTP Control Message (type: 7)
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Set parameters to 100000000 maxbps, 64 window size
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Made a OUT CALL RPLY packet
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: pty_fd = 6
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: tty_fd = 7
Mar  1 16:24:42 LINUX pptpd[15404]: CTRL (PPPD Launcher): program binary = /usr/sbin/pppd
Mar  1 16:24:42 LINUX pptpd[15404]: CTRL (PPPD Launcher): local address = 192.168.0.1
Mar  1 16:24:42 LINUX pptpd[15404]: CTRL (PPPD Launcher): remote address = 192.168.1.1
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: I wrote 32 bytes to the client.
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Sent packet to client
Mar  1 16:24:42 LINUX pppd[15404]: using channel 7
Mar  1 16:24:42 LINUX pppd[15404]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap> <magic 0xe65b4812> <pcomp> <accomp>]
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Received PPTP Control Message (type: 15)
Mar  1 16:24:42 LINUX pptpd[15403]: CTRL: Got a SET LINK INFO packet with standard ACCMs
Mar  1 16:24:42 LINUX pppd[15404]: rcvd [LCP ConfReq id=0x0 <mru 1400> <magic 0x6492360b> <pcomp> <accomp> <callback CBCP>]
Mar  1 16:24:42 LINUX pppd[15404]: sent [LCP ConfRej id=0x0 <callback CBCP>]
Mar  1 16:24:42 LINUX pppd[15404]: rcvd [LCP ConfReq id=0x1 <mru 1400> <magic 0x6492360b> <pcomp> <accomp>]
Mar  1 16:24:42 LINUX pppd[15404]: sent [LCP ConfAck id=0x1 <mru 1400> <magic 0x6492360b> <pcomp> <accomp>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap> <magic 0xe65b4812> <pcomp> <accomp>]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <auth pap> <magic 0xe65b4812> <pcomp> <accomp>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [LCP EchoReq id=0x0 magic=0xe65b4812]
Mar  1 16:24:45 LINUX pptpd[15403]: CTRL: Received PPTP Control Message (type: 15)
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [LCP Ident id=0x2 magic=0x6492360b "MSRASV5.10"]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [LCP Ident id=0x3 magic=0x6492360b "MSRAS-0-VLADIMIR"]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [PAP AuthReq id=0x5 user="test" password=<hidden>]
Mar  1 16:24:45 LINUX pppd[15404]: RADATTR plugin wrote 5 line(s) to file /var/run/radattr.ppp0.
Mar  1 16:24:45 LINUX pppd[15404]: sent [PAP AuthAck id=0x5 ""]
Mar  1 16:24:45 LINUX pppd[15404]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.0.1>]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [LCP EchoRep id=0x0 magic=0x6492360b]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [CCP ConfReq id=0x4 <mppe +H -M -S -L -D +C>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [CCP ConfRej id=0x4 <mppe +H -M -S -L -D +C>]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [IPCP ConfReq id=0x5 <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>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [IPCP ConfRej id=0x5 <ms-wins 0.0.0.0> <ms-wins 0.0.0.0>]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [CCP ConfReq id=0x2]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [IPCP ConfReq id=0x2 <addr 192.168.0.1>]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [CCP TermReq id=0x6"d\377777776226\013\000<\37777777715t\000\000\002\37777777734"
;]
Mar  1 16:24:45 LINUX pppd[15404]: sent [CCP TermAck id=0x6]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [IPCP ConfReq id=0x7 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [IPCP ConfNak id=0x7 <addr 192.168.1.1> <ms-dns1 83.246.135.100> <ms-dns3 83.246.135.100>]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [IPCP ConfAck id=0x2 <addr 192.168.0.1>]
Mar  1 16:24:45 LINUX pppd[15404]: rcvd [IPCP ConfReq id=0x8 <addr 192.168.1.1> <ms-dns1 83.246.135.100> <ms-dns3 83.246.135.100>]
Mar  1 16:24:45 LINUX pppd[15404]: sent [IPCP ConfAck id=0x8 <addr 192.168.1.1> <ms-dns1 83.246.135.100> <ms-dns3 83.246.135.100>]
Mar  1 16:24:47 LINUX pptpd[15403]: CTRL: Received PPTP Control Message (type: 15)
Mar  1 16:24:47 LINUX pptpd[15403]: CTRL: Got a SET LINK INFO packet with standard ACCMs
Mar  1 16:24:47 LINUX pppd[15404]: rcvd [LCP TermReq id=0x9 "d\377777776226\013\000<\37777777715t\000\000\000\000"]
Mar  1 16:24:47 LINUX pppd[15404]: sent [LCP TermAck id=0x9]
Mar  1 16:24:48 LINUX pptpd[15403]: CTRL: Received PPTP Control Message (type: 12)
Mar  1 16:24:48 LINUX pptpd[15403]: CTRL: Made a CALL DISCONNECT RPLY packet
Mar  1 16:24:48 LINUX pptpd[15403]: CTRL: Received CALL CLR request (closing call)
Mar  1 16:24:48 LINUX pptpd[15403]: CTRL: Reaping child PPP[15404]
Mar  1 16:24:48 LINUX pppd[15404]: RADATTR plugin removed file /var/run/radattr.ppp0.
Mar  1 16:24:48 LINUX pptpd[15403]: CTRL: Exiting now
Mar  1 16:24:48 LINUX pptpd[14601]: MGR: Reaped child 15403

Scream
() автор топика

а в /etc/radiuscliet/dictionary есть записи о keep-alive?

vs
()

>Вроде как нужен патч для pppd

Вроде не нужен. Атрибут на сервере - Acct-Interim-Interval.
Типа:
/etc/raddb/users-----------------------------
...........
DEFAULT Auth-Type = Local, Password-Location = SQL
Service-Type = Framed-User,
Framed-Protocol = PPP,
Acct-Interim-Interval = 60
...........
---------------------------------------------
Время в секундах, но меньше чем 60 выставить не получится (не рекомендует RFC).

qwe ★★★
()
Ответ на: комментарий от Scream

а может все-таки есть какой-нибудь способ заставить pppd кидать статистику радиусу чаще чем раз в минуту? а то с нынешними скоростями за минуту можно в хороший минус уйти... ну вы понимаете ;)

zevil
()
Ответ на: комментарий от zevil

решил проблему сам... в плагине радиуса для пппд захардкожено 60 секунд. закомментил эти строки, и все заработало как нужно ;)

zevil
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.