• freeradius安装


    1 OS:ubuntu18

    2安装freeradius

    Now to install freeradius, as I use a radius server for user authentication with coovachilli. We will also install some library’s used by coovachilli.

    apt-get update

    apt-get upgrade

    apt-get install freeradius freeradius-utils libtool libssl-dev libcurl4-openssl-dev

    2.1修改共享密钥

    Now we need to set it up. open up /etc/freeradius/clients.conf and change the secret from “testing123” to a secure password that you will remember.

    /etc/freeradius/3.0/clients.conf

    secret = testing123

    2.2添加用户

    Now for adding users to freeradius. What I do is I delete the file /etc/freeradius/users and just create a new file, and start fresh. Here is the format used for user accounts:

    用户名      Cleartext-Password := "用户密码"

    useraccountname Cleartext-Password := "userpass1"

        Simultaneous-Use = 999999,

        Idle-Timeout = 86400,

        Acct-Interim-Interval = 120,

        WISPr-Bandwidth-Max-Down = 1236000,

        WISPr-Bandwidth-Max-Up = 600000

    so as you can guess useraccountname is the name of the user, and userpass1 is the password for that account. For the rest of the stuff

    • Simultaneous-Use = How many times the same account can be logged in at once.
    • Idle-Timeout = How long it will wait to logout the user after idling, in seconds.
    • Acct-Interm-Interval = the number of seconds between each interim update in seconds for a specific session.
    • WISPr-Bandwidth-Max-Down = The max allowed download speed, in bits (not kilobits)
    • WISPr-Bandwidth-Max-Up = The max allowed upload speed, in bits

    So with this, create as many users as you want to use. If you don’t want to limit a users speed, or timeout, then just don’t add those lines to that user and it won’t apply.

    2.3测试

    Next up is testing. restart the freeradius service, and then test the account you made to make sure it authenticates. So, for our above example, we would do the following:

    service freeradius restart

    radtest useraccountname userpass1 localhost 0 SecretCode

    Where SecretCode 共享密钥 is the secret we changed in freeradius earlier in this tutorial. If everything worked, you should get some output like this:

    Sending Access-Request of id 35 to 127.0.0.1 port 1812

    User-Name = "useraccountname"

    User-Password = "userpass1"

    NAS-IP-Address = 127.0.1.1

    NAS-Port = 0

    rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=35, length=56

    Idle-Timeout = 86400

    Acct-Interim-Interval = 120

    WISPr-Bandwidth-Max-Down = 1236000

    WISPr-Bandwidth-Max-Up = 600000

    This means the user was authenticated successfully, and freeradius is now setup!

  • 相关阅读:
    【RuoYi-Vue-Plus】学习笔记 50 - 集成 JSEncrypt 实现请求加密传输(源码)
    工厂方法(Factory Methods),抽象工厂(Abstract Factory )
    calibre和cpolar搭建一个私有的网络书库
    《程序员做饭指南》霸榜 GitHub:不仅有量筒、烧杯,还用上了数学公式?
    【前端】学习前端vue框架,了解了什么是LiveData
    LeetCode 22. Generate Parentheses
    【毕业设计】大数据电商销售预测分析 - python 数据分析
    Java中的String数据类型,String类(字符串)详解
    革命性创新:RFID技术引领汽车零部件加工新时代
    合并文件系统中的满足条件的文件的行
  • 原文地址:https://blog.csdn.net/anzhuangguai/article/details/126794222