Centos6 FreeRADIUS 安裝與管理

1.RADIUS Remote Access DIalin User Service

2.RADIUS 的任務 – AAA
Authentication/ 認證 (AuthN)
Authorization/ 授權 (AuthZ)
Accounting/ 計費 (Acct)

3.安裝  freeradius (Centos6)
yum install freeradius freeradius-utils

或安裝全部的 FreeRADIUS套件:
yum install freeradius*

4. start radiusd
/etc/init.d/radiusd start

或 start radiusd with debug mode
radiusd -X

5./etc/raddb/clients.conf

5-1.系統 default 值:

client 127.0.0.1{
secret = testing123
shorename = localhost
nastype = other
}

5-2.新增一個 client rule:

client 192.168.1.0/24 {
secret = testing123
shortname = private-network
}

6./etc/raddb/users

……
# On no match, the user is denied access.
00000000000A Auth-Type := Local, User-Password := “00000000000A”
#00000000000B Auth-Type := Local, User-Password := “00000000000B”

同時登入最大數為1:Simultaneous-Use :=’1′
macadd Auth-Type := Local, Simultaneous-Use :=’1′,User-Password := “macadd”

7.重新啟動radiusd:

/etc/init.d/radiusd restart

8.FreeRADIUS 測試工具 radtest

語法:
radtest < 帳號 > < 密碼 > < 認證伺服器 IP>:<PORT> 0 < secret >

8-1.範例:
radtest testing password 127.0.0.1 0 testing123

Sending Access-Request of id 133 to 127.0.0.1 port 1812
User-Name = “testing”
User-Password = “password”
NAS-IP-Address = 192.168.1.1
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=133, length=20

8-2範例:
radtest 00000000000A 00000000000A 127.0.0.1 0 testing123