1、让服务器监听某个IP,并且从次IP发送 相应 信息. 主要是为了 服务器同时具有多服务器时候使用.bind_address = *可以指定raidus的使用端口号,使用0表示使用默认的radius端口, 在配置文件 /etc/services配置.port = 0如果需要服务器同时监听其他的IP,可以用listen 块. 下面是例子#listen # IP address on which to listen.# Allowed values are:# dotted quad (1.2.3.4)# hostname ()# wildcard (*)# ipaddr = *# Port on
2、which to listen.# integer port number (1812)# 0 means use /etc/services for the proper port# port = 0# Type of packets to listen for.# auth listen for authentication packets# acct listen for accounting packets# type = auth#hostname_lookups大概是表示为NAS查找它的域名信息?可以通过域名配置NAS?hostname_lookups = no是否允许 core
3、dumps.allow_core_dumps = noexpressions支持,规则和扩展.regular_expressions = yesextended_expressions = yes记录User-Name属性的全称.log_stripped_names = no是否记录认证请求信息到日志文件log_auth = no当请求被拒绝时记录密码, 当请求正确时记录密码log_auth_badpass = nolog_auth_goodpass = no是否允许用户名冲突,即重复同用户同时登陆.强烈不建议启用重复用户.usercollide = no将用户名 小写化, 将密码小写化.lo
4、wer_user = nolower_pass = no是否去除用户名和密码中的空格nospace_user = nonospace_pass = no程序执行并发检查(不理解含义)checkrad = $sbindir/checkrad安全 配置 域security 指在Radius包中的最大属性数目.设置为0表示无穷大.max_attributes = 200发送 Access-Reject 包时候,可以设置一定的延迟,以缓慢DOS攻击,也可以缓慢穷举破解用户名和密码的攻击reject_delay = 1服务器是否对状态服务器的请求信息进行相应.status_server = noPROX
5、Y CONFIGURATION代理域.是否开启代理服务,具体配置参照 $confdir/proxy.confproxy_requests = yes$INCLUDE $confdir/proxy.confClients配置$INCLUDE $confdir/clients.conf是否启用snmp配置,具体配置文件在snmp.confsnmp = no$INCLUDE $confdir/snmp.conf线程池 配置 域thread pool 启动时服务的个数.(在启动Mysql模块后可以明显看到.)当同时进行的请求数超过5个时,会增加线程服务.start_servers = 5最大的服务数m
6、ax_servers = 32当少于最少空闲服务时,它会建立服务,大于最大空闲服务时会停止多余的服务.最少空闲服务,与最大空闲服务.min_spare_servers = 3max_spare_servers = 10每个server最大的请求数.当有内存漏洞时,可能需要配置.max_requests_per_server = 01.3 模块配置1.3.1 PAP 模块# Supports multiple encryption schemes 支持多种加密方式# clear: Clear text 明文# crypt: Unix crypt Unix 加密# md5: MD5 ecnrypt
7、ion MD5加密# sha1: SHA1 encryption. SHA1加密# DEFAULT: crypt 默认是Unix加密pap encryption_scheme = crypt1.3.2 CHAP模块chap authtype = CHAP1.3.3 PAM模块PAM模块 (PAM) 是行业标准验证框架,鉴于很多系统的PAM库都有内存漏洞,所以不建议使用。pam pam_auth = radiusd1.3.4 UNIX 系统用户的 认证模块unix cache = nocache_reload = 600# passwd = /etc/passwd# shadow = /etc/
8、shadow# group = /etc/group radwtmp = $logdir/radwtmp1.3.5 EAP模块详细见$confdir/eap.conf$INCLUDE $confdir/eap.conf1.3.6 MSCHAP 模块mschap #use_mppe = no#require_encryption = yes#require_strong = yes# 为了纠正window发送chap时有时包括域,有时又不包括域的信息.#with_ntdomain_hack = no#ntlm_auth = /path/to/ntlm_auth request-nt-key us
9、ername=%Stripped-User-Name:-%User-Name:-None challenge=%mschap:Challenge:-00 nt-response=%mschap:NT-Response:-001.3.7 LDAP 配置 模块LDAP模块只能在Access-Request packet 中包含明文密码属性才可以被使用。LDAP认证不能在其他任何认证方法中使用。具体配置详见下属章节。(参看doc/rlm_ldap)。1.3.8 passwd 模块Passwd模块允许通过任何passwd样式的文件进行授权,并可以从这些模块中提取属性信息。smbpasswd例子#pas
10、swd etc_smbpasswd # filename = /etc/smbpasswd# format = *User-Name:LM-Password:NT-Password:SMB-Account-CTRL-TEXT:# authtype = MS-CHAP# hashsize = 100# ignorenislike = no# allowmultiplekeys = no#passwd etc_group # filename = /etc/group=Group-Name:*,User-Name# hashsize = 50# ignorenislike = yes# allow
11、multiplekeys = yes# delimiter = 1.3.9 Realm 模块应用在代理上. You can have multiple instances of the realm module to support multiple realm syntaxs at the same time. The search order is defined by the order in the authorize and preacct sections.realm IPASS format = prefixdelimiter = /ignore_default = noigno
12、re_null = no# usernamerealmrealm suffix format = suffix# username%realmrealm realmpercent %# domainuserrealm ntdomain 1.3.10 简单值检查模块(checkval)It can be used to check if an attribute value in the request matches a (possibly multi valued) attribute in the check items This can be used for example for c
13、aller-id authentication. For the module to run, both the request attribute and the check items attribute must exist.checkval # The attribute to look for in the request# Request包中查找的属性名称item-name = Calling-Station-Id# The attribute to look for in check items. Can be multi valued# Check 表中查找的属性名称check
14、-name = Calling-Station-Id# The data type. Can be# 数据类型的种类# string,integer,ipaddr,date,abinary,octetsdata-type = string# If set to yes and we dont find the item-name attribute in the# request then we send back a reject# 如果设置为yes,我们不在request包中查找属性名称直接发送reject.# DEFAULT is no#notfound-reject = no1.3.1
15、1 从写属性模块(attr_rewrite)从写任何包,在认证和计费时都很有用.在拿到包后,可以从写包里属性的内容.#attr_rewrite sanecallerid # attribute = Called-Station-Id# may be packet, replyproxyproxy_reply or config# searchin = packet# searchfor = + # replacewith = # ignore_case = no# new_attribute = no# max_matches = 10# # If set to yes then the re
16、place string will be appended to the original string# append = no1.3.12 预处理radius请求模块(preprocess)预处理Radius请求,在交付其他模块处理前. 包含这两个配置文件. 可以从写那些由一些NAS添加的很奇怪的属性.然后把这些属性转换到一个形态。参见第二章。配置实例:preprocess huntgroups = $confdir/huntgroupshints = $confdir/hintswith_ascend_hack = noascend_channels_per_line = 23with_
17、ntdomain_hack = nowith_specialix_jetstream_hack = nowith_cisco_vsa_hack = no1.3.13 用户文件模块(files)files usersfile = $confdir/usersacctusersfile = $confdir/acct_userspreproxy_usersfile = $confdir/preproxy_userscompat = no1.3.14 日志信息记录模块(detail)将计费信息详细记录到文件上,按照设定时间,每隔一个时段生成一个新文件记录.detail detailfile = $r
18、adacctdir/%Client-IP-Address/detail-%Y%m%ddetailperm = 0600#suppress # User-Password将认证信息详细记录到文件上,按照设定时间,每隔一个时段生成一个新文件记录.detail auth_log detailfile = $radacctdir/%Client-IP-Address/auth-detail-%Y%m%dThis MUST be 0600, otherwise anyone can readthe users passwords!将相应(Reply)信息详细记录到文件上,按照设定时间,每隔一个时段生成一
19、个新文件记录detail reply_log detailfile = $radacctdir/%Client-IP-Address/reply-detail-%Y%m%dThis module logs packets proxied to a home server.detail pre_proxy_log detailfile = $radacctdir/%Client-IP-Address/pre-proxy-detail-%Y%m%dThis module logs response packets from a home server.detail post_proxy_log d
20、etailfile = $radacctdir/%Client-IP-Address/post-proxy-detail-%Y%m%d1.3.15 SQL日志记录模块(sql_log)The rlm_sql_log module appends the SQL queries in a log file which is read later by the radsqlrelay program.它只是将sql语句写到文件里,而后由radsqlrelay程序读取.参看1.3.16 计费唯一sessionid模块针对NAS不停重复Acct-Session-Id values造成混淆的问题,建立唯
21、一的计费sessionidacct_unique key = User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port1.3.17 SQL模块通过$INCLUDE来把数据库的模块的配置文件链接进来.# The following configuration file is for use with MySQL.# For Postgresql, use: $confdir/postgresql.conf# For MS-SQL, use: $confdir/mssql.conf# For Oracle, us
22、e: $confdir/oraclesql.conf$INCLUDE $confdir/sql.conf1.3.18 Radutmp模块记录了那些在线用户的用户名,以及他们从哪里登陆的信息.实例1 radutmpradutmp filename = $logdir/radutmpusername = %User-Namecase_sensitive = yescheck_with_nas = yesperm = 0600callerid = yes实例2 Safe radutmpradutmp sradutmp filename = $logdir/sradutmpperm = 0644no1
23、.3.19 属性过滤模块属性过滤模块,过滤从代理raidus服务器那里收到响应信息里的属性,来确保我们可以发送回给我们的Radius客户端,详细见attrs配置文件.attr_filter attrsfile = $confdir/attrs1.3.20 计数模块从计费包信息中拿去一个属性及它的值,统计这个属性不同值的总数.counter daily filename = $raddbdir/db.dailykey = User-Namecount-attribute = Acct-Session-Timereset = dailycounter-name = Daily-Session-Ti
24、mecheck-name = Max-Daily-Sessionallowed-servicetype = Framed-Usercache-size = 50001.3.21 SQL计数模块该模块所需要的信息都储存raddacct表中。它并不进行在数据库中插入数据项和更新数据项,它完全依赖SQL模块来处理计费信息包。(具体请参照SQL模块配置分析第七章)例1 sqlcounter dailycounter sqlmod-inst = sqlquery = SELECT SUM(AcctSessionTime - GREATEST(%b - UNIX_TIMESTAMP(AcctStartTime), 0) FROM radacct WHERE UserName=%k AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime %b例2sql
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1