我正在尝试使用 FreeRADIUS、Dell N2048 (DN OS6.3.3.9) 交换机作为身份验证器和 Ubuntu 机器作为请求者来设置 MAC 授权 802.1X。我已按照本指南配置 FreeRADIUS:https ://wiki.freeradius.org/guide/Mac-Auth#plain-mac-auth
我的 FreeRADIUS 配置文件如下所示(MAC 地址已被替换):
sudo cat /etc/freeradius/3.0/sites-available/default
listen {
type = auth
ipaddr = 10.0.180.100
port = 0
limit {
max_connections = 16
lifetime = 0
idle_timeout = 30
}
}
authorize {
preprocess
rewrite_calling_station_id
authorized_macs
if (!ok) {
reject
}
else {
update control {
Cleartext-Password := &Calling-Station-ID
Auth-Type = Accept
}
}
}
sudo cat /etc/freeradius/3.0/mods-available/files
files authorized_macs {
key = "%{Calling-Station-ID}"
usersfile = ${confdir}/authorized_macs
}
sudo cat /etc/freeradius/3.0/authorized_macs
AA-BB-CC-DD-EE-FF
Cleartext-Password := "AA-BB-CC-DD-EE-FF",
User-Name := "AA-BB-CC-DD-EE-FF",
Service-Type = Framed-User,
Tunnel-Type = VLAN,
Tunnel-Medium-Type = 6,
Tunnel-Private-Group-id = 150,
Reply-Message = "Device %{Calling-Station-ID} authorized"
Ubuntu 客户端上的 wpa_supplicant.conf :
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=0
network={
key_mgmt=IEEE8021X
eap=MD5
identity="AA-BB-CC-DD-EE-FF"
password="AA-BB-CC-DD-EE-FF"
eapol_flags=0
}
开关 dot1x 配置:
!
dot1x system-auth-control
aaa authentication dot1x default radius
aaa authorization network default radius
radius-server host auth 10.0.180.100
primary
name "Default-RADIUS-Server"
usage 802.1x
key 7 "..."
exit
!
interface Gi1/0/1
switchport mode general
dot1x port-control mac-based
dot1x mac-auth-bypass
exit
!
使用此配置,一切都会正确处理。RADIUS 服务器根据其 MAC 地址授权请求者。但是,交换机拒绝来自服务器的 EAP Access-Accept。而我在这里迷路了。交换机给我的唯一线索是 EAP 数据包格式错误:
<189> Aug 2 10:28:08 dell-n2048p-users-1-1 DOT1X[dot1xTask]: dot1x_radius.c(654) 58882 %% EAP message not received from server.RADIUS server did not send required EAP message.
<189> Aug 2 10:27:08 dell-n2048p-users-1-1 DOT1X[dot1xTask]: dot1x_radius.c(654) 58879 %% EAP message not received from server.RADIUS server did not send required EAP message.
<190> Aug 2 10:27:08 dell-n2048p-users-1-1 RADIUS[dot1xTask]: radius_api.c(1002) 58878 %% RADIUS: radiusAccessRequestMsgSend(): Updated Global radius server entry with ipaddr 10.0.180.100'
它也通过 Wireshark 显示在请求者身上。
我尝试使用请求者 MAC 地址作为用户名和密码,并将其设为 Framed-User,但它不会改变任何内容。我已将 MAC 地址作为 Cleartext-Password 添加到 EAP 响应消息(Cleartext-Password := &Calling-Station-ID)中,以防这将被接受,但它也不会改变任何内容。即使通过调整超时,启用 MAB 似乎也没有任何作用。
我在配置中遗漏了什么吗?什么会使 EAP 响应被视为格式错误的数据包?
谢谢