这几天在华为Eudumon1000E-G上配置PORTAL服务,开始照着文档上的示例来配,但根本不成功,经过一番研究终于搞定,下面把配置步骤总结一下:
组网结构:
VLAN1000从G0/0/1(二层接口)上来,DHCP分配IP地址用于接入WIFI认证的终端
GigabitEthernet0/0/0.100 三层接入子接口,信任区域,接入的是PORTAL服务器、WEB服务器和RADIUS服务器。这些服务器的地址是:10.103.129.34
GigabitEthernet0/0/0.101 三层接入子接口,非信任区域,接入互联网
采用第三方RADIUS和第三方PORTAL服务,有FW参与的PORTAL认证
1、配置各接口,并加入各自的安全区域
#注意这里我新建了一个区域wifi,专门用于接入WIFI认证的用户
interface GigabitEthernet0/0/0.100
vlan-type dot1q 100
description manage_interface
ip address 172.16.0.2 255.255.255.252
service-manage ping permit
service-manage ssh permit
#
interface GigabitEthernet0/0/0.101
vlan-type dot1q 101
description public_interface
ip address 10.254.1.2 255.255.255.252
#
vlan batch 1000
interface Vlanif1000
ip address 172.16.4.1 255.255.255.0
service-manage ping permit
dhcp select interface
dhcp server lease day 0 hour 4 minute 0
dhcp server dns-list 202.103.224.68
interface GigabitEthernet0/0/1
portswitch
description dT:wifi_user
undo shutdown
port link-type access
port default vlan 1000
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0.100
add interface MEth0/0/0
firewall zone name wifi id 4
set priority 10
add interface Vlanif1000
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/0.101
2、配置路由,保证各区域三层互通
请按自己的网络自行配置
3、配置认证、记帐和授权方案,都采用RADIUS处理
authentication-scheme radius
authentication-mode radius
authorization-scheme radius
authorization-mode radius
accounting-scheme radius
accounting-mode radius
4、配置RADIUS服务器模板
radius-server template portal_radius
radius-server shared-key cipher abcd1234
radius-server authentication 10.103.129.34 1912 source ip-address 172.16.0.2 weight 80
radius-server accounting 10.103.129.34 1913 source ip-address 172.16.0.2 weight 80
radius-server user-name domain-included
radius-server group-filter class
radius-server authorization 10.103.129.34 shared-key cipher abcd1234
5、配置认证域,一个用于WIFI认证,一个用于MAC认证
#两个域配置是一样的,分别配置是为了域名不一样,程序处理的时候方便一点
aaa
domain macauth
authentication-scheme radius
accounting-scheme radius
authorization-scheme radius
radius-server portal_radius
service-type internetaccess
internet-access mode password
reference user current-domain
domain wifi
authentication-scheme radius
accounting-scheme radius
authorization-scheme radius
radius-server portal_radius
service-type internetaccess
internet-access mode password
reference user current-domain
6、配置PORTAL服务器
web-auth-server default
server-ip 10.103.129.34
port 50100
shared-key cipher abcd1234
source-ip 172.16.0.2
7、配置PORTAL模板
#注意不要配置服务器检测,因为我的PORTAL服务器是自己用PYTHON写的,不支持心跳检测。否则由于逃生机制,FW会略过认证机制,直接放通网络。
user-manage portal-template portal 0
portal-index 0
portal-url http://10.103.129.34:8081
portal-url parameter receive-interface nasid
redirect-mode 302
还要配置一个PORTAL认证模板
authentication-profile name portal_authen_default
portal-access-profile default
access-domain wifi #指定认证域
还得在LOOPBACK0绑定
interface LoopBack0
authentication-profile portal_authen_default
8、配置认证策略
auth-policy
#配置一个白名单,主要是放行DNS服务器,或者其它你想要免认证访问的服务器
#要注意认证策略的默认行为是不认证
rule name wifi_whitelist
source-zone wifi
destination-zone untrust
destination-address 202.103.224.68 mask 255.255.255.255
destination-address 202.103.225.68 mask 255.255.255.255
action none
#访问互联网,需要进行认证,并引用之前定义的PORTAL模板
rule name wifi_internet
source-zone wifi
destination-zone untrust
action auth portal-template portal
9、配置安全策略
#先配置一个服务,我们的PORTAL WEB服务器端口是8081,这里面需要事先定义
#请注意安全策略的默认行为是拒绝访问
ip service-set myportal type object 1024
service 0 protocol tcp destination-port 8081 description myportal_web
这里面只列出了跟PORTAL认证相关的策略
security-policy
允许wifi用户访问PORTAL服务
rule name wifi_to_portal
source-zone wifi
destination-zone trust
destination-address 10.103.129.34 mask 255.255.255.255
service myportal
action permit
防火墙本身要跟RADIUS和PORTAL服务交互的,这里面需要放通
rule name local_to_portal
source-zone local
destination-zone trust
destination-address 10.103.129.34 mask 255.255.255.255
action permit
#PORTAL服务器需要访问防火墙的2000端口,这里也要放通
rule name portal_to_local
source-zone trust
destination-zone local
source-address 10.103.129.34 mask 255.255.255.255
action permit
#需要放通WIFI区域访问互联网
#防火墙的处理策略是,先认证策略再安全策略,最后才是nat策略,一定要搞清楚每种策略的默认行为,这样配置起来才不会搞
rule name wifi_to_internet
source-zone wifi
destination-zone untrust
action permit
10、配置NAT
nat-policy
rule name wifi_to_internet
source-zone wifi
destination-zone untrust
action source-nat easy-ip
这里就基本把PORTAL认证配置好了
下面配置mac认证
11、配置mac认证模板,绑定之前建立的macauth域
authentication-profile name portal_authen_mac
mac-access-profile mac_access_profile
access-domain macauth
12、在二层接口绑定mac认证模板
interface GigabitEthernet0/0/1
authentication-profile portal_authen_mac
13、启用MAC地址认证
user-manage online-user mac-address check enable
user-manage mac-access enable
其它注意事项
1、不要开启服务器检测,原因前面已经说过了
2、RADIUS下发的属性一定要注意,如果属性有误会导致PORTAL认证失败,我之前下发了华为的限速属性,可能限速过高,导致了PORTAL认证失败,建议只下发Filter-Id和Reply-Message这两个属性,其中Filter-Id是对应防火墙上的安全组。用user-manage security group wifi 建立安全组
华为Eudumon1000配置PORTAL认证
最新推荐文章于 2024-08-04 15:50:57 发布