1、获取安装源
(1) wget https://github.com/FreeRADIUS/freeradius-server/archive/v3.0.x.zip
(2)unzip v3.0.x.zip
(3)cd freeradius-server-3.0.x/
2、创建ubuntu相关依赖
(1) sudo apt-get install devscripts quilt debhelper fakeroot equivs
(2)fakeroot debian/rules debian/control
(3)fakeroot debian/rules clean
(4)sudo mk-build-deps -ir debian/control
3、构建源
(1)./configure
(2)make
(3)sudo make install
4、测试
(1)修改配置文件(/usr/local/etc/raddb/users):将一下注释打开,增加用户(steve)和 密码(testing)
steve Cleartext-Password := “testing”
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Address = 172.16.3.33,
Framed-IP-Netmask = 255.255.255.0,
Framed-Routing = Broadcast-Listen,
Framed-Filter-Id = “std.ppp”,
Framed-MTU = 1500,
Framed-Compression = Van-Jacobsen-TCP-IP
(2)启用两个窗口分别在/freeradius-server-3.0.x路径下执行radiusd -X,另一个窗口/usr/local/etc/raddb执行radtest steve testing localhost 1812 testing123。
(3)执行radtest steve testing localhost 1812 testing123后显示Sent Access-Accept则为成功。
(4)报错:&Module-Failure-Message += ‘Rejected: User-Name contains multiple …s’,将/usr/local/etc/raddb/sites-enabled/default下边注释
#if (session-state:User-Name && reply:User-Name && request:User-Name && (reply:User-Name == request:User-Name)) {
# update reply {
# &User-Name !* ANY
# }
#}
#update {
# &reply: += &session-state:
#}