./configure (如果出现错误,需要安装相应的devel rpm)

make

make install

生成所需的证书

/usr/local/etc/raddb/certs/bootstrap

ln -s /usr/local/sbin/rc.radiusd /etc/rc.d/init.d/radiusd

ln -s /usr/local/etc/raddb /etc/raddb

chkconfig radiusd on

/etc/rc.d/init.d/radiusd start

[root@centos5]# /usr/local/sbin/radiusd -v

radiusd: FreeRADIUS Version 2.0.5, for host i686-pc-linux-gnu, built on May 17 2008 at 12:20:44

Copyright (C) 1999-2008 The FreeRADIUS server project and contributors.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

You may redistribute copies of FreeRADIUS under the terms of the

GNU General Public License.

For more information about these matters, see the file named COPYRIGHT.2、 FreeRADIUS SQL Module通用的SQL前端(rlm_sql)+数据库后端驱动(rlm_sql_mysql)前端: rlm_sql

中间驱动:rlm_sql_mysql后端: mysql_databaseComment:rlm_sql_mysql不是一个完整的mysql client, 仅仅是rlm_sql、mysql database间的一个中间层。 3、MySQL Schema3、1 7个table的说明stop and start records logging table radaccta single user check and reply table radcheck

radreplyGroupcheck and reply tableradgroupcheck

radgroupreplyusername to group relationships are stored in this table radusergroupTo store post-authentication data tableradpostauth 3、2 create radius database mysql> create database radius;mysql>\. /usr/local/etc/raddb/sql/mysql/schema.sql

mysql> show tables;

+------------------+

| Tables_in_radius |

+------------------+

| radacct |

| radcheck |

| radgroupcheck |

| radgroupreply |

| radpostauth |

| radreply |

| radusergroup |

+------------------+

7 rows in set (0.09 sec)

create NAS table

msyql> use radius;

mysql> \. /usr/local/etc/raddb/sql/mysql/nas.sql

mysql> show tables;

+------------------+

| Tables_in_radius |

+------------------+

| nas |

| radacct |

| radcheck |

| radgroupcheck |

| radgroupreply |

| radpostauth |

| radreply |

| radusergroup |

+------------------+

8 rows in set (0.03 sec) 3、3 建立FreeRadius用户和授权mysql>\. /usr/local/etc/raddb/sql/mysql/admin.sql

[root@centos5 mysql]# cat admin.sql

# -*- text -*-

##

## admin.sql -- MySQL commands for creating the RADIUS user.

##

## WARNING: You should change 'localhost' and 'radpass'

## to something else. Also update raddb/sql.conf

## with the new RADIUS password.

##

## $Id: admin.sql,v 1.1 2008/04/30 08:41:30 aland Exp $

#

# Create default administrator for RADIUS

#

CREATE USER 'radius'@'localhost';

SET PASSWORD FOR 'radius'@'localhost' = PASSWORD('radpass');

# The server can read any table in SQL

GRANT SELECT ON radius.* TO 'radius'@'localhost';

# The server can write to the accounting and post-auth logging table.

#

# i.e.

GRANT ALL on radius.radacct TO 'radius'@'localhost';

GRANT ALL on radius.radpostauth TO 'radius'@'localhost'; 4、配置FreeRadius使用mysql schema 4、1 在 sql.conf 配置database的连接参数,指定所使用的table database = "mysql"

driver = "rlm_sql_${database}"

server = "localhost"

login = "radius"

password = "radpass"

radius_db = "radius"

acct_table1 = "radacct"

acct_table2 = "radacct"

postauth_table = "radpostauth"

authcheck_table = "radcheck"

authreply_table = "radreply"

groupcheck_table = "radgroupcheck"

groupreply_table = "radgroupreply"

usergroup_table = "radusergroup"

[root@centos5 raddb]# mysql -u radius -pradpass radius

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 4 to server version: 5.0.22-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> 4、2配置FreeRadius 查询 radius nas table # Set to 'yes' to read radius clients from the database ('nas' table)

# Clients will ONLY be read on server startup. For performance

# and security reasons, finding clients via SQL queries CANNOT

# be done "live" while the server is running.

#

#

readclients = yes

# Table to keep radius client info

nas_table = "nas"注释client.conf 所有行,Client从nas表中查询。clients.conf:

RADIUS clients/NAS configurations. Note that NAS is the term used

in RADIUS terminology. To simpilify things, just think of it as

authenticator in our 3-party model. 5、配置freeradius使用MySQL Database 5、1 users 注释users所有内容, 用户信息驻留在数据库radcheck tableper user configurations. Think of users as supplicants in our 3-party

model. Note that user configurations could reside in other places like

a MySQL database instead of the users file. vi /usr/local/etc/raddb/sites-available/inner-tunnel

去掉SQL前的注释

authorize {

chap

mschap

unix

suffix

update control {

Proxy-To-Realm := LOCAL

}

eap {

ok = return

} sql expiration

logintime

pap

}

authenticate {

Auth-Type PAP {

pap

}

Auth-Type CHAP {

chap

}

Auth-Type MS-CHAP {

mschap

}

unix

eap

} 5、2测试数据准备 nas table

INSERT INTO `nas` (`id`, `nasname`, `shortname`, `type`, `ports`, `secret`, `community`, `description`) VALUES

(1, '127.0.0.1', 'localhost', 'other', 1812, 'testing123', NULL, 'RADIUS Client');

radcheck table

INSERT INTO `radcheck` (`id`, `username`, `attribute`, `op`, `value`) VALUES

(2, 'root', 'User-Password', '==', '888888');

radusergroup table

INSERT INTO `radusergroup` (`username`, `groupname`, `priority`) VALUES

('root', 'user', 1) 5、3测试 [root@centos5 ~]# radtest root 888888 localhost 1812 testing123

Sending Access-Request of id 32 to 127.0.0.1 port 1812

User-Name = "root"

User-Password = "888888"

NAS-IP-Address = 10.180.22.10

NAS-Port = 1812

rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=32, length=20

[root@centos5 ~]#

commment: root 为linux的一个用户。

rlm sql mysql_FreeRADIUS with rlm_sql_mysql相关推荐

  1. rlm sql mysql_FreeRADIUS with rlm_sql_mysql

    ./configure (如果出现错误,需要安装相应的devel rpm) make make install 生成所需的证书 /usr/local/etc/raddb/certs/bootstrap ...

  2. rlm sql mysql.so_冰天雪地跪求高手解决--Could not link driver rlm_sql_mysql: file not found

    我在freenas这个上面安装了mysql+freeradius mysql是在用户上面自带命令 pkg_add -r mysql51-server 启动出错 [root@localhost ~]ra ...

  3. rlm sql mysql.so_找了好久,终于找到一篇关于FREERADIUS新版的安装说明。和以前的1.X.X还是有很大不同的。...

    一.安装openssl 二.安装mysql 直接用命令#yun groupinstall "MySQL Database"安装MySQL数据库. 安装好后,#service mys ...

  4. rlm sql mysql.so_UBUUTU7.10上安装配置freeradius+mysql+rp-pppoe手记

    5.安装freeradius1.1.2 将源码包解压缩: # tar –zxvf freeradius_version 进入生成的目录中进行编译安装: 编译之前,先处理一下MySQL的库,freera ...

  5. Freeradius+mysql+daloradius简单安装配置

    概述 之前说了Freeradius与AD结合进行802.1x认证方面的内容.本例则在之前实验配置的基础之上,将Freeradius与mysql.daloradius结合,实现可以通过web方式管理ra ...

  6. Less还是Sass,Stylus我们到底选择谁

    做前端 处理,那CSS是你的特长,随着工程的增大,CSS的预处理越来越重要,或者我们要维护我们的css,工作会越来越困难,造成这些困难的很大原因源于 CSS 是一门非程序式语言,没有变量.函数.SCO ...

  7. java 必备面试必备

    1.JDK 和 JRE 有什么区别? JDK(Java Development Kit),Java开发工具包 JRE(Java Runtime Environment),Java运行环境 JDK中包含 ...

  8. oracle exfsys 下 rlm$evtcleanup,RLM$SCHDNEGACTION 运行导致负载问题

    在监控系统上发现系统 schedule job 运行的如下两个package占用cpu较高 (95%左右), 而且持续一定时间, 简单查询,发现这两个package 应该是和Expression Fi ...

  9. oracle恢复exfsys,ORA-27468 EXFSYS.RLM$EVTCLEANUP任务引起的故障

    ORA-27468 EXFSYS.RLM$EVTCLEANUP任务引起的故障 Errors in file /oracle/admin/cdx/bdump/cdx2_j000_663594.trc: ...

最新文章

  1. 高性能Linux服务器运维实战,《高性能Linux服务器构建实战》笔记
  2. 利用Eclipse的Update组件实现适合企业应用的更新组件(1)
  3. BZOJ 3910 并查集+线段树合并
  4. rust核电分解机在哪里_腐蚀RUST个工厂地点位置介绍 腐蚀如何找到相应的工厂
  5. shell 25个常用命令
  6. python FOR循环
  7. 2020年中国基层医疗研究报告
  8. 计算机可用内存分配失败,你们都被忽悠了! 其实可用内存大才有用
  9. python安装opencv whl_Python 3.x 安装opencv+opencv_contrib的操作方法
  10. 如何巧妙的使用pandas结合xlsxwriter实现对表格的读写以及插入图片操作
  11. System Center 2012 R2 支持的SQL版本
  12. Unity3D-后期处理 Post-process Volume Profile
  13. 工程数学概率论统计简明教程第二版复习大纲
  14. Navicat 数据库可视化工具远程连接MySQL及基本操作
  15. 如何把win7官方补丁集成到win7iso镜像中
  16. 【2021年】百度搜索词获取,获取百度搜索的关键词
  17. JAVA基础七 类和对象
  18. 学习速写的方法有哪些?如何快速学会速写?
  19. 前台图片压缩转换base64提交到后台
  20. 带bitlocker解密的pe_BLDU 一键解锁bitlocker加密的磁盘

热门文章

  1. 达芬奇密码 ——只有您自己才能打开的密码
  2. 小朵机器人安卓叫什么_小朵机器人app|小朵机器人手机版下载v1.3.2-乐游网安卓下载...
  3. 对(纳米)光子学的一点认识
  4. 在word文档中如何输入复杂的公式,和特殊符号
  5. NRZ、NRZI编码
  6. 从 Stream 到 Kotlin 再到 SPL,谁更快?
  7. 阿里云备案域名和普通备案域名的区别
  8. apiCloud jpush java 消息推送使用
  9. 23考研截至目前,计算机/软件等专业调剂信息集合!
  10. Cesium实现流动线/动态纹理