华为防火墙的管理方式

AAA介绍

AAA是验证( Authentication )、授权( Authorization )和记账( Accounting )三个英文单词的简称是一个能够处理用户访问请求的服务器程序,主要目的是管理用户访问网络服务器,为具有访问权的用户提供服务。

验证: 哪些用户可以访问网络服务器。

授权: 具有访问权限的用户可以得到哪些服务,有什么权限。

记账: 如何对正在使用网络资源的用户进行审计。

网络设备的AAA认证方式有本地身份验证( Local )、远程身份验证两大类。

本地身份验证通过将用户名密码在本地创建并验证
远程身份验证通过各个厂商自有的AAA服务器来完成,这需要设备AAA服务器进行关。

华为防火墙支持用户进行本地与远程配置,只介绍本地身份验证。

华为防火墙常见的管理方式

管理方式 描述
console线连接 属于带外管理,不占用户带宽,适用于新设备的首次配置场景。
telnet方式连接 属于带内管理,配置简单,安全性低,资源占用少,主要适用于安全性不高、设备性能差的场景。
web界面登录 属于带内管理,可以基于图形化管理,更适用于新手配置设备。
ssh方式连接 属于带内管理,配置复杂,安全性高,资源占用高,主要适用于对安全性要求比较高的场景,如通过互联网远程管理公司网络设备。

下面会有带内管理详细的3种配置。

Telent管理方式

通过配置使终端通过Telnet方式登录设备,实现对设备的配置和管理。实验环境如下图所示,

在搭建上图所示的拓扑图时,eNSP中的客户端无法模拟 Telnet、SSH及Web方式管理,所以建议将防火墙的G0/0/0口桥接到真实的虚拟机中,用虚拟机充当客户端使用。

在这里插入图片描述

Cloud配置
在这里插入图片描述
另外,华为设备的默认管理账户是admin,密码是Admin@123。其他创建的账号在首次叠录时根据提示需要重新设置密码。

Please Press ENTER.

An initial password is required for the first login via the console.
Set a password and keep it safe. Otherwise you will not be able to login via the
 console.

Please configure the login password (8-16)
Enter Password:         ##密码是:Admin@123
Confirm Password:       ##重复密码
Warning: The authentication mode was changed to password authentication and the 
user level was changed to 15 on con0 at the first user login.
Warning: There is a risk on the user-interface which you login through. Please c
hange the configuration of the user-interface as soon as possible. 

*************************************************************************
*         Copyright (C) 2014-2015 Huawei Technologies Co., Ltd.         *
*                           All rights reserved.                        *
*               Without the owner's prior written consent,              *
*        no decompiling or reverse-engineering shall be allowed.        *
*************************************************************************


<USG6000V1>
<USG6000V1>sys
Enter system view, return user view with Ctrl+Z.
[USG6000V1]undo info en
Info: Information center is disabled.
[USG6000V1]
  1. 配置防火墙ip接口地址,打开telnet功能
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.100.20 24
[USG6000V1-GigabitEthernet1/0/0]un sh
Info: Interface GigabitEthernet1/0/0 is not shutdown.
[USG6000V1-GigabitEthernet1/0/0]q
[USG6000V1]
[USG6000V1]telnet server enable 
Warning: Telnet is not a secure protocol, and it is recommended to use Stelnet

  1. 配置防火墙允许远程管理,并将防火墙接口 g1/0/0加入安全区域。
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]service-manage enable 
[USG6000V1-GigabitEthernet1/0/0]service-manage telnet permit 
[USG6000V1-GigabitEthernet1/0/0]q
[USG6000V1]firewall zone trust
[USG6000V1-zone-trust]add interface g1/0/0
[USG6000V1-zone-trust]q
[USG6000V1]

3) 将防火墙配置域间包过滤,以保证网络基本通信正常,因为 Telnet流量属于防火墙自身收发,所以需要配置Trust区域到Local区域的安全策略。

[USG6000V1]security-policy 
[USG6000V1-policy-security]rule name allow_telnet
[USG6000V1-policy-security-rule-allow_telnet]source-zone trust 
[USG6000V1-policy-security-rule-allow_telnet]destination-zone local 
[USG6000V1-policy-security-rule-allow_telnet]action permit 
[USG6000V1-policy-security-rule-allow_telnet]q
[USG6000V1-policy-security]q
[USG6000V1]
  1. 配置认证模式及本地用户信息

[USG6000V1]user-interface vty 0 4    //进到用户界面视图
[USG6000V1-ui-vty0-4]authentication-mode aaa  //开启aaa认证模式
Warning: The level of the user-interface(s) will be the default level of AAA use
rs, please check whether it is correct.
[USG6000V1-ui-vty0-4]protocol inbound telnet   //允许 Telnet连接虚拟终端
[USG6000V1-ui-vty0-4]q
[USG6000V1]aaa                              //进到aaa认证模式
[USG6000V1-aaa]manager-user demo           //配置本地用户demo
[USG6000V1-aaa-manager-user-demo]password cipher demo@123  //配置密码
Info: You are advised to config on man-machine mode.
[USG6000V1-aaa-manager-user-demo]service-type telnet  //配置服务类型
Warning: The user access modes include Telnet or FTP, so security risks exist.
[USG6000V1-aaa-manager-user-demo]level 3             //配置用户权限级别
[USG6000V1-aaa-manager-user-demo]q
[USG6000V1-aaa]q
[USG6000V1]

5)在客户端运行CRT,连接防火墙
在这里插入图片描述

6)连接后,根据提示修改密码,重新连接后即可进入用户视图,登录到设备上。
在这里插入图片描述

web管理方式

1) 打开接口的http和https管理

[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]service-manage http permit	//打开接口的http和https管理
[USG6000V1-GigabitEthernet1/0/0]service-manage https permit

2) 将防火墙接口 g1/0/0加入安全区域,上面做过,这里就不做了
3) 配置安全策略

[USG6000V1]security-policy 
[USG6000V1-policy-security]rule name allow_web
[USG6000V1-policy-security-rule-allow_web]source-zone trust 
[USG6000V1-policy-security-rule-allow_web]destination-zone local
[USG6000V1-policy-security-rule-allow_web]action permit 
[USG6000V1-policy-security-rule-allow_web]q
[USG6000V1-policy-security]q
[USG6000V1]
[USG6000V1]web-manager security enable    //开启web管理策略
Info: Web security-server has been enabled.

4)aaa用户认证模式

[USG6000V1]aaa
[USG6000V1-aaa]manager-user demo
[USG6000V1-aaa-manager-user-demo]service-type web
[USG6000V1-aaa-manager-user-demo]level 3
[USG6000V1-aaa-manager-user-demo]q
[USG6000V1-aaa]q
[USG6000V1]

注:

  • web-manager security enable命令后面也可以跟自定义端口,如web-manager security enable port 2000。
  • 执行 security参数,是开启https管理,如web-manager security enable;不执行 security参数,是开启http管理,如:web-manage enable。
  • 不允许https和http管理使用相同的端口,这样配置会导致端口冲突。

5)防火墙默认情况下开启的https端口为8443.在客户端的E测览器中访问https://192.168.100.20:8443,打开认证界面

在这里插入图片描述
因为在telnet时更改过demo密码,使用新密码登录
在这里插入图片描述
在这里插入图片描述

配置SSH方式登录设备

和 Telnet相比,SSH安全性更高,但比telnet更复杂一些,下面是配置SSH管理步骤。

1)进入接口,允许ssh连接,并加入trust区域(telnet已做)

[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]service-manage ssh permit 
[USG6000V1-GigabitEthernet1/0/0]q

2)配置安全策略

[USG6000V1]security-policy 
[USG6000V1-policy-security]rule name allow_ssh
[USG6000V1-policy-security-rule-allow_ssh]source-zone trust 
[USG6000V1-policy-security-rule-allow_ssh]destination-zone local
[USG6000V1-policy-security-rule-allow_ssh]action permit 
[USG6000V1-policy-security-rule-allow_ssh]q
[USG6000V1-policy-security]q
[USG6000V1]

3)创建SSH所需的密钥对

[USG6000V1]rsa local-key-pair create   //创建SSH所需的密钥对
The key name will be: USG6000V1_Host
The range of public key size is (512 ~ 2048). 
NOTES: If the key modulus is greater than 512, 
       it will take a few minutes.
Input the bits in the modulus[default = 2048]:
Generating keys...
.+++++
........................++
....++++
...........++

[USG6000V1]

4)指定aaa认证,并且创建ssh认证用户

[USG6000V1]user-interface vty 0 4
[USG6000V1-ui-vty0-4]authentication-mode aaa
Warning: The level of the user-interface(s) will be the default level of AAA use
rs, please check whether it is correct.
[USG6000V1-ui-vty0-4]protocol inbound ssh
[USG6000V1-ui-vty0-4]q
[USG6000V1]ssh user lzj                                //指定lzj为ssh用户
Info: Succeeded in adding a new SSH user.
[USG6000V1]ssh user lzj authentication-type password   //配置认证方式
[USG6000V1]ssh user lzj service-type stelnet           //配置服务类型     
[USG6000V1]aaa
[USG6000V1-aaa]manager-user lzj                        //创建本地用户lzj
[USG6000V1-aaa-manager-user-lzj]password cipher Lzja@123  //指定密码
Info: You are advised to config on man-machine mode.
[USG6000V1-aaa-manager-user-lzj]service-type ssh
[USG6000V1-aaa-manager-user-lzj]level 3
[USG6000V1-aaa-manager-user-lzj]q
[USG6000V1-aaa]q
[USG6000V1]
[USG6000V1]stelnet server enable
Info: Succeeded in starting the Stelnet server.
[USG6000V1]

5)在客户端上CRT软件连接防火墙,弹出如下图框,单击 “接受并保存”。

在这里插入图片描述
又会弹出新登入框,输入用户和密码,第一次登入进去会提示改密码,改完后会自动退出,使用新密码登入。
在这里插入图片描述

下一篇:防火墙的NAT策略

发布了36 篇原创文章 · 获赞 3 · 访问量 6362

猜你喜欢

转载自blog.csdn.net/weixin_43815140/article/details/105439712