我正在尝试在我的公司环境中为来宾用户设置 Packetfence,并绕过 MAC 访问。我已经完成了官方 Packetfence 安装指南https://packetfence.org/doc/PacketFence_Installation_Guide.html#_getting_started中的所有操作。具有 RADIUS VLAN 实施的 802.1X 工作正常,但具有 Web 身份验证的 MAB 未显示强制门户。我使用与管理和门户相同的界面。此管理接口与交换机管理接口在同一 VLAN 中,例如。VLANID 为 2。我正在使用 Cisco Catalyst 2960-S 并使用 IOS 15。可从 VLAN 3 的工作站访问门户,VLAN 3 连接到未执行 802.1X 的访问端口或http://PF_MANAGEMENT_IP/captive上的 MAB -门户网站,但无法从正在执行 MAB 身份验证的计算机访问。我根据指南中的说明定义了交换机注册 ACL:
ip access-list extended registration
deny ip any host PF_MANAGEMENT_IP
permit tcp any any eq www
permit tcp any any eq 443
并通过 switch 角色添加角色到此 ACL 的注册名称,以及通过 Web 身份验证注册 URL 的角色: http://PF_MANAGEMENT_IP/Cisco::Catalyst_2960
当我对此进行测试时,它会通过请求者获得正确的 VLAN 3,我将其定义为注册,并且浏览器弹出窗口带有http://www.msftconnecttest.com/redirect url,最后更改为http:/ /PF_MANAGEMENT_IP/Cisco::Catalyst_2960但连接时间放在浏览器中。我什至尝试明确访问该网址但没有成功。顺便提一下,请求者获得了正确的 IP/子网 DHCP 和 DNS,它们是我的生产 DHCP 和 DNS。但我无法打开 Captive Portal。我也设置了开关:
ip device tracking
ip http server
ip secure-server
我检查了 packetfence.log 并且通信正常,没有错误,分配了正确的 VLAN。还检查了 radius.log 并且所有通信都是正确的。我还检查了 http.portal 日志并且没有日志,除了我看到请求者在注册期间没有触摸门户,这很明显。我认为问题出在 Cisco 交换机重定向和门户之间。但我不知道如何解决它。如果您需要切换 epm 调试日志,请随时提出请求,但对我来说这似乎没有错误,但我不是这方面的专家。
这是与 dot1x、mab 相关的部分开关配置。我从头开始这样做,因为目前我无法访问该开关:
dot1x system-auth-control
aaa new-model
aaa group server radius packetfence
server PF_MANAGEMENT_IP auth-port 1812 acct-port 1813
aaa authentication login default local
aaa authentication dot1x default group packetfence
aaa authorization network default group packetfence
radius-server host PF_MANAGEMENT_IP auth-port 1812 acct-port 1813 timeout 2 key ExampleSecret
radius-server vsa send authentication
snmp-server community mysnmp RO
snmp-server community myWritesnmp RW
interface GigabitEthernet 1/0/1
switchport mode access
authentication host-mode single-host
authentication order dot1x mab
authentication priority dot1x mab
authentication port-control auto
authentication periodic
authentication timer restart 10800
authentication timer reauthenticate 10800
mab
no snmp trap link-status
dot1x pae authenticator
dot1x timeout quiet-period 2
dot1x timeout tx-period 3
aaa server radius dynamic-author
client PF_MANAGEMENT_IP server-key ExampleSecret
port 3799
ip device tracking
ip http server
ip http secure-server
ip access-list extended registration
deny ip any host PF_MANAGEMENT_IP
permit tcp any any eq www
permit tcp any any eq 443
如您所见,我只使用一个端口 Gi1/0/1 进行测试。我的设置中有两个 VLAN 相关:VLAN ID 2:PF_MANAGEMENT_IP -> PacketFence 管理接口和强制门户接口 ip 在此 VLAN 中。SWITCH_MGMT_IP -> 交换机管理 IP 在此 VLAN 中。
VLAN ID 3:TEST_WORKSTATION_IP -> 请求者 IP 地址在此 VLAN 中。
VLAN ID 4:生产 DHCP 和 DNS 在此 VLAN 中。
没有限制/ACL 阻止这些 VLAN 之间的通信。VLAN管理由L3 Switch完成,网络架构为collapse core,接入交换机就是这个用于测试的交换机。