设为首页收藏本站language 语言切换
查看: 2777|回复: 1
收起左侧

[分享] 华为防火墙连接HWTACACS服务器

[复制链接]
 成长值: 63400
发表于 2020-5-28 13:15:09 | 显示全部楼层 |阅读模式
本帖最后由 小乔 于 2020-5-28 13:19 编辑

通过HWTACACS服务器可以实现对远端用户访问目的网络时进行认证、授权和计费服务,常用于外网接入内网时进行认证、远程登录设备时进行认证和授权等多种应用场合。同时,HWTACACS服务器还可以远端集中部署,便于统一管理和维护。
组网需求
如图1所示,test域内的用户通过Internet访问目的资源网络Network A,USG做为Network A的网络接入服务器使用,USG远端连接到两台主备HWTACACS服务器。要求test域内的用户通过HWTACACS服务器的认证后才能访问目的资源网络Network A,同时HWTACACS服务器要对test域内的用户进行计费。当test域内的用户对Network A内的设备进行操作时,HWTACACS服务器需要根据不同用户授权不同的操作权限。
1.jpg
配置思路
1 在USG上配置接口、路由等数据,使USG能够和主备HWTACACS服务器、Network A、以及test域内的用户互通。
2 配置HWTACACS服务器模板。
3 配置认证方案、授权方案和计费方案 。
4 配置test域,在域下采用认证方案1、授权方案1、计费方案1、HWTACACS模板abc。
5 配置主备HWTACACS服务器。


操作步骤
1 在USG上配置接口、路由等数据,使USG能够和主备HWTACACS服务器、Network A、以及test域内的用户互通,具体配置过程略。
2 配置HWTACACS服务器模板。
# 创建HWTACACS服务器模板abc。
<USG> system-view
[USG] hwtacacs-server template abc
# 配置HWTACACS主用认证、授权、计费服务器的IP地址。
[USG-hwtacacs-abc] hwtacacs-server authentication 11.1.1.1
[USG-hwtacacs-abc] hwtacacs-server authorization 11.1.1.1
[USG-hwtacacs-abc] hwtacacs-server accounting 11.1.1.1
# 配置HWTACACS备用认证、授权、计费服务器的IP地址。
[USG-hwtacacs-abc] hwtacacs-server authentication 22.1.1.1 secondary
[USG-hwtacacs-abc] hwtacacs-server authorization 22.1.1.1 secondary
[USG-hwtacacs-abc] hwtacacs-server accounting 22.1.1.1 secondary
# 配置HWTACACS服务器密钥。
[USG-hwtacacs-abc] hwtacacs-server shared-key hello
# 配置HWTACACS服务器的源IP地址。
[USG-hwtacacs-abc] hwtacacs-server source-ip 5.5.5.1
[USG-hwtacacs-abc] quit 注意:
当配置HWTACACS源IP地址后,USG使用该HWTACACS模板与服务器通信时,报文的源IP地址为指定的IP地址。此时,服务器也将使用配置的IP地址与USG通信,提高了通信的安全性。
缺省情况下,HWTACACS服务器的源IP地址是0.0.0.0,此时USG使用实际路由出接口的IP地址作为HWTACACS报文的源IP地址,无须在USG配置HWTACACS服务器的源IP地址。
如果配置了HWTACACS的源IP地址,请确保此源地址和服务器之前的路由可达。
3 配置认证方案、授权方案和计费方案 。
# 配置认证方案1,认证方法为HWTACACS。
[USG] aaa
[USG-aaa] authentication-scheme 1
[USG-authen-1] authentication-mode hwtacacs
[USG-authen-1] quit
# 配置授权方案1,授权方法为HWTACACS。
[USG-aaa] authorization-scheme 1
[USG-author-1] authorization-mode hwtacacs
[USG-author-1] quit
# 配置计费方案1,计费方法为HWTACACS。
[USG-aaa] accounting-scheme 1
[USG-accounting-1] accounting-mode hwtacacs
[USG-accounting-1] quit
4 配置test域,在域下采用认证方案1、授权方案1、计费方案1、HWTACACS模板abc。
[USG-aaa] domain test
[USG-aaa-domain-test] authentication-scheme 1
[USG-aaa-domain-test] authorization-scheme 1
[USG-aaa-domain-test] accounting-scheme 1
[USG-aaa-domain-test] hwtacacs-server abc
[USG-aaa-domain-test] quit
[USG-aaa] quit
5 配置主备HWTACACS服务器。
详细配置请参考HWTACACS服务器的相关文档。其中,主备HWTACACS服务器的上服务器密钥、源IP地址(即USG上的出接口地址)要和USG侧保持一致。

结果验证
在USG上执行display hwtacacs-server template命令后,可以观察到该HWTACACS服务器模板的配置与要求一致。
<USG> display hwtacacs-server template abc
  ---------------------------------------------------------------------------   
  HWTACACS-server template name   : abc     
  Primary-authentication-server   : 11.1.1.1:49
  Primary-authorization-server    : 11.1.1.1:49
  Primary-accounting-server       : 11.1.1.1:49
  Secondary-authentication-server : 22.1.1.1:49
  Secondary-authorization-server  : 22.1.1.1:49
  Secondary-accounting-server     : 22.1.1.1:49
  Current-authentication-server   : 11.1.1.1:49
  Current-authorization-server    : 11.1.1.1:49
  Current-accounting-server       : 11.1.1.1:49
  Source-IP-address               : 5.5.5.1
  Shared-key                      : %$%$s_{tFizBu'4M_84+.9cTo+"v%$%$         
  Quiet-interval(min)             : 5      
  Response-timeout-Interval(sec)  : 5      
  Domain-included                 : Yes     
  Traffic-unit                    : B      
  ---------------------------------------------------------------------------
在USG上执行display domain test命令后,可以观察到该域的配置与要求一致。

<USG> display domain test
   -------------------------------------------------------------------
  Domain-name                     : test   
  Domain-state                    : Active  
  Authentication-scheme-name      : 1
  Accounting-scheme-name          : 1
  Authorization-scheme-name       : 1
  User-CAR                        : -      
  Web-IP-address                  : -      
  Primary-DNS-IP-address          : -      
  Second-DNS-IP-address           : -      
  Primary-NBNS-IP-address         : -      
  Second-NBNS-IP-address          : -      
  Acl-number                      : -      
  Idle-data-attribute (time,flow) : 0, 60   
  User-priority                   : -      
  User-access-limit               : 192     
  Online-number                   : 0      
  RADIUS-server-template          : -      
  LDAP-server-template            : -
  Securid-server-template         : -
  AD-server-template              : -
  HWTACACS-server-template        : abc     
  -------------------------------------------------------------------  




发表于 2020-5-28 15:04:51 | 显示全部楼层
Thanks for sharing
沙发 2020-5-28 15:04:51 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-2 10:52 , Processed in 0.059572 second(s), 14 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表