HCIP-Security 华为Portal认证技术与配置解析

Portal 认证也叫做网页认证。当用户接入网络时,使用浏览器访问网址会自动跳转到特定的认证页面上,用户需要在这个网页上输入凭据(如账号密码、短信验证码等)完成认证。部署 Portal 认证通常需要两个核心组件:Portal 服务器 和 radius 服务器(两者可以合并部署)。用户打开认证页面主要有两种方式:

  1. 主动认证:用户连接网络后,自己手动输入 Portal 认证网址进行访问。
  2. 重定向认证:用户打开业务网站时,自动跳转到 Portal 认证网站。

从配置逻辑来看,Portal 认证主要分为两个步骤:

① 怎么让用户访问到 Portal 认证网页;

② 怎么让用户的账号密码认证请求发送到 radius 服务器。以下是基于华为设备的详细配置解析。

一、配置用户访问 Portal 认证网页

1. 创建 URL 模板

在有线 Portal 认证中,必须携带 device 的 IP,即交换机和 Portal 服务器对接的接口 IP(交换机侧)。因为用户不知道交换机 IP 是多少,所以必须手工配置。

lang-js 复制代码
<span style="color:#000000">[HUAWEI]url-template name hcie #创建url模板
[HUAWEI-url-template-hcie]url https://172.22.8.72:19008/portal
[HUAWEI-url-template-hcie]url-parameter device-ip(参数名) ac-ip(参数值) redirect-url redirect-url user-ipaddress uaddress
[HUAWEI-url-template-hcie]url-parameter set device-ip 192.168.100.1</span>

2. 配置 Portal 服务器模板

指定 Portal 服务器的 IP 地址、对接密钥,以及认证点使用哪个源 IP 与 Portal 服务器对接。

lang-js 复制代码
<span style="color:#000000">[HUAWEI]web-auth-server hcie 
#创建portal服务器模板
[HUAWEI-web-auth-server-hcie]server-ip 172.22.8.72 
#指定portal服务器的ip地址
[HUAWEI-web-auth-server-hcie]shared-key cipher Huawei@123 
#配置和portal服务器对接的密钥
[HUAWEI-web-auth-server-hcie]server-source ip-address 192.168.100.1 
#配置认证点使用哪个ip和portal服务器对接
[HUAWEI-web-auth-server-hcie]url http://172.22.8.72:19008/portal 
#配置url,用户就是访问这个来打开portal的网页</span>

注意:如果 Portal 服务器使用的是 agile controller,直接配置 URL 是没有问题的。但本例使用的是 nce-campus,出于安全性考虑,不能使用 HTTP,必须是 HTTPS。并且使用 nce-campus 作为 Portal 服务器时,不能直接在 Portal 服务器模板内配置 URL,必须使用 url-template 来进行配置并在模板中绑定。

3. 配置 Portal 接入模板并调用

创建 Portal 接入模板并调用 Portal 服务器模板,然后将 Portal 接入模板调用在认证模板中,最后将认证模板调用在连接用户的接口上。

复制代码
[HUAWEI]portal-access-profile name hcie 
#创建portal接入模板
[HUAWEI-portal-acces-profile-hcie]web-auth-server hcie direct 
#将portal服务器模板调用portal接入模板
[HUAWEI]authentication-profile name hcie
[HUAWEI-authen-profile-hcie]portal-access-profile hcie
[HUAWEI-GigabitEthernet0/0/1]authentication-profile hcie

4. 修改认证模式

在 NCE-Campus 系统的准入管理中,Portal 认证默认是匿名认证模式,在这里我们需要在页面上将其修改为账号密码模式。

二、配置 radius 服务器与 AAA

1. 配置 radius 服务器模板

复制代码
radius-server template hcie

 radius-server shared-key cipher %^%#x5@L,/_YB0K@IG$BbdZ+^MV6H#b<nD{;Vt5Hh~`F%^%#

 radius-server authentication 172.22.8.72 1812 weight 80

 radius-server accounting 172.22.8.72 1813 weight 80

radius-server authorization 172.22.8.72 shared-key cipher %^%#r@nFP$R[^B.>7Y$\Z6GCygIEO$/2:N.er;WB~,J4%^%#​

2. 配置 AAA 认证与计费方案

复制代码
aaa

 authentication-scheme portal_auth

  authentication-mode radius

 accounting-scheme portal_auth

  accounting-mode radius

 domain default

  authentication-scheme portal_auth

  accounting-scheme portal_auth

  radius-server hcie

#​

注意:在使用账号密码认证模式的 Portal 认证时,在 NCE-Campus 上创建账号必须同时开启 Portal 和 Portal 2.0&802.1x 授权。

三、配置免认证规则

一般来说,Portal 服务器的访问地址基本上会通过域名来访问。问题在于,用户在没有认证的情况下,如何去找 DNS 服务器呢?使用 NCE-Campus 作为 Portal 服务器时,默认 Portal 服务器的 IP 地址是放行的。此外,可以通过配置免认证规则来放行服务器 IP:

复制代码
[HUAWEI]free-rule-template name default_free_rule #进入免认证规则

free-rule 10 destination ip 172.22.8.73 mask 255.255.255.255

 free-rule 20 destination ip 172.22.8.71 mask 255.255.255.255

#

如果你对『华为认证』有任何疑问,欢迎点击下方名片添加老师,一对一给您解答!

相关推荐
LabVIEW开发4 小时前
ALMEMO 采集器 + LabVIEW 多路温度怎么采?
网络·labview
郝学胜-神的一滴10 小时前
Effective STL 条款 14:用扩容函数避免重新分配
linux·开发语言·网络·数据结构·c++·单片机
王亚博_Abel11 小时前
域名是怎么变成 IP 的?手拆 DNS 解析四个实验实测
网络·网络协议·tcp/ip
always202217 小时前
AI运行时 · 11 - Serverless API 网关:冷启动、流量路由、Autoscaler、函数生命周期
网络·人工智能·serverless
神一样的老师18 小时前
用 FCU1501 双网口打通两个不同网段:IP 转发 + NAT 实战
网络·网络协议·tcp/ip
jipinxiaofeihua18 小时前
(文章6) 03章-C++文件操作(下)
linux·运维·网络
钱栈up1 天前
华为把 WATCH 5 的鸿蒙 7 卡在'充分测试'这道闸门口,到底在等什么?
华为·harmonyos
keepquietl1 天前
UDS on CAN 入门(6):诊断响应要等多久?读懂 P2、P2* 和 S3
网络·网络协议
XW9632581 天前
除湿机行业组织能力与人才地图报告
大数据·服务器·网络·数据结构·数据库·人工智能
ManThink Technology1 天前
ThinkLink 告警如何落地:从触发条件到恢复通知的完整检查
网络·物联网