Jump to content
Калькуляторы

Проблема с работой radattr.so

Исходные данные. Маршрутизатор CentOS 5.5; pr-pppoe 3.5, pppd 2.4.4, плагины radius.so, radattr.so шедшие "в комплекте" (всё это было установленно вместе с системой "из коробки).

Поднят pppoe-server с radius авторизацией. Радиус-сервер находится вне моей сети во "внешке". Авторизация при подключении клиента проходит замечательно, но при этом не создаются файлы radattr.pppx, в которых должны, по идее, храниться полученные от радиус-серверва аттрибуты. Файл не пустой (что судя по всему распространённая проблема, связанная с кривым словарём), а именно не создаётся.

 

Файл pppoe-server-options

# PPP options for the PPPoE server
# LIC: GPL
debug
mtu 1472
mru 1472
ktune
default-asyncmap
plugin radius.so
plugin radattr.so
# require-pap
# require-chap
# login
lcp-echo-interval 20
lcp-echo-failure 2

ms-dns 8.8.8.8
nobsdcomp
noendpoint
noipdefault
noipx
novj
receive-all
logfile /var/log/ppp/pppd.log

 

Файл options

lock
# debug
# plugin radius.so
# plugin radattr.so

 

Файл radiusclient.conf

auth_order radius
login_tries 4
login_timeout 60
nologin /etc/nologin
servers /etc/radiusclient/servers
# dictionary /etc/raddb/dictionary
dictionary /etc/radiusclient/dictionary
authserver 194.190.208.102:1812
acctserver 194.190.208.102:1813
default_realm

 

Лог pppd.log при подключении клиента

using channel 16
Using interface ppp0
Connect: ppp0 <--> /dev/pts/0
sent [LCP ConfReq id=0x1 <mru 1472> <magic 0x212e5e9a>]
rcvd [LCP ConfAck id=0x1 <mru 1472> <magic 0x212e5e9a>]
rcvd [LCP ConfReq id=0x5 <mru 1480> <magic 0x6d5f440e> <pcomp> <accomp> <callback CBCP>]
sent [LCP ConfRej id=0x5 <pcomp> <accomp> <callback CBCP>]
rcvd [LCP ConfReq id=0x6 <mru 1480> <magic 0x6d5f440e>]
sent [LCP ConfAck id=0x6 <mru 1480> <magic 0x6d5f440e>]
sent [LCP EchoReq id=0x0 magic=0x212e5e9a]
sent [iPCP ConfReq id=0x1 <addr 10.11.0.1>]
rcvd [LCP Ident id=0x7 magic=0x6d5f440e "MSRASV5.20"]
rcvd [LCP Ident id=0x8 magic=0x6d5f440e "MSRAS-0-ALLSEINGEYEMOBI"]
rcvd [LCP Ident id=0x9 magic=0x6d5f440e "\37777777625\37777777657%\37777777672a^\37777777731@\37777777637\37777777646\016]\037\37777777652\37777777754\006"]
rcvd [iPCP ConfReq id=0xa <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>]
sent [iPCP ConfRej id=0xa <ms-wins 0.0.0.0> <ms-wins 0.0.0.0>]
rcvd [LCP EchoRep id=0x0 magic=0x6d5f440e]
rcvd [iPCP ConfAck id=0x1 <addr 10.11.0.1>]
rcvd [iPCP ConfReq id=0xb <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [iPCP ConfNak id=0xb <addr 10.11.0.2> <ms-dns1 8.8.8.8> <ms-dns3 8.8.8.8>]
rcvd [iPCP ConfReq id=0xc <addr 10.11.0.2> <ms-dns1 8.8.8.8> <ms-dns3 8.8.8.8>]
sent [iPCP ConfAck id=0xc <addr 10.11.0.2> <ms-dns1 8.8.8.8> <ms-dns3 8.8.8.8>]
local  IP address 10.11.0.1
remote IP address 10.11.0.2
Script /etc/ppp/ip-up started (pid 3906)
Script /etc/ppp/ip-up finished (pid 3906), status = 0x0

Лог при отключении пользователя (В данном случае клиентскую машину просто выключили. При других отключениях ситуация аналогичная, разве что записи о причине отключения отличаются)

No response to 2 echo-requests
Serial link appears to be disconnected.
Connect time 4.4 minutes.
Sent 3415 bytes, received 3122 bytes.
Script /etc/ppp/ip-down started (pid 3945)
sent [LCP TermReq id=0x2 "Peer not responding"]
Script /etc/ppp/ip-down finished (pid 3945), status = 0x0
sent [LCP TermReq id=0x3 "Peer not responding"]
Connection terminated.
Modem hangup
Waiting for 1 child processes...
pppoe: read (asyncReadFromPPP): Session 1: Input/output error
 script /usr/sbin/pppoe -n -I eth0 -e 1:00:26:2d:54:1e:f5 -S '', pid 3898
Script /usr/sbin/pppoe -n -I eth0 -e 1:00:26:2d:54:1e:f5 -S '' finished (pid 3898), status = 0x1
RADATTR plugin removed file /var/run/radattr.ppp0.

 

messages при подключении и последующем отключении пользователя

21:42:00 localhost pppoe-server[3897]: Session 1 created for client 00:26:2d:54:1e:f5 (10.11.0.2) on eth0 using Service-Name ''
Dec  2 21:42:00 localhost pppd[3897]: Plugin radius.so loaded.
Dec  2 21:42:00 localhost pppd[3897]: RADIUS plugin initialized.
Dec  2 21:42:00 localhost pppd[3897]: Plugin radattr.so loaded.
Dec  2 21:42:14 localhost pppd[3897]: RADATTR plugin initialized.
Dec  2 21:42:14 localhost pppd[3897]: pppd 2.4.4 started by root, uid 0
Dec  2 21:42:14 localhost pppd[3897]: Using interface ppp0
Dec  2 21:42:14 localhost pppd[3897]: Connect: ppp0 <--> /dev/pts/0
Dec  2 21:42:17 localhost pppd[3897]: local  IP address 10.11.0.1
Dec  2 21:42:17 localhost pppd[3897]: remote IP address 10.11.0.2
Dec  2 21:45:50 localhost kernel: e1000: eth0 NIC Link is Down
Dec  2 21:46:37 localhost pppd[3897]: No response to 2 echo-requests
Dec  2 21:46:37 localhost pppd[3897]: Serial link appears to be disconnected.
Dec  2 21:46:37 localhost pppd[3897]: Connect time 4.4 minutes.
Dec  2 21:46:37 localhost pppd[3897]: Sent 3415 bytes, received 3122 bytes.
Dec  2 21:46:43 localhost pppd[3897]: Connection terminated.
Dec  2 21:46:43 localhost pppd[3897]: Modem hangup
Dec  2 21:46:43 localhost pppoe[3898]: read (asyncReadFromPPP): Session 1: Input/output error
Dec  2 21:46:44 localhost pppd[3897]: Exit.
Dec  2 21:46:44 localhost pppoe-server[3890]: Session 1 closed for client 00:26:2d:54:1e:f5 (10.11.0.2) on eth0
Dec  2 21:46:44 localhost pppoe-server[3890]: Sent PADT

 

При этом radtest получаемые аттрибуты отображает

 

Sending Access-Request of id 166 to xxx.xxx.xxx.xxx port 1812
User-Name = "user"
User-Password = "password"
NAS-IP-Address = 255.255.255.255
NAS-Port = 10
rad_recv: Access-Accept packet from host xxx.xxx.xxx.xxx:1812, id=166, length=270
Session-Timeout = 86400
Service-Type = Framed-User
Framed-Protocol = PPP
Class = 0x343331
Acct-Interim-Interval = 60
Cisco-AVPair = "lcp:interface-config#1=rate-limit input 2200000 24000 24000 conform-action transmit exceed-action drop"
Cisco-AVPair = "lcp:interface-config#1=rate-limit output 2200000 24000 24000 conform-action transmit exceed-action drop"

 

Что я делаю не так или куда копать?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this