Страница 1 из 1

MPD5 + FreeRadius2 проблемы с аккаунтингом

Добавлено: 2010-10-20 14:38:45
volalex
Добрый день!
Вопрос в следующем:
Есть сервер доступа MPD5+FreeRadius2 для pppoe соединений, при включении аккаунтинга в конфиге MPD5 пользователь устанавливает соединение и через пару секунд соединение сбрасывается.

Конфиг МПД5

Код: Выделить всё

startup:
	# configure mpd users
	set user root GfhjkmVGL
	#set user  bar1
	# configure the console
	set console self 127.0.0.1 5005
	set console open
	# configure the web server
	#set web self 0.0.0.0 5006
	#set web open

#
# Default configuration is "dialup"

default:
	load pppoe_server

pppoe_server:

# Create clonable bundle template
	set ippool add def_ip_pool 10.20.30.2 10.20.32.254
	create bundle template B
# Set IP addresses. Peer address will be later replaced by RADIUS.
	set ipcp ranges 10.20.30.1/32 ippool def_ip_pool
	set iface idle 0
	set iface enable tcpmssfix
# Create link template with common info
	create link template common pppoe
# Enable multilink protocol
#	set link enable multilink
# Set bundle template to use
	set link action bundle B
# Enable peer authentication
	set link disable pap eap
	set link enable chap
	load radius
	set pppoe service "*"

# Create templates for ifaces to listen using 'common' template and let them go
	create link template bce1 common
	set link max-children 500
	set pppoe iface bce1
	set link no pap eap
	set link yes chap-md5
	set link keep-alive 20 60
	set link enable incoming
	set link no acfcomp protocomp


radius:
# You can use radius.conf(5), its useful, because you can share the
# same config with userland-ppp and other apps.
	#set radius config /etc/radius.conf
# or specify the server directly here
	set radius server localhost GfhjkmGfhjkmGfhjkm 1812 1813
	set radius retries 3
	set radius timeout 3
# send the given IP in the RAD_NAS_IP_ADDRESS attribute to the server.
	set radius me 127.0.0.1
# send accounting updates every 5 minutes
#	set auth acct-update 300
# enable RADIUS, and fallback to mpd.secret, if RADIUS auth failed
	set auth enable radius-auth
# enable RADIUS accounting
#	set auth enable radius-acct
# protect our requests with the message-authenticator
	set radius enable message-authentic
Запись в логе радиуса при конекте пользователя

Код: Выделить всё

Oct 20 14:46:19 hostel2 mpd: Incoming PPPoE connection request via bce1: for service "" from 00:1b:78:93:51:7c
Oct 20 14:46:19 hostel2 mpd: [bce1-2] Accepting PPPoE connection
Oct 20 14:46:19 hostel2 mpd: [bce1-2] Link: OPEN event
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: Open event
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: state change Initial --> Starting
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: LayerStart
Oct 20 14:46:19 hostel2 mpd: [bce1-2] PPPoE: connection successful
Oct 20 14:46:19 hostel2 mpd: [bce1-2] Link: UP event
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: Up event
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: state change Starting --> Req-Sent
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: SendConfigReq #1
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MRU 1492
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MAGICNUM 66222a60
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   AUTHPROTO CHAP MSOFTv2
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: rec'd Configure Request #1 (Req-Sent)
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MRU 1492
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MAGICNUM ea5e4800
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: SendConfigAck #1
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MRU 1492
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MAGICNUM ea5e4800
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: state change Req-Sent --> Ack-Sent
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: rec'd Configure Ack #1 (Ack-Sent)
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MRU 1492
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   MAGICNUM 66222a60
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   AUTHPROTO CHAP MSOFTv2
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: state change Ack-Sent --> Opened
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: auth: peer wants nothing, I want CHAP
Oct 20 14:46:19 hostel2 mpd: [bce1-2] CHAP: sending CHALLENGE #1 len: 21
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: LayerUp
Oct 20 14:46:19 hostel2 mpd: [bce1-2] CHAP: rec'd RESPONSE #1 len: 64
Oct 20 14:46:19 hostel2 mpd: [bce1-2]   Name: "ssubilling"
Oct 20 14:46:19 hostel2 mpd: [bce1-2] AUTH: Trying RADIUS
Oct 20 14:46:19 hostel2 mpd: [bce1-2] RADIUS: Authenticating user 'ssubilling'
Oct 20 14:46:19 hostel2 mpd: [bce1-2] RADIUS: Rec'd RAD_ACCESS_ACCEPT for user 'ssubilling'
Oct 20 14:46:19 hostel2 mpd: [bce1-2] AUTH: RADIUS returned: authenticated
Oct 20 14:46:19 hostel2 mpd: [bce1-2] CHAP: Auth return status: authenticated
Oct 20 14:46:19 hostel2 mpd: [bce1-2] CHAP: Reply message: S=75D24EDC0D9D8BF79A656992FD6FC3128CA4EE6E
Oct 20 14:46:19 hostel2 mpd: [bce1-2] CHAP: sending SUCCESS #1 len: 46
Oct 20 14:46:19 hostel2 mpd: [bce1-2] LCP: authorization successful
Oct 20 14:46:19 hostel2 mpd: [bce1-2] Link: Matched action 'bundle "B" ""'
Oct 20 14:46:19 hostel2 mpd: [bce1-2] Creating new bundle using template "B".
Oct 20 14:46:19 hostel2 mpd: [B-1] Bundle: Interface ng0 created
Oct 20 14:46:19 hostel2 mpd: [bce1-2] Link: Join bundle "B-1"
Oct 20 14:46:19 hostel2 mpd: [B-1] Bundle: Status update: up 1 link, total bandwidth 64000 bps
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: Open event
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: state change Initial --> Starting
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: LayerStart
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: Up event
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: Got IP 10.20.30.2 from pool "def_ip_pool" for peer
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: state change Starting --> Req-Sent
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: SendConfigReq #1
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 10.20.30.1
Oct 20 14:46:19 hostel2 mpd: [B-1]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Oct 20 14:46:19 hostel2 mpd: [bce1-2] RADIUS: Accounting user 'ssubilling' (Type: 1)
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: rec'd Configure Request #1 (Req-Sent)
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 0.0.0.0
Oct 20 14:46:19 hostel2 mpd: [B-1]     NAKing with 10.20.30.2
Oct 20 14:46:19 hostel2 mpd: [B-1]   PRIDNS 0.0.0.0
Oct 20 14:46:19 hostel2 mpd: [B-1]   SECDNS 0.0.0.0
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: SendConfigRej #1
Oct 20 14:46:19 hostel2 mpd: [B-1]   PRIDNS 0.0.0.0
Oct 20 14:46:19 hostel2 mpd: [B-1]   SECDNS 0.0.0.0
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: rec'd Configure Reject #1 (Req-Sent)
Oct 20 14:46:19 hostel2 mpd: [B-1]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: SendConfigReq #2
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 10.20.30.1
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: rec'd Configure Request #2 (Req-Sent)
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 0.0.0.0
Oct 20 14:46:19 hostel2 mpd: [B-1]     NAKing with 10.20.30.2
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: SendConfigNak #2
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 10.20.30.2
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: rec'd Configure Ack #2 (Req-Sent)
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 10.20.30.1
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: state change Req-Sent --> Ack-Rcvd
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: rec'd Configure Request #3 (Ack-Rcvd)
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 10.20.30.2
Oct 20 14:46:19 hostel2 mpd: [B-1]     10.20.30.2 is OK
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: SendConfigAck #3
Oct 20 14:46:19 hostel2 mpd: [B-1]   IPADDR 10.20.30.2
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: state change Ack-Rcvd --> Opened
Oct 20 14:46:19 hostel2 mpd: [B-1] IPCP: LayerUp
Oct 20 14:46:19 hostel2 mpd: [B-1]   10.20.30.1 -> 10.20.30.2
Oct 20 14:46:19 hostel2 mpd: [B-1] IFACE: Up event
Oct 20 14:46:28 hostel2 mpd: [bce1-2] RADIUS: rad_send_request for user 'ssubilling' failed: No valid RADIUS responses received
Oct 20 14:46:28 hostel2 mpd: [bce1-2] ACCT: Close link due to accounting start error
Oct 20 14:46:28 hostel2 mpd: [bce1-2] ACCT: Link close requested by the accounting
Oct 20 14:46:28 hostel2 mpd: [bce1-2] Link: CLOSE event
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: Close event
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: state change Opened --> Closing
Oct 20 14:46:28 hostel2 mpd: [bce1-2] Link: Leave bundle "B-1"
Oct 20 14:46:28 hostel2 mpd: [bce1-2] RADIUS: Accounting user 'ssubilling' (Type: 2)
Oct 20 14:46:28 hostel2 mpd: [B-1] Bundle: Status update: up 0 links, total bandwidth 9600 bps
Oct 20 14:46:28 hostel2 mpd: [B-1] IPCP: Close event
Oct 20 14:46:28 hostel2 mpd: [B-1] IPCP: state change Opened --> Closing
Oct 20 14:46:28 hostel2 mpd: [B-1] IPCP: SendTerminateReq #3
Oct 20 14:46:28 hostel2 mpd: [B-1] IPCP: LayerDown
Oct 20 14:46:28 hostel2 mpd: [B-1] IFACE: Down event
Oct 20 14:46:28 hostel2 mpd: [B-1] IPCP: Down event
Oct 20 14:46:28 hostel2 mpd: [B-1] IPCP: LayerFinish
Oct 20 14:46:28 hostel2 mpd: [B-1] Bundle: No NCPs left. Closing links...
Oct 20 14:46:28 hostel2 mpd: [B-1] IPCP: state change Closing --> Initial
Oct 20 14:46:28 hostel2 mpd: [B-1] Bundle: Shutdown
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: SendTerminateReq #2
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: LayerDown
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: rec'd Terminate Ack #2 (Closing)
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: state change Closing --> Closed
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: LayerFinish
Oct 20 14:46:28 hostel2 mpd: [bce1-2] Link: DOWN event
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: Down event
Oct 20 14:46:28 hostel2 mpd: [bce1-2] LCP: state change Closed --> Initial
Oct 20 14:46:37 hostel2 mpd: [bce1-2] RADIUS: rad_send_request for user 'ssubilling' failed: No valid RADIUS responses received
Oct 20 14:46:37 hostel2 mpd: [bce1-2] Link: SHUTDOWN event
Oct 20 14:46:37 hostel2 mpd: [bce1-2] Link: Shutdown
Особо интересна строчка:

Код: Выделить всё

Oct 20 14:46:28 hostel2 mpd: [bce1-2] RADIUS: rad_send_request for user 'ssubilling' failed: No valid RADIUS responses received
При комментировании аккаунтинга в МПД5 все работает нормально.

Re: MPD5 + FreeRadius2 проблемы с аккаунтингом

Добавлено: 2010-10-20 14:44:38
Гость
читайте на здоровье