整理中
安装
- 网络用户或设备接入前进行验证
- 授权设备使用特定网络
- 核算并跟踪这些服务的使用情况
http://www.anmeng.com.cn/hostagent
https://www.drupal.org/project/radius_client/git-instructions
大公司都有哪些开源项目~~~阿里,百度,腾讯,360,新浪,网易,小米等 - chulia - 博客园 (cnblogs.com)
https://www.cnblogs.com/chulia20002001/p/7571270.html
RADIUS uses User Datagram Protocol (UDP) port 1812 for authentication and 1813 for accounting.
https://www.cnblogs.com/chulia20002001/p/6971916.html
http://blog.sina.com.cn/s/blog_6187f3a10100eodr.html
http://blog.sina.com.cn/s/articlelist_1636299681_0_1.html
http://blog.chinaunix.net/uid-9967220-id-1995615.html
http://blog.sina.com.cn/s/blog_6151984a0100eyiz.html
https://wiki.freeradius.org/Home
http://freeradius.org/download.html
- 启用AAA认证模型
- 定义身份认证列表
- 应用身份验证列表
radius端口
iptables -A INPUT -p udp --dport 1812 -j ACCEPT iptables -A INPUT -p udp --dport 1813 -j ACCEPT
解决
yum install libtalloc libtalloc-devel openssl openssl-devel gcc* -y
./configure --prefix=/application/radius make make install
测试
执行 /application/radius/sbin/radiusd -X 报错 ,再src/main/version.c 中有要求ssl需要1.1及以上版本
Debugger not attached Refusing to start with libssl version OpenSSL 1.0.1e-fips 11 Feb 2013 0x1000105f (1.0.1e release) (in range 1.0.1 release - 1.0.1t rele) Security advisory CVE-2016-6304 (OCSP status request extension) For more information see https://www.openssl.org/news/secadv/20160922.txt Once you have verified libssl has been correctly patched, set security.allow_vulnerable_openssl = 'CVE-2016-6304' Refusing to start with libssl version OpenSSL 1.0.1e-fips 11 Feb 2013 0x1000105f (1.0.1e release) (in range 1.0.1 dev - 1.0.1f release) Security advisory CVE-2014-0160 (Heartbleed) For more information see http://heartbleed.com
解决办法
[root@oracle raddb]# grep allow_vulnerable_openssl /application/radius/etc/raddb/radiusd.conf # allow_vulnerable_openssl: Allow the server to start with allow_vulnerable_openssl = yes
配置文件
radiusd.conf 主配置文件
clients.conf 客户端的必要信息。includingIP addresses and shared secrets. This file is referenced from the radiusd.conf file. 被主配置文件引用
dictionary 定义服务器本地属性
proxy.conf 定义上级server 包含ip 和共享证书 被主配置文件引用
sites-enabled/default 默认的虚拟服务器 处理认证和统计请求,被主配置文件引用
sites-enabled/inner-tunnel 定义认证方法
users 服务端对用户的配置文件
hints PPP or SLIP 用户名的提示信息
huntgroups 定义用户组信息
acct_users A users file for Accounting-Request packets 3.0为找到该文件
子目录
certs/ 存放 EAP证书
mods-available/ 可加载的模块,使用主配置文件加载
mods-enabled/ 模块的配置文件 目录下文件是mods-available/ 内文件的软连接
sites-available/ 定义了可操作的虚拟主机,每一个虚拟主机封装了一个逻辑功能
sites-enabled/ 存放虚拟主机 文件是软连接
mods-config/sql/ 存放多种类型数据库的文件 例如 mysql 2.x 版本目录为sql/
radiusd.conf
The radiusd.conf file contains the server configuration. When the server starts, it reads this file and caches it. The data is parsed to set values for variables or to determine other configuration, such as modules.
变量
radiusd.conf 包含大量变量 一般情况下我们不需要修改
user = radius 一般设置为 *radiusd* 需要对radiusd.conf 有read 权限 group = radius 一般设置为 *radiusd* 需要对radiusd.conf 有read 权限 max_requests = 16384 请求队列的最大值 过低服务器会丢掉请求,并打印错误信息,过高将会使用更多的内存 0 为没有限制
log模块
log{ destination = files #files 日志输出到文件 #syslog 日志输出到syslog #stdout 标准输出 #stderr 标准错误 file = ${logdir}/radius.log #记录日志的位置 syslog_facility = daemon #syslog日志级别 auth = no #记录认证成功或失败的信息 可选值{no, yes} msg_goodpass = "" #自定义信息发送到日志中 ,需要依赖 auth = yes msg_badpass = "" #自定义信息发送到日志中 ,需要依赖 auth = yes }
安全模块
max_attributes = 200 限制发送到服务端的属性数量,防止恶意发送太多导致内存跑满 reject_delay = 1 拒接的延迟时间,避免通过字典尝试密码 值 1 - 5 status_server = yes 检测服务器状态。保持默认
线程控制
thread pool { start_servers = 5 #启动服务开启5个线程 max_servers = 32 #允许的最大的线程数 min_spare_servers = 3 空闲时的最小空闲线程 ,由于启动线程需要一定时间和资源因此最好保留一定的空闲线程 max_spare_servers = 10 空闲时最大的空闲线程 max_requests_per_server = 0 定期清理旧的线程 0代表不清理。官方建议不使用该参数,此处保持默认即可 }
模块配置
modules{ sql { 加载mysql模块 driver = "rlm_sql_mysql" dialect = "mysql" server = "localhost" } }
实例化
instantiate { 定义模块的加载顺序 }
变量格式
key = value
key = "${ 变量名}"
配置文件的包含和引用
- foo = bar
other = "my ${foo}"
- foo = bar
$INCLUDE other.conf
术语和定义
request
reply
control
proxy-request
proxy-reply
coa
coa-reply
最小化配置文件
cat small.conf listen { type = auth ipaddr = * port = 0 } client localhost { # allow packets from 127.0.0.1 ipaddr = 127.0.0.1 secret = testing123 } modules { # We don’t use any modules } authorize { # return Access-Accept for PAP and CHAP update control { Auth-Type := Accept } }
radiusd -X -n small
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏