1、使用yum安装即可,确定安装的是freeradius2,而不是1。如果以前又freeradius,先卸载
     yum remove freeradius
     安装
     yum install freeradius2
     yum install freeradius2-utils  //这个含radtest,用户测试

默认freeradius是使用files方式认证用户,如果不使用数据库,到此安装就搞定了
2、安装完成后就修改配置文件。
     vi /etc/raddb/users
     找到steve,注释去掉,将steve改成你的用户名。可以建立多个用户,如下:
     dalon   Cleartext-Password := "testing"
     test    Cleartext-Password := "testing123"
3、 测试
      可执行文件为 /usr/sbin/radius
      /usr/sbin/radius -X       //debug模式运行,可以看到详细过程。
      radtest 测试server是否能响应:     
      radtest test testing localhost 0 testing123
      test和testing分别为用户名和密钥,对于配置文件users里面的内容。
      localhost为配置文件clients.conf中的内容,默认针对localhost密钥为testing123
      0 意思为NAS-PORT 0,默认为0,所以不用配置。见文件 /etc/raddb/radiusd.conf中配置,如下:
      listen {
       ipaddr = *       //监听IPV4所有地址
#        ipv6addr = ::
        port = 0        //nas-port
        type = acct
#       interface = eth0
#       clients = per_socket_clients
}
测试正确的结果如下(下面是测试IPV6):
[root@CentOS ~]# radtest -6 test test123 ::1 0 testing123
Sending Access-Request of id 44 to ::1 port 1812
        User-Name = "test"
        User-Password = "test123"
        NAS-IPv6-Address = ::1
        NAS-Port = 0
        Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host ::1 port 1812, id=44, length=20
4、将服务器改成监听IPV6
需要修改文件
a) /etc/raddb/radiusd.conf
    将两个listen {}中 ipaddr = *  注掉,ipv6addr = ::   取消注释
b) /etc/raddb/clients.conf
将localhost中的监听地址改成ipv6的,如下:
client localhost {
        ipv6addr = ::1  # any.  ::1 == localhost

建立一组client(下面的例子是3000::/64网段为例,也可以使用::/0):
client 3000::/64 {
        secret          = testing123
        shortname       = ipv6client     //为区别名,和别的组不一样即可
}

5. 验证通过的debug信息:
rad_recv: Access-Request packet from host 3000::abcd port 60378, id=232, length=45
        User-Name = "dalon"
        User-Password = "testing"
# Executing section authorize from file /etc/raddb/sites-enabled/default
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
++[digest] returns noop
[suffix] No '@' in User-Name = "dalon", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
[files] users: Matched entry dalon at line 76
++[files] returns ok
++[expiration] returns noop
++[logintime] returns noop
++[pap] returns updated
Found Auth-Type = PAP
# Executing group from file /etc/raddb/sites-enabled/default
+- entering group PAP {...}
[pap] login attempt with password "testing"
[pap] Using clear text password "testing"
[pap] User authenticated successfully
++[pap] returns ok
# Executing section post-auth from file /etc/raddb/sites-enabled/default
+- entering group post-auth {...}
++[exec] returns noop
Sending Access-Accept of id 232 to 3000::abcd port 60378
Finished request 29.
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 29 ID 232 with timestamp +531
Ready to process requests.

转载于:https://blog.51cto.com/ybtest/1832956

freeradius 在centos上的安装和调试相关推荐

  1. centos llvm安装_在CentOS上编译安装llvm-3.8.1详细教程

    在CentOS上编译安装llvm-3.8.1详细教程 2020/1/11  18:12 1682次 注:CentOS版本是6.8,6.x版本的操作类似 安装需求: [list] [*]Cmake: 3 ...

  2. Postgresql在CentOS上的安装(脚本在线安装)

    场景 PostGresSQL简介与Windows上的安装教程: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/113981563 ...

  3. CentOS上快速安装Oracle11g数据库

    CentOS上快速安装Oracle11g数据库 下载RMP-GPG-KEY wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /e ...

  4. CentOS上快速安装Oracle服务器脚本

    CentOS上快速安装Oracle服务器脚本 配置repos源 # 注释下列代码,可能导致源问题 # cd /etc/yum.repos.d # wget http://yum.oracle.com/ ...

  5. 在64位的 CentOS 上只安装64位的软件包

    2010年02月17日 | 标签: centos, yum 在64位 CentOS 上避免安装32位软件包,只需要在 yum.conf 加上一行过滤掉 i386, i686 的软件包就可以了: # v ...

  6. 在PK体系下的CentOS上编译安装 MySQL 5.7

    本文主要介绍如何在 PK 体系下的 CentOS 上编译安装 MySQL 5.7,本文使用的操作系统环境为: CentOS 版本: # cat /etc/redhat-release CentOS L ...

  7. ELK-日志收集系统在Centos上环境安装

    ELK-日志收集系统在Centos上环境安装 文章目录 ELK-日志收集系统在Centos上环境安装 前言 安装 elastcsearch6.5.4安装 准备 学习资料 启动 创建新用户 取掉只能本机 ...

  8. 我的docker随笔9:docker在centos上的安装

    本文介绍在centos 7 64bit主机上进行docker的安装. 更新国内源 略. 安装 安装系统工具: yum install -y yum-utils device-mapper-persis ...

  9. 干净虚拟机(centos 6.4)上从头到尾安装并调试Mdrill(四)

    2019独角兽企业重金招聘Python工程师标准>>> 13.Jdbc测试 替换191.168.3.149为实际IP import java.sql.Connection; impo ...

最新文章

  1. vue插槽样式_Vue为什么要有插槽
  2. 一分钟学会看k线图_看K线图:阴跌如钝刀
  3. 一款好看的单页个人引导页源码
  4. server安装 sql 发生mof语法错误_WIN7系统无法安装server2008R2,提示语法MOF错误
  5. jQuery animate()动画效果
  6. 小米盒子刷arm linux,最新小米盒子3s刷原生安卓系统图文教程!值得收藏
  7. 计算机键盘盲打方法,【字母键盘练习方法指导】教你如何快速打字
  8. 百度云盘--ABAQUS_Python后处理教程
  9. Android模拟器6.0,逍遥安卓模拟器新版6.0.0 刺激战场手游流畅不卡专版
  10. 华为路由器ws5200虚拟服务器,华为路由器端口映射怎么弄?华为WS5200路由添加端口映射规则设置...
  11. control命令详解
  12. 2010.4 计算机二级等级考试 vb上机试题 第一套 的答案,2012年计算机二级VB上机试题及解题思路第44套...
  13. 如何清理 WinSxS 文件夹-2022版
  14. Cadence Allegro设置区域规则
  15. redis中存集合_如何在Redis中管理集合
  16. VS code常用插件
  17. 作业1:C#使用委托实现信用卡用户定时还款功能
  18. java 图片宽高_[Java]获取图片高和宽
  19. 关于grep,sed,awk的几个用法
  20. 动态cg怎么提取_galgame怎么提取动态cg(千彰cg怎么拿)

热门文章

  1. C++基础教程之指针
  2. Swift 类与结构体
  3. 面试题:HashMap和ConcurrentHashMap的区别,HashMap的底层源码。
  4. java设计模式--基础思想总结--抽象类与架构设计思想
  5. 浪漫桃心的Android表白程序
  6. Oracle 连接查询一
  7. Python 远程桌面协议RDPY简介
  8. YAF 关闭错误异常使用trigger_error来处理
  9. Windows 8(Windows Developer Preview)先体验
  10. 第五章项目整体管理重点--转载