freeradius简介
freeradius安装
./configure --prefix=/opt/freeradius-server --with-openssl-includes=/usr/local/include/ --with-openssl-libraries=/usr/local/lib64 --with-rlm-mysql-lib-dir=/opt/mysql/lib/ --with-rlm-mysql-include-dir=/opt/mysql/include/
make
make install
freeradius配置
(1) 增加ac配置
文件:/opt/freeradius-server/etc/raddb/clients.conf添加如下配置:client host_vlan123 {ipaddr = 10.8.2.253secret = secretrequire_message_authenticator = no
}
(2) 数据库配置
(2) 数据库配置
文件:/opt/freeradius-server/etc/raddb/sql.confdatabase = "mysql"## Which FreeRADIUS driver to use.#driver = "rlm_sql_${database}"# Connection info:server = "localhost"#port = 3306login = "root"password = "123456"
(3) 修改认证和计费配置
文件:/usr/local/freeradius-server/etc/raddb/sites-available/default把authorize{} 、accounting {}中的sql前面的#去掉,并把authorize{}中的files前加#
(4) openssl配置
文件 :/etc/raddb/radiusd.conf将allow_vulnerable_openssl = no改为allow_vulnerable_openssl = yes。
(5) 启用sql支持
文件:/etc/raddb/radiusd.conf将modules模块下的$INCLUDE sql.conf的注释去掉
测试
./radtest tempuser tempuser 10.8.122.77:1812 11 testing123
结果中出现:rad_recv: Access-Accept packet from host 127.0.0.1 port 1812表示认证成功
结果中出现:rad_recv: Access-Accept packet from host 127.0.0.1 port 1812表示认证成功
可能遇到的问题
rlm_sql_mysql.so没有的问题,安装方法如下:
wget ftp://ftp.pbone.net/mirror/dl.iuscommunity.org/pub/ius/development/CentOS/6/x86_64/mysql56-devel-5.6.10-2.ius.centos6.x86_64.rpm
rpm -ivh mysql56*rpm
wget ftp://ftp.pbone.net/mirror/dl.iuscommunity.org/pub/ius/development/CentOS/6/x86_64/mysql56-devel-5.6.10-2.ius.centos6.x86_64.rpm
rpm -ivh mysql56*rpm
来源:CSDN
作者:Pasenger
链接:https://blog.csdn.net/Pasenger/article/details/51311954