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

短信和密码混合认证

2天前提问
  • 0关注
  • 0收藏,82浏览
粉丝:0人 关注:0人

问题描述:

用户是银行客户,网络结构如下总部 acg1000-se作为主路由设备 下挂ac为wx3510h  分支机构17个ap通过公网IP连接ac进行集中转发,如何实现分支机构员工密码ap认证 访客短信和微信认证并存?

组网及组网描述:

如题

1 个回答
粉丝:18人 关注:0人

第一部分:AC全局配置
1. 创建认证方案和域
# 登录WX3510H AC
system-view

# 创建员工认证域
domain employee
authentication lan-access local
authorization lan-access local
accounting lan-access local
quit

# 创建访客认证域
domain guest
authentication portal wechat # 微信认证
authentication portal sms # 短信认证
authorization portal
accounting portal
quit

# 创建本地用户(员工用)
local-user employee-group class network
password simple YourPassword123
service-type lan-access
authorization-attribute user-role network-operator
quit

# 批量创建员工账号(可选)
local-user employee1 class network
password simple EmpPass123
service-type lan-access
authorization-attribute user-role network-operator
quit
2. 配置Portal认证服务器
# 配置Portal服务器
portal server sms
ip 192.168.100.100 # Portal服务器IP
port 50100
key simple portal-key
quit

portal server wechat
ip 192.168.100.101
port 8080
key simple wechat-key
quit

# 配置Portal Web服务器
portal web-server sms
url http://192.168.100.100:8080/portal
quit

portal web-server wechat
url http://192.168.100.101/wechat-portal
quit
3. 配置RADIUS服务器(如果使用外部认证)
# 配置RADIUS服务器(用于员工认证)
radius scheme employee-radius
primary authentication 192.168.100.200 1812
primary accounting 192.168.100.200 1813
key authentication cipher RadiusKey123
key accounting cipher RadiusKey123
user-name-format without-domain
quit

# 配置访客RADIUS(用于短信认证)
radius scheme guest-radius
primary authentication 192.168.100.201 1812
primary accounting 192.168.100.201 1813
key authentication cipher GuestKey123
key accounting cipher GuestKey123
user-name-format without-domain
quit
第二部分:无线服务配置
1. 创建员工无线服务(密码认证)
# 创建无线服务模板
wlan service-template 1 crypto
ssid Corp-Employee
bind WLAN-ESS 10
client security-pass-thought enable
service-template enable
quit

# 创建ESS接口
interface WLAN-ESS10
port link-type hybrid
port hybrid vlan 10 untagged # 员工VLAN
quit

# 配置安全策略
wlan security-profile 1
security rsn enable
rsn cipher-suite ccmp
rsn authentication-method dot1x
quit

# 关联安全策略
wlan service-template 1 crypto
security-profile 1
quit

# 配置802.1X认证
dot1x authentication-method eap
dot1x domain employee
2. 创建访客无线服务(短信/微信认证)
# 创建无线服务模板
wlan service-template 2 crypto
ssid Guest
bind WLAN-ESS 20
client security-pass-thought enable
service-template enable
quit

# 创建ESS接口
interface WLAN-ESS20
port link-type hybrid
port hybrid vlan 20 untagged # 访客VLAN
quit

# 配置Portal认证
portal enable interface Vlan-interface 20 method layer3
portal domain guest interface Vlan-interface 20
portal apply web-server sms interface Vlan-interface 20
portal apply web-server wechat interface Vlan-interface 20

# 配置无加密的开放网络
wlan security-profile 2
security open enable
quit

# 关联安全策略
wlan service-template 2 crypto
security-profile 2
quit
3. 配置VLAN和接口
# 创建VLAN
vlan 10 # 员工VLAN
name Employee
quit

vlan 20 # 访客VLAN
name Guest
quit

# 配置VLAN接口
interface Vlan-interface10
ip address 192.168.10.1 24
quit

interface Vlan-interface20
ip address 192.168.20.1 24
quit
第三部分:短信认证配置
1. 配置短信网关
# 配置短信服务器
sms server sms-gateway
url ***.***/send
method post
params mobile=${mobile}&code=${code}&sign=${sign}
response success-code 200
response error-msg-path $.message
quit

# 配置短信模板
sms template verify
content 您的验证码是:${code},5分钟内有效
quit

# 配置短信认证策略
portal sms server sms-gateway
send-interval 60
code-length 6
code-expire 300
quit

# 配置短信认证策略 portal sms server sms-gateway send-interval 60 code-length 6 code-expire 300 quit 2. 配置Portal认证页面 <!-- 短信认证页面示例 (sms-auth.html) --> <!DOCTYPE html> <html> <head> <title>访客短信认证</title> </head> <body> <h2>访客无线网络认证</h2> <form > <input type="tel" placeholder="请输入手机号码" required> <button type="button" Onclick="sendSms()">获取验证码</button><br> <input type="text" placeholder="请输入验证码" required><br> <button type="submit">登录</button> </form> <div> <p>或使用微信认证:</p> <a href="/wechat-auth">微信扫码登录</a> </div> <script> function sendSms() { var mobile = document.getElementById("mobile").value; // 调用AC的短信发送接口 fetch("/portal/sms/send?mobile=" + mobile) .then(respOnse=> response.json()) .then(data => { if(data.success) { alert("验证码已发送"); } else { alert("发送失败:" + data.message); } }); } </script> </body> </html>

 

第四部分:微信认证配置 1. 配置微信认证服务器 # 配置微信服务器 portal wechat server appid wx1234567890abcdef # 微信公众号APPID secret 1234567890abcdef1234567890abcdef # 微信公众号密钥 redirect-uri http://192.168.100.101/wechat-callback quit 

# 配置微信认证页面 portal wechat page welcome title "欢迎使用无线网络" content "请使用微信扫描二维码完成认证" quit 

2. 微信认证重定向配置 # 配置Portal重定向 portal free-rule 1 destination ip 192.168.20.1 mask 255.255.255.255 portal free-rule 2 destination ip 119.147.33.33 mask 255.255.255.255 # 微信服务器 portal free-rule 3 destination domain   W E I X I N . Q Q . C O  M  

第五部分:AP配置下发 1. 配置AP注册 # 配置AP管理VLAN wlan ap-management vlan 100 # 配置AP注册(通过公网) wlan ac ac id 1 description Headquarter-AC quit # 配置AP组 wlan ap-group default-group ap-model WA6320 # 根据实际AP型号 radio 1 service-template 1 vlan 10 service-template 2 vlan 20 radio 2 service-template 1 vlan 10 service-template 2 vlan 20 quit 2. 配置分支AP # 为每个分支AP配置 wlan ap branch-ap-1 model WA6320 serial-id 210235A000001 ap-group default-group radio 1 channel 6 max-power 20 service-template 1 service-template 2 radio 2 channel 149 max-power 20 service-template 1 service-template 2 quit 第六部分:ACG1000-SE路由配置 1. 配置NAT和路由 # 配置NAT(使分支AP能访问AC) nat server protocol udap global 公网IP 5246 inside 192.168.1.100 5246 # CAPWAP控制端口 nat server protocol udap global 公网IP 5247 inside 192.168.1.100 5247 # CAPWAP数据端口 # 配置Portal认证端口转发 nat server protocol tcp global 公网IP 8080 inside 192.168.1.100 8080 # Portal页面 # 配置路由策略 ip route-static 0.0.0.0 0.0.0.0 外网网关 2. 配置安全策略 # 允许分支AP访问AC security-policy ip rule 0 name permit-capwap action pass source-zone untrust destination-zone trust source-ip 分支机构IP范围 destination-ip 192.168.1.100 32 service capwap quit # 允许Portal认证流量 rule 1 name permit-portal action pass source-zone any destination-zone trust destination-ip 192.168.1.100 32 service http https quit 第七部分:用户策略与QoS 1. 配置员工策略 # 员工带宽限制 qos car outbound anyany cir 10240 # 10Mbps保证带宽 qos car inbound anyany cir 20480 # 20Mbps保证带宽 # 员工访问权限 acl advanced 3000 rule permit ip destination 192.168.0.0 16 # 允许访问内网 rule permit ip destination 0.0.0.0 0 # 允许访问互联网 quit # 应用ACL到员工VLAN traffic classifier employee-class if-match acl 3000 quit traffic behavior employee-behavior car cir 10240 quit 2. 配置访客策略 # 访客带宽限制 qos car outbound anyany cir 2048 # 2Mbps保证带宽 qos car inbound anyany cir 4096 # 4Mbps保证带宽 # 访客访问限制 acl advanced 3001 rule deny ip destination 192.168.0.0 16 # 禁止访问内网 rule permit ip destination 0.0.0.0 0 # 只允许访问互联网 quit # 应用ACL到访客VLAN traffic classifier guest-class if-match acl 3001 quit traffic behavior guest-behavior car cir 2048 quit 第八部分:认证页面定制 1. 创建认证页面文件 # 上传自定义认证页面到AC # 可以通过Web界面或FTP上传 # 页面路径:/flash/portal/ # 短信认证页面:sms.html # 微信认证页面:wechat.html # 混合认证首页:index.html 2. 配置混合认证页面 <!-- /flash/portal/index.html --> <!DOCTYPE html> <html> <head> <title>无线网络认证</title> <style> .auth-option { margin: 20px; padding: 20px; border: 1px solid #ddd; border-radius: 5px; } </style> </head> <body> <h1>请选择认证方式</h1> <div > <h2>员工认证</h2> <p>使用公司账号密码登录</p> <a href="/employee-auth">员工登录</a> </div> <div > <h2>访客短信认证</h2> <p>通过手机短信获取验证码</p> <a href="/sms-auth">短信认证</a> </div> <div > <h2>微信认证</h2> <p>使用微信扫描二维码</p> <a href="/wechat-auth">微信认证</a> </div> </body> </html> 第九部分:监控与维护 1. 配置日志和监控 # 配置认证日志 info-center source PORTAL log level informational info-center source WLAN log level informational info-center loghost 192.168.1.50 # 日志服务器 # 配置用户在线监控 display wlan client display portal user display connection # 配置性能监控 display wlan ap all display wlan radio all 2. 故障排查命令 # 查看AP状态 display wlan ap name branch-ap-1 # 查看用户认证状态 display portal user interface vlan-interface20 # 查看认证失败原因 display portal auth-fail-record # 测试短信网关连通性 test sms server sms-gateway mobile 13800138000 # 查看微信认证状态 display portal wechat server 第十部分:分支机构AP配置要点 对于分支机构的AP,只需确保: 正确配置CAPWAP发现: # 在AP上配置 wlan ap-address 总部公网IP wlan ac ip 总部公网IP 确保网络连通性: AP能访问总部的5246/5247端口 用户能访问总部的Portal页面(80/443端口) AP注册状态检查: # 在AC上查看AP状态 display wlan ap all # 应该看到所有分支AP状态为"Run" 实施步骤建议 第一阶段:基础配置 配置AC全局参数 创建VLAN和接口 配置员工无线服务 第二阶段:认证配置 配置Portal服务器 配置短信认证 配置微信认证 第三阶段:分支部署 配置ACG路由和NAT 部署分支AP 测试AP注册 第四阶段:测试验证 测试员工密码认证 测试访客短信认证 测试微信认证 验证QoS策略 第五阶段:优化调整 根据测试结果调整策略 配置监控告警 编写运维文档 注意事项 安全性考虑: 员工和访客网络必须隔离(不同VLAN) 访客网络限制访问内网资源 定期更新认证密钥 性能考虑: 考虑AC的并发用户数限制 确保公网带宽足够 配置合理的会话超时时间 合规性考虑: 短信认证需符合运营商要求 微信认证需微信公众号认证 保留用户认证日志90天以上 备份与恢复: 定期备份AC配置 准备应急回退方案 配置自动备份 这个方案能够满足您分支机构员工密码认证和访客短信/微信认证并存的需求,同时保证网络的安全性和可管理性。建议在正式部署前,先在测试环境验证所有功能。


暂无评论

编辑答案

你正在编辑答案

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

分享扩散:

提出建议

    +

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

确定

亲~检测到您登陆的账号未在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. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

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

不规范转载

×

举报说明