freeRadius客户端和服务器分别安装实验

freeradius-client-1.1.6 安装
 
(1)安装非常简单,和普通软件相同都是下面三步:
 

./configure                       

make
make install

 
(2)编译后生成的可执行程序
 

/usr/local/sbin/
|-- sbin
   |-- radacct                          发送计费包
   |-- radembedded                      生成配置文件
   |-- radexample                       发送鉴权包
   |-- radiusclient                     发送鉴权包
   |-- radlogin                         发送鉴权包
   `-- radstatus                        查看服务器状态


 
(3)配置文件目录
 

/usr/local/etc/radiusclient
|-- radiusclient
    |-- dictionary                        属性字典
    |-- dictionary.ascend
    |-- dictionary.compat
    |-- dictionary.merit
    |-- dictionary.sip
    |-- issue
    |-- port-id-map
    |-- radiusclient.conf                 客户端的配置文件
    `-- servers                           服务器配置文件

 
freeradius-client-1.1.6 配置
 
(1)/usr/local/etc/radiusclient/radiusclient.conf

#鉴权顺序 
auth_order    radius,local

#login 登陆次数
login_tries     1

#超时时间,单位:秒
login_timeout 5    

nologin /etc/nologin

issue    /usr/local/etc/radiusclient/issue

#鉴权服务器IP或name,也可以加上端口、共享口令,例:localhost:1812:testing
authserver     localhost

#计费服务器IP或name
acctserver     localhost

服务器共享口令文件路径
servers        /usr/local/etc/radiusclient/servers

dictionary     /usr/local/etc/radiusclient/dictionary

login_radius    /usr/local/sbin/login.radius

seqfile        /var/run/radius.seq

mapfile        /usr/local/etc/radiusclient/port-id-map

#默认域名
default_realm

#radius 登陆超时时间,单位:秒
radius_timeout    5

#radius 登陆次数
radius_retries    1

radius_deadtime    0

bindaddr *
#本地登陆 程序
login_local    /bin/login


(2)/usr/local/etc/radiusclient/servers
 

localhost testing123

 


freeradius-server-2.1.10 简单安装和配置(为测试client)

(1)安装

 

./configure
make
make install

(2)/usr/local/etc/raddb/user  (用户名:jj  口令:jj)

 jj Cleartext-Password := "jj"
  Service-Type = Framed-User,
  Framed-Protocol = PPP,
  Framed-IP-Address = 192.168.2.179,
  Framed-IP-Netmask = 255.255.255.0,
  Framed-Routing = Broadcast-Listen,
  Framed-Filter-Id = "std.ppp",
  Framed-MTU = 1500,
  Framed-Compression = Van-Jacobsen-TCP-IP

(3)/usr/local/etc/raddb/clients.conf

 client localhost {

#共享口令
 secret = testing123
 shortname = private-network
 }


测试结果:

运行radius服务器
[root@localhost freeradius-client-1.1.6]# radiusd -X
测试客户端
[root@localhost freeradius-client-1.1.6]# radlogin 
($Id: radlogin.c,v 1.9 2008/01/09 07:04:18 sobomax Exp $)
-----------------------------------------------------
Linux 2.6.18-164.el5 (localhost.localdomain) (port 0)
-----------------------------------------------------

login: jj
Password: 
RADIUS: Authentication OK
This is the dummy login.radius script. If you want that this script
does something useful you'll have to replace it.

The following RADIUS environment variables are set:
RADIUS_FILTER_ID=std.ppp
RADIUS_FRAMED_COMPRESSION=Van-Jacobson-TCP-IP
RADIUS_FRAMED_IP_ADDRESS=192.168.2.179
RADIUS_FRAMED_IP_NETMASK=255.255.255.0
RADIUS_FRAMED_MTU=1500
RADIUS_FRAMED_PROTOCOL=PPP
RADIUS_FRAMED_ROUTING=Broadcast-Listen
RADIUS_SERVICE_TYPE=Framed-User
RADIUS_USER_NAME=jj

Bye, bye.

[root@localhost freeradius-client-1.1.6]# radexample 
login: jj
Password: 
"jj" RADIUS Authentication OK

 
 

[root@localhost freeradius-client-1.1.6]# radacct(回车)
User-Name=jj
Password=jj
Acct-Status-Type=7  (按Ctrl+D)
RADIUS accounting OK

转载于:https://www.cnblogs.com/quliuliu2013/p/11164288.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值