• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

WX3510X配置portal登录用户local-user,限制只允许1人登录此账号配置案例

2025-09-29提问
  • 0关注
  • 0收藏,472浏览
粉丝:0人 关注:0人

问题描述:

求WX3510X配置portal登录用户local-user,限制只允许1人登录此账号配置案例

2 个回答
已采纳
粉丝:15人 关注:0人

配置拓扑和需求
​​设备​​:H3C WX3510X
​​认证方式​​:Portal认证
​​用户数据库​​:设备本地(local-user)
​​特殊要求​​:每个用户名只能同时1人在线
配置步骤
第一步:创建本地用户并设置并发数限制
# 进入系统视图
system-view

# 创建本地用户,如用户名为"testuser"
local-user testuser class network

# 设置密码
password simple Test@123456

# 设置服务类型为Portal和Web(必须)
service-type portal web

# 设置授权属性(如VLAN、ACL等,可选)
authorization-attribute user-role network-operator

# ★★★ 关键配置:限制同时登录数为1 ★★★
access-limit enable 1

# 允许同时登录的多个终端使用相同IP地址(根据实际需要)
portal roaming enable

# 激活用户
state active

# 退出当前视图
quit
第二步:配置Portal认证服务器
# 创建Portal服务器模板
portal server h3c-portal
# 设置IP地址(本机地址或指定地址)
ip 192.168.1.1 # 使用WX3510X的管理IP

# 可选:设置密钥(如果需要加密通信)
key simple portal123

# 退出服务器视图
quit
第三步:配置Portal Web服务器
# 创建Web服务器模板
portal web-server h3c-web
# 设置服务器类型为H3C
server-type h3c

# 指定URL(可选,如使用自定义认证页面)
url http://192.168.1.1:8080/portal

# 指定之前创建的Portal服务器
portal-server h3c-portal

# 退出Web服务器视图
quit
第四步:在接口或VLAN上应用Portal认证
方案A:在VLAN接口上应用(推荐)
# 进入需要认证的VLAN接口
interface Vlan-interface 100

# 应用Portal认证
portal enable method layer3

# 指定Web服务器
portal apply web-server h3c-web

# 设置认证域为本地
portal domain default

# 设置免费规则(认证前允许访问的资源)
portal free-rule 1 destination ip 114.114.114.114 32
portal free-rule 2 destination ip 8.8.8.8 32

# 退出接口视图
quit
方案B:在无线服务模板上应用
# 进入无线服务模板
wlan service-template portal-sth

# 应用Portal认证
portal enable method direct

# 指定Web服务器
portal apply web-server h3c-web

# 退出服务模板
quit
第五步:配置认证域参数
# 创建ISP域或使用默认域
domain default

# 设置认证方式为本地
authentication portal local
authorization portal local
accounting portal local

# 设置空闲超时时间(重要:避免用户异常下线后无法登录)
authorization-attribute idle-cut 1800 # 30分钟无流量自动下线

# 退出域视图
quit
完整配置示例
# 基本Portal认证配置,限制单用户登录
system-view

# 1. 创建本地用户
local-user testuser class network
password simple Test@123456
service-type portal web
access-limit enable 1 # 限制只能1人登录
portal roaming enable # 允许漫游(同IP多终端)
state active
quit

# 2. 配置Portal服务器
portal server h3c-portal
ip 192.168.1.1
quit

# 3. 配置Web服务器
portal web-server h3c-web
server-type h3c
portal-server h3c-portal
quit

# 4. 在VLAN接口上应用
interface Vlan-interface 100
ip address 192.168.100.1 255.255.255.0
portal enable method layer3
portal apply web-server h3c-web
portal domain default
portal free-rule 1 destination ip 114.114.114.114 32
portal free-rule 2 destination ip 8.8.8.8 32
quit

# 5. 配置认证域
domain default
authentication portal local
authorization portal local
accounting portal local
authorization-attribute idle-cut 1800
quit

# 保存配置
save
验证命令
配置完成后,使用以下命令验证:
1. 检查用户在线状态
# 查看Portal用户信息
display portal user all

# 查看特定用户在线信息
display portal user username testuser

# 查看用户接入限制信息
display local-user name testuser
2. 测试并发限制
使用testuser账号在第一台设备登录
尝试在第二台设备使用相同账号登录
预期结果:第一台设备保持在线,第二台设备认证失败
3. 查看认证日志
# 实时查看认证日志
terminal monitor
terminal debugging
debugging portal all
故障排查
常见问题1:用户无法认证
# 检查项目:
display portal interface Vlan-interface 100
display portal web-server all
display portal server all
常见问题2:并发限制不生效
# 确认用户配置
display local-user name testuser
# 检查access-limit是否为enable 1

# 强制踢除用户(如果需要)
portal delete-user username testuser
常见问题3:用户异常下线后无法登录
# 检查空闲超时配置
display domain default

# 手动清除异常用户
reset portal user username testuser
重要注意事项
​​access-limit enable 1​​ 是限制并发数的关键命令
​​portal roaming enable​​ 允许同一IP多个终端使用相同账号(根据需求选择)
​​空闲超时​​配置很重要,避免用户异常下线后账号被占用
生产环境建议使用复杂密码和更安全的认证方式
如果需要记录日志,配置信息中心(info-center)记录认证日志
这个配置方案可以满足您限制Portal用户只能1人同时登录的需求。实际部署时请根据网络环境调整IP地址和VLAN信息。

暂无评论

zhiliao_Mtx4fK 知了小白
粉丝:0人 关注:0人

反反复复反反复复凤飞飞发发发

https://weibo.com/ttarticle/p/show?id=2309405216244529233950

https://weibo.com/ttarticle/p/show?id=2309405216244449280084

https://weibo.com/ttarticle/p/show?id=2309405216243593642063

https://weibo.com/ttarticle/p/show?id=2309405216243535184068

https://weibo.com/ttarticle/p/show?id=2309405216243375538368

https://weibo.com/ttarticle/p/show?id=2309405216243375538183

https://weibo.com/ttarticle/p/show?id=2309405216243241582708

https://weibo.com/ttarticle/p/show?id=2309405216243228737732

https://weibo.com/ttarticle/p/show?id=2309405216243228737676

https://weibo.com/ttarticle/p/show?id=2309405216243216416856

https://weibo.com/ttarticle/p/show?id=2309405216242998050844

https://weibo.com/ttarticle/p/show?id=2309405216242972885157

https://weibo.com/ttarticle/p/show?id=2309405216242817957937

https://weibo.com/ttarticle/p/show?id=2309405216242662768804

https://weibo.com/ttarticle/p/show?id=2309405216242645991475

https://weibo.com/ttarticle/p/show?id=2309405216242628952289

https://weibo.com/ttarticle/p/show?id=2309405216242507317270

https://weibo.com/ttarticle/p/show?id=2309405216242494734670

https://weibo.com/ttarticle/p/show?id=2309405216242482413880

https://weibo.com/ttarticle/p/show?id=2309405216242427887966

https://weibo.com/ttarticle/p/show?id=2309405216242344001540

https://weibo.com/ttarticle/p/show?id=2309405216242335613092

https://weibo.com/ttarticle/p/show?id=2309405216242331156714

https://weibo.com/ttarticle/p/show?id=2309405216242318835916

https://weibo.com/ttarticle/p/show?id=2309405216242272436240

https://weibo.com/ttarticle/p/show?id=2309405216242193006688

https://weibo.com/ttarticle/p/show?id=2309405216242176229794

https://weibo.com/ttarticle/p/show?id=2309405216242167578768

https://weibo.com/ttarticle/p/show?id=2309405216242138218540

https://weibo.com/ttarticle/p/show?id=2309405216242008195135

https://weibo.com/ttarticle/p/show?id=2309405216242008195142

https://weibo.com/ttarticle/p/show?id=2309405216241991680223

https://weibo.com/ttarticle/p/show?id=2309405216241978835031

https://weibo.com/ttarticle/p/show?id=2309405216241836490863

https://weibo.com/ttarticle/p/show?id=2309405216241832034377

https://weibo.com/ttarticle/p/show?id=2309405216241794547935

https://weibo.com/ttarticle/p/show?id=2309405216241706205319

https://weibo.com/ttarticle/p/show?id=2309405216241664524553

https://weibo.com/ttarticle/p/show?id=2309405216241639096603

https://weibo.com/ttarticle/p/show?id=2309405216241458741261

https://weibo.com/ttarticle/p/show?id=2309405216241420992531

https://weibo.com/ttarticle/p/show?id=2309405216241282842774

https://weibo.com/ttarticle/p/show?id=2309405216241257414699

https://weibo.com/ttarticle/p/show?id=2309405216241211539572

https://weibo.com/ttarticle/p/show?id=2309405216241177723090

https://weibo.com/ttarticle/p/show?id=2309405216241110876194

https://weibo.com/ttarticle/p/show?id=2309405216241064738838

https://weibo.com/ttarticle/p/show?id=2309405216240913481832

https://weibo.com/ttarticle/p/show?id=2309405216240762748994

https://weibo.com/ttarticle/p/show?id=2309405216240603103430

https://weibo.com/ttarticle/p/show?id=2309405216240511090853

https://weibo.com/ttarticle/p/show?id=2309405216240443719787

https://weibo.com/ttarticle/p/show?id=2309405216240435593231

https://weibo.com/ttarticle/p/show?id=2309405216240339124251

https://weibo.com/ttarticle/p/show?id=2309405216240292987203

https://weibo.com/ttarticle/p/show?id=2309405216240284336173

https://weibo.com/ttarticle/p/show?id=2309405216240179740808

https://weibo.com/ttarticle/p/show?id=2309405216240129147057

https://weibo.com/ttarticle/p/show?id=2309405216240124952613

https://weibo.com/ttarticle/p/show?id=2309405216240016163042

https://weibo.com/ttarticle/p/show?id=2309405216239970025510

https://weibo.com/ttarticle/p/show?id=2309405216239940665394

https://weibo.com/ttarticle/p/show?id=2309405216239822962738

https://weibo.com/ttarticle/p/show?id=2309405216239785476264

https://weibo.com/ttarticle/p/show?id=2309405216239663579251

https://weibo.com/ttarticle/p/show?id=2309405216239630287278

https://weibo.com/ttarticle/p/show?id=2309405216239512584466

https://weibo.com/ttarticle/p/show?id=2309405216239357657467

https://weibo.com/ttarticle/p/show?id=2309405216239319646242

https://weibo.com/ttarticle/p/show?id=2309405216239277965607

https://weibo.com/ttarticle/p/show?id=2309405216239198011470

https://weibo.com/ttarticle/p/show?id=2309405216239126970445

https://weibo.com/ttarticle/p/show?id=2309405216238816329802

https://weibo.com/ttarticle/p/show?id=2309405216238765998284

https://weibo.com/ttarticle/p/show?id=2309405216238707540278

https://weibo.com/ttarticle/p/show?id=2309405216238636236950

https://weibo.com/ttarticle/p/show?id=2309405216238619197506

https://weibo.com/ttarticle/p/show?id=2309405216238502019220

https://weibo.com/ttarticle/p/show?id=2309405216238460076044

https://weibo.com/ttarticle/p/show?id=2309405216238447230980

https://weibo.com/ttarticle/p/show?id=2309405216238443298950

https://weibo.com/ttarticle/p/show?id=2309405216238355218436

https://weibo.com/ttarticle/p/show?id=2309405216238325858421

https://weibo.com/ttarticle/p/show?id=2309405216238283915489

https://weibo.com/ttarticle/p/show?id=2309405216238283915437

https://weibo.com/ttarticle/p/show?id=2309405216238250099109

https://weibo.com/ttarticle/p/show?id=2309405216238124531945

https://weibo.com/ttarticle/p/show?id=2309405216238124531937

https://weibo.com/ttarticle/p/show?id=2309405216238095171605

https://weibo.com/ttarticle/p/show?id=2309405216237969342529

https://weibo.com/ttarticle/p/show?id=2309405216237956497707

https://weibo.com/ttarticle/p/show?id=2309405216237939982599

https://weibo.com/ttarticle/p/show?id=2309405216237805502725

https://weibo.com/ttarticle/p/show?id=2309405216237730005221

https://weibo.com/ttarticle/p/show?id=2309405216237683867901

https://weibo.com/ttarticle/p/show?id=2309405216237629604184

https://weibo.com/ttarticle/p/show?id=2309405216237587398757

https://weibo.com/ttarticle/p/show?id=2309405216237516095508

https://weibo.com/ttarticle/p/show?id=2309405216237444792484

https://weibo.com/ttarticle/p/show?id=2309405216237306380314

https://weibo.com/ttarticle/p/show?id=2309405216237247922504

https://weibo.com/ttarticle/p/show?id=2309405216237243465916

https://weibo.com/ttarticle/p/show?id=2309405216237180551278

https://weibo.com/ttarticle/p/show?id=2309405216237071761776

https://weibo.com/ttarticle/p/show?id=2309405216237063110860

https://weibo.com/ttarticle/p/show?id=2309405216236962709791

https://weibo.com/ttarticle/p/show?id=2309405216236865978419

https://weibo.com/ttarticle/p/show?id=2309405216236773965915

https://weibo.com/ttarticle/p/show?id=2309405216236593610767

https://weibo.com/ttarticle/p/show?id=2309405216236580765859

https://weibo.com/ttarticle/p/show?id=2309405216236509724997

https://weibo.com/ttarticle/p/show?id=2309405216236417450147

https://weibo.com/ttarticle/p/show?id=2309405216236308398174

https://weibo.com/ttarticle/p/show?id=2309405216236278775903

https://weibo.com/ttarticle/p/show?id=2309405216236266455382

https://weibo.com/ttarticle/p/show?id=2309405216236228444177

https://weibo.com/ttarticle/p/show?id=2309405216236182306903

https://weibo.com/ttarticle/p/show?id=2309405216236161335337

https://weibo.com/ttarticle/p/show?id=2309405216236136169491

https://weibo.com/ttarticle/p/show?id=2309405216236094488772

https://weibo.com/ttarticle/p/show?id=2309405216236077711734

https://weibo.com/ttarticle/p/show?id=2309405216236039700579

https://weibo.com/ttarticle/p/show?id=2309405216236031574090

https://weibo.com/ttarticle/p/show?id=2309405216234752049276

https://weibo.com/ttarticle/p/show?id=2309405216234701717594

https://weibo.com/ttarticle/p/show?id=2309405216234596860060

https://weibo.com/ttarticle/p/show?id=2309405216234446127476

https://weibo.com/ttarticle/p/show?id=2309405216234299064439

https://weibo.com/ttarticle/p/show?id=2309405216234152525895

https://weibo.com/ttarticle/p/show?id=2309405216233799942165

https://weibo.com/ttarticle/p/show?id=2309405216233665986684

 

暂无评论

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明