尝试 connect/send 访问 Freeradius 服务器请求时出错
Error when trying to connect/send Access request to Freeradius server
我在 docker 上使用 freeradius 并试图在 时得到回复已发送访问请求。
当radtest是运行时使用:radtest bob testpw 127.0.0.1 1812 sharedSecret
Sent Access-Request Id 18 from 0.0.0.0:56219 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "testpw"
NAS-IP-Address = 172.17.0.2
NAS-Port = 1812
Message-Authenticator = 0x00
Cleartext-Password = "testpw"
Sent Access-Request Id 18 from 0.0.0.0:56219 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "testpw"
NAS-IP-Address = 172.17.0.2
NAS-Port = 1812
Message-Authenticator = 0x00
Cleartext-Password = "testpw"
Sent Access-Request Id 18 from 0.0.0.0:56219 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "testpw"
NAS-IP-Address = 172.17.0.2
NAS-Port = 1812
Message-Authenticator = 0x00
Cleartext-Password = "testpw"
(0) No reply from server for ID 18 socket 3
我知道这通常发生在共享密钥错误的情况下,但它与配置文件中提到的相同。
调试时出现以下错误。
Ignoring request to auth address * port 1812 bound to server default
from unknown client 172.17.0.3 port 60699 proto udp Ready to process
requests
出现错误,服务器没有返回任何响应。
clients.conf文件如下;
client dockernet {
ipaddr = 172.17.0.0/16
secret = sharedSecret
}
和授权文件;
bob Cleartext-Password := "testpw"
默认文件;
server default {
listen {
type = auth
ipv4addr = *
# ipv6addr = *
# ipaddr = *
port = 5
# interface = eth0
# clients = per_socket_clients
recv_buff = 65536
limit {
max_connections = 16
lifetime = 0
idle_timeout = 30
}
}
authorize {
update request {
&Tmp-String-0 := "%{string:User-Password}"
&User-Password := "%{string:Tmp-String-0}"
}
# filter_username
# filter_password
preprocess
# operator-name
# cui
# auth_log
chap
mschap
digest
# wimax
# IPASS
suffix
# ntdomain
eap {
ok = return
# updated = return
}
#
# unix
# Read the 'users' file. In v3, this is located in
# raddb/mods-config/files/authorize
files
-sql
# smbpasswd
-ldap
# daily
expiration
logintime
pap
# Autz-Type Status-Server {
# }
}
authenticate {
ntlm_auth
Auth-Type PAP {
pap
}
Auth-Type CHAP {
chap
}
Auth-Type MS-CHAP {
mschap
}
mschap
digest
# pam
# Auth-Type LDAP {
# ldap
# }
#
# Allow EAP authentication.
eap
# Auth-Type eap {
# eap {
# handled = 1
# }
# if (handled && (Response-Packet-Type == Access-Challenge)) {
# attr_filter.access_challenge.post-auth
# handled # override the "updated" code from attr_filter
# }
# }
}
#
# Pre-accounting. Decide which accounting type to use.
#
preacct {
preprocess
#
# Merge Acct-[Input|Output]-Gigawords and Acct-[Input-Output]-Octets
# into a single 64bit counter Acct-[Input|Output]-Octets64.
#
# acct_counters64
# update request {
# &FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
# }
acct_unique
# IPASS
suffix
# ntdomain
#
# Read the 'acct_users' file
files
}
预计 Access-Accept 或 Access-Reject。但是没有反应,调试时在日志中给出了上述错误。
有效!在我将 clients.conf 文件更改为具有网络掩码并且 not ipaddr = 172.17.0.0/16
client dockernet {
ipaddr = 172.17.0.0
secret = sharedSecret
netmask = 24
shortname = dockernet
}
我在 docker 上使用 freeradius 并试图在 时得到回复已发送访问请求。
当radtest是运行时使用:radtest bob testpw 127.0.0.1 1812 sharedSecret
Sent Access-Request Id 18 from 0.0.0.0:56219 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "testpw"
NAS-IP-Address = 172.17.0.2
NAS-Port = 1812
Message-Authenticator = 0x00
Cleartext-Password = "testpw"
Sent Access-Request Id 18 from 0.0.0.0:56219 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "testpw"
NAS-IP-Address = 172.17.0.2
NAS-Port = 1812
Message-Authenticator = 0x00
Cleartext-Password = "testpw"
Sent Access-Request Id 18 from 0.0.0.0:56219 to 127.0.0.1:1812 length 73
User-Name = "bob"
User-Password = "testpw"
NAS-IP-Address = 172.17.0.2
NAS-Port = 1812
Message-Authenticator = 0x00
Cleartext-Password = "testpw"
(0) No reply from server for ID 18 socket 3
我知道这通常发生在共享密钥错误的情况下,但它与配置文件中提到的相同。
调试时出现以下错误。
Ignoring request to auth address * port 1812 bound to server default from unknown client 172.17.0.3 port 60699 proto udp Ready to process requests
出现错误,服务器没有返回任何响应。
clients.conf文件如下;
client dockernet {
ipaddr = 172.17.0.0/16
secret = sharedSecret
}
和授权文件;
bob Cleartext-Password := "testpw"
默认文件;
server default {
listen {
type = auth
ipv4addr = *
# ipv6addr = *
# ipaddr = *
port = 5
# interface = eth0
# clients = per_socket_clients
recv_buff = 65536
limit {
max_connections = 16
lifetime = 0
idle_timeout = 30
}
}
authorize {
update request {
&Tmp-String-0 := "%{string:User-Password}"
&User-Password := "%{string:Tmp-String-0}"
}
# filter_username
# filter_password
preprocess
# operator-name
# cui
# auth_log
chap
mschap
digest
# wimax
# IPASS
suffix
# ntdomain
eap {
ok = return
# updated = return
}
#
# unix
# Read the 'users' file. In v3, this is located in
# raddb/mods-config/files/authorize
files
-sql
# smbpasswd
-ldap
# daily
expiration
logintime
pap
# Autz-Type Status-Server {
# }
}
authenticate {
ntlm_auth
Auth-Type PAP {
pap
}
Auth-Type CHAP {
chap
}
Auth-Type MS-CHAP {
mschap
}
mschap
digest
# pam
# Auth-Type LDAP {
# ldap
# }
#
# Allow EAP authentication.
eap
# Auth-Type eap {
# eap {
# handled = 1
# }
# if (handled && (Response-Packet-Type == Access-Challenge)) {
# attr_filter.access_challenge.post-auth
# handled # override the "updated" code from attr_filter
# }
# }
}
#
# Pre-accounting. Decide which accounting type to use.
#
preacct {
preprocess
#
# Merge Acct-[Input|Output]-Gigawords and Acct-[Input-Output]-Octets
# into a single 64bit counter Acct-[Input|Output]-Octets64.
#
# acct_counters64
# update request {
# &FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
# }
acct_unique
# IPASS
suffix
# ntdomain
#
# Read the 'acct_users' file
files
}
预计 Access-Accept 或 Access-Reject。但是没有反应,调试时在日志中给出了上述错误。
有效!在我将 clients.conf 文件更改为具有网络掩码并且 not ipaddr = 172.17.0.0/16
client dockernet {
ipaddr = 172.17.0.0
secret = sharedSecret
netmask = 24
shortname = dockernet
}