简体   繁体   English

Freeradius 没有加载客户端 conf

[英]Freeradius not loading up client conf

this is my clients.conf file这是我的 clients.conf 文件

client localhost {
ipaddr  = 127.0.0.1
netmask= 32
secret  = 'MYSECRET'
}
client adconnector {
ipaddr  = 172.16.0.0
netmask = 16
secret  = 'MYSECRET'
}

sudo radiusd -X shows up this sudo radiusd -X 显示这个

.

radiusd: #### Loading Clients ####
 client localhost {
 netmask = 32
 require_message_authenticator = no
  limit {
  max_connections = 16
  lifetime = 0
  idle_timeout = 30
  }
 }
No 'ipaddr' or 'ipv4addr' or 'ipv6addr' field found in client localhost. Please fix your configuration
Support for old-style clients will be removed in a future release
/etc/raddb/clients.conf[1]: secret must be at least 1 character long

I don't get what am I doing wrong?我不明白我做错了什么? It says no ippadr is found but it is clearly mentioned in the conf and also with secret length.它说没有找到 ippadr,但在 conf 中清楚地提到了它,并且还有秘密长度。

I have just pasted your exact clients.conf contents as given in the question into a default install of the latest version, and it works correctly:我刚刚将问题中给出的确切clients.conf内容粘贴到最新版本的默认安装中,并且它可以正常工作:

radiusd: #### Loading Clients ####
 client localhost {
    ipaddr = 127.0.0.1
    netmask = 32
    require_message_authenticator = no
    secret = <<< secret >>>
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
 client adconnector {
    ipaddr = 172.16.0.0
    netmask = 16
    require_message_authenticator = no
    secret = <<< secret >>>
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }

I suspect that you are either editing the wrong file, or there are suspect characters (UTF-8?) in the file that is confusing the parser.我怀疑您正在编辑错误的文件,或者文件中存在混淆解析器的可疑字符(UTF-8?)。

Check the top of the -X debug output, it will say which file is being read, eg检查 -X debug output 的顶部,它会说正在读取哪个文件,例如

including configuration file /etc/raddb/clients.conf

Ensure this is the file you are editing, and there are no symlinks in the wrong places.确保这是您正在编辑的文件,并且在错误的地方没有符号链接。

As another note, there is no need to use the old configuration options, or to quote strings unless they contain things that actually need quoting.另外请注意,没有必要使用旧的配置选项,或者引用字符串,除非它们包含实际需要引用的内容。 For example, the following is cleaner and more recent style config:例如,以下是更清晰和更新的样式配置:

client localhost {
  ipv4addr = 127.0.0.1
  secret = MYSECRET
}
client adconnector {
  ipv4addr = 172.16.0.0/16
  secret = MYSECRET
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM