找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: xywsk

[radius] Steel_Belted_Radius和 routeos 接口的几个文件

[复制链接]
发表于 2006-11-17 14:48:59 | 显示全部楼层
网站里给的驴子地址已经没有人了。。。
routeros
回复

使用道具 举报

发表于 2006-11-20 09:38:54 | 显示全部楼层
routeros
回复

使用道具 举报

发表于 2006-11-20 10:09:26 | 显示全部楼层
这个现在是5.02了
routeros
回复

使用道具 举报

发表于 2007-1-4 12:50:48 | 显示全部楼层
配置Steel-Belted Radius 和SQL Server 连接

Steel-Belted Radius 是一款多功能的Radius服务器,可以实现认证、计费等功能;它也可以和多种数据库相连接,实现其功能。我们就来看一下Steel-Belted Radius 和SQL Server连接的配置:

说明:本文采用的 Steel-Belted Radius版本为5.02.1335,SQL Server版本为SQL Server 2000 简体中文版。

一、建立系统DSN;

使用ODBC 数据源管理器建立连接SQL Server 的系统DSN,命名为LocalServer;

二、配置 Sqlauth.aut 实现认证功能

Steel-Belted Radius 默认并不支持SQL Server 连接,需要我们进行相应的设置,大部分都是在Sqlauth.aut中完成。以下是一个已完成的Sqlauth.aut

[Bootstrap]
LibraryName=sqlauth.dll
Enable=1
InitializationString=SQL Server

[Settings]
Connect=DSN=LocalServer;UID=saWD=123456
SQL=SELECT Password,Profile FROM userlist WHERE UserName = %name and Enable = 1
ParameterMarker=?
MaxConcurrent=30
ConcurrentTimeout=30
ConnectTimeout=25
QueryTimeout=25
WaitReconnect=2
MaxWaitReconnect=360
PasswordFormat = 0
DefaultResults = 0

[FailedSuccessResultAttributes]
at Reply-Message ='Please re-enter your password dot '
at Filter-Id ='3'

[Server]
;s1=2
;s2=2

;[Server/s1]
;Connect=DSN=<dsn_name_here>;UID=<username_for_dB>WD=<password_for_dB>

;[Server/s2]
;Connect=DSN=<dsn_name_here>;UID=<username_for_dB>WD=<password_for_dB>

[Results]
Password=1
Profile=2
;UserName=3/40s
;Alias=2/48

[Failure]
Accept=1
Profile=xyz
FullName=Remote User

各字段含义如下:

Enable :是否启用SQL Server ;1为是 0为否;
InitializationString:SQL Server 连接的名称 ,值随意;
Connect:数据库连接设置 DSN为我们为我们第一步建立的系统DSN名称;UID和PWD为数据库连接的用户名和密码;
SQL:数据库查询语句,我们的用户认证就靠它了,其中%name为用户输入的用户名(用户输入的密码为%Password)。如果这条查询语句有值返回,则用户验证成功,否则验证失败,所以我们就可以构建查询语句来实现用户验证,例如我就增加了一个Enable字段来控制用户验证。
PasswordFormat:密码类型 0为自适应;

配置好Sqlauth dot aut,然后重启Steel-Belted Radius;启动好后,用admin 连接到服务器,如果你在server的status中看到 SQL connection established ,恭喜你,你的Steel-Belted Radius已经和SQL Server 连接成功了,如果有问题的话,可以在Steel-Belted Radius安装目录的Service文件夹中查看日志文件,其中记录了连接失败的原因,日志文件是以年月日命名的。

三、配置 Sqlacct.acc 实现用户记帐

[Bootstrap]
LibraryName=sqlacct.dll
Enable=1
InitializationString=SQLAcc

[Settings]
Connect=DSN=LocalServer;UID=sa;PWD=123456
ParameterMarker=?
MaxConcurrent=20
ConcurrentTimeout=30
ConnectTimeout=25
QueryTimeout=25
WaitReconnect=2
MaxWaitReconnect=360
;LogLevel=2

;[Server]
;s1=2
;s2=2
;This achieves 50/50 duty

;[Server/s1]
;Connect=DSN=<dns_name_here>;UID=<username_for_dB>;PWD=<password_for_dB>

;[Server/s2]
;Connect=DSN=<dns_name_here>;UID=<username_for_dB>;PWD=<password_for_dB>

[Type]
1=User
2=User
3=User
;Packets of type 1,2, and 3 will be accounted as below

[Type/User]
SQL=INSERT INTO accounting (TransTime, FullName, Authenticator, NASName, NASAddress, Type, PacketsIn, PacketsOut) \
VALUES (%TransactionTime, %FullName/40s, %AuthType/40s, %NASName/40s, %NASAddress, %Type, at Acct-Input-Packets/n, @Acct-Output-Packets/n)


Sqlacct dot acc中大部分配置和前面的Sqlauth.aut 相同,记帐功能同样也是靠SQL语句完成的,其中各个变量及其含义可以查看account.ini和 RFC2866  RADIUS 记帐协议。

通过对以上文件的配置,我们可以实现简单的用户认证记帐,各位网友也可以对其修改,实现其他各种功能

附:各字段的数据类型

/xs A text string of length x.
/s indicates a string with the default length of 256
/xb A binary data string of length x. A binary string is different from
an text string in that it is not NULL-terminated and is not
restricted to ASCII characters.
/b indicates a binary data string with the default length of 256.
/n 32-bit integer
/n8 8-bit integer
/n16 16-bit integer
/n32 32-bit integer (same as /n)
/t Timestamp
routeros
回复

使用道具 举报

发表于 2007-1-8 18:09:55 | 显示全部楼层
怎么用啊,要是做个教程就妙了,
routeros
回复

使用道具 举报

发表于 2007-1-14 09:28:26 | 显示全部楼层
这么没有说明文件的啊
routeros
回复

使用道具 举报

发表于 2007-2-7 00:27:04 | 显示全部楼层
能告诉我,接口文件怎么用的吗,我直接覆盖到安装目录下,好象没有用
routeros
回复

使用道具 举报

发表于 2007-9-24 00:24:01 | 显示全部楼层
原来还在这个接口文件呀,我以为装好就能用了,怪不得我弄了一整天都还没有成功。
routeros
回复

使用道具 举报

发表于 2007-9-24 23:08:26 | 显示全部楼层
谢谢楼主
routeros
回复

使用道具 举报

发表于 2007-9-27 23:10:10 | 显示全部楼层
趁年轻,多学点东西
routeros
回复

使用道具 举报

发表于 2007-11-9 15:08:07 | 显示全部楼层
为什么我的记账功能可以实现,但是认证功能无法实现。设置跟上面的一摸一样,是不是跟Profile有关系啊?请高手帮帮忙。
routeros
回复

使用道具 举报

发表于 2007-11-10 00:57:55 | 显示全部楼层
谢谢啦!下来看看!
routeros
回复

使用道具 举报

发表于 2008-7-21 00:02:39 | 显示全部楼层

sadasd

sadsad
routeros
回复

使用道具 举报

发表于 2008-7-21 00:03:32 | 显示全部楼层

sdfds

fsdf
routeros
回复

使用道具 举报

发表于 2008-7-21 11:37:25 | 显示全部楼层
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-6-1 21:42 , Processed in 0.118855 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表