一、华为防火墙设备的几种管理方式介绍:由于在对防火墙设备配置管理方式时,涉及到了AAA这个概念,索性就将AAA的相关介绍简单写一下。AAA是验证(Authentication)、授权(Authoriz
.
一、华为防火墙设备的几种管理方式介绍:
由于在对防火墙设备配置管理方式时,涉及到了AAA这个概念,索性就将AAA的相关介绍简单写一下。
AAA是验证(Authentication)、授权(Authorization)和记账(Accounting)三个部分组成,是一个能够处理用户访问请求的服务器程序,主要目的是管理用户访问网络服务器,为具有访问权限的用户提供服务。其中:
- 验证:哪些用户可以访问网络服务器。
- 授权:具有访问权限的用户可以得到哪些服务,有什么权限。
- 记账:如何对正在使用网络资源的用户进行审计。
AAA服务器通常同网络访问控制、网关服务器、数据库及用户信息目录等协同工作。若要访问网络资源,首先要进行用户的入网认证,这样才能访问网络资源。鉴别的过程就是验证用户身份的合法性;鉴别完成后,才能对用户访问网络资源进行授权,并对用户访问网络资源进行计费管理。
.
网络设备的AAA认证方式有本地身份验证、远程身份验证两大类,本地身份验证通过将用户名和密码在本地创建并验证,而远程身份验证通过各个厂商自有的AAA服务器来完成,这需要设备和AAA服务器进行关联。
.
华为防火墙支持用户进行本地与远程配置,以下所有配置都将以本地配置来进行身份验证。
华为防火墙常见的管理方式有:
- 通过Console方式管理:属于带外管理,不占用带宽,适用于新设备的首次配置时使用,在第一次配置时,会配置下面几个管理方式的其中一个或多个,下次在配置直接远程连接即可,无须使用Console连接了。
- 通过Telnet方式管理:属于带内管理,配置简单,安全性低,资源占用少,主要适用于安全性不高、设备性能差的场景。因为在配置时所有数据是明文传输,所以仅限于内网环境使用。
- 通过web管理方式:属于带内管理,可以基于图形化管理,适用于新手配置设备(但也要熟知其工作原理)。
- 通过SSH方式管理,属于带内管理,配置相比较复杂些,资源占用也高,但是欣慰的是安全性极高,主要适用于对安全性要求较高的场景,如通过互联网远程管理公司网络设备。
二、各种管理方式的配置:
Console方式的管理,只要连接console线,在客户端使用超级终端连接即可,具体操作请百度吧,这里就不写了。
环境很简单,如下所示:
USG6000的防火墙,默认编号最小的接口(一般是G0/0/0)已经配置了远程管理的一些相关配置及IP地址,所以有很多配置是可以省略的,不过为了完整的将所需的配置写下来,我不使用它的G0/0/0接口,而使用别的全新没有配置的接口。
1、通过telenet管理配置:
<USG6000V1>sys # 进入配置视图Enter system view, return user view with Ctrl+Z.[USG6000V1]int g 1/0/0 # 进入防火墙接口[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.1.1 24 # 配置防火墙接口IP(管理IP)Oct 25 2019 11:23:06 USG6000V1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet1/0/0 has entered the UP state.[USG6000V1-GigabitEthernet1/0/0]undo shutdown # 打开接口Info: Interface GigabitEthernet1/0/0 is not shutdown.[USG6000V1-GigabitEthernet1/0/0]quit # 退出当前视图[USG6000V1]telnet server enable # 打开防火墙的 Telnet 功能[USG6000V1]int g 1/0/0[USG6000V1-GigabitEthernet1/0/0]service-manage enable # 配置接口管理模式[USG6000V1-GigabitEthernet1/0/0]service-manage telnet permit # 允许Telnet[USG6000V1-GigabitEthernet1/0/0]quit[USG6000V1]firewall zone trust # 进入到 trust 区域[USG6000V1-zone-trust][USG6000V1-zone-trust]add interface GigabitEthernet 1/0/0 # 将接口1/0/0加入到该区域[USG6000V1-zone-trust]quit [USG6000V1]security-policy # 配置规则[USG6000V1-policy-security]rule name allow_telnet # 配置规则,allow_telnet是规则名称 [USG6000V1-policy-security-rule-allow_telnet] # 以下三条配置条件[USG6000V1-policy-security-rule-allow_telnet]source-zone trust # 源区域是trust[USG6000V1-policy-security-rule-allow_telnet]destination-zone local # 目标区域是防火墙本机[USG6000V1-policy-security-rule-allow_telnet]action permit # 动作为允许[USG6000V1-policy-security-rule-allow_telnet]quit[USG6000V1-policy-security]quit[USG6000V1]user-interface vty 0 4 # 配置VTY用户接口[USG6000V1-ui-vty0-4]authentication-mode aaa # 讲VTY接口的验证方式设为aaaWarning: The level of the user-interface(s) will be the default level of AAA users, please check whether it is correct.[USG6000V1-ui-vty0-4]protocol inbound telnet # 允许Telnet用户连接到虚拟终端[USG6000V1-ui-vty0-4]quit[USG6000V1]aaa # 进入aaa配置视图[USG6000V1-aaa]manager-user zhangsan # 配置本地用户zhangsan[USG6000V1-aaa-manager-user-zhangsan]password cipher pwd@123123 # 配置登录密码,cipher为明文密码,不建议使用,密文可参考web管理Info: You are advised to config on man-machine mode.[USG6000V1-aaa-manager-user-zhangsan][USG6000V1-aaa-manager-user-zhangsan]service-type telnet # 配置服务类型[USG6000V1-aaa-manager-user-zhangsan]level 3 # 配置用户权限级别 [USG6000V1-aaa-manager-user-zhangsan]quit[USG6000V1-aaa]quit
经过上面的配置,即可使用Xshell等超级终端软件连接该防火墙了。使用Telnet命令即可连接,如下:
.
[E:/~]$ telnet 192.168.1.1Connecting to 192.168.1.1:23...Connection established.The password needs to be changed. Change now? [Y/N]: y # 第一次登陆需要修改密码Please enter old password: # 填写旧密码Please enter new password: # 填写新密码Please confirm new password: # 确认新密码Info: Receive a message from AAA of cutting user.Username:zhangsanPassword: # 输入新密码************************************************************************** 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. **************************************************************************Info: The max number of VTY users is 10, and the number of current VTY users on line is 1. The current login time is 2019-10-25 11:44:32+00:00.<USG6000V1>sysEnter system view, return user view with Ctrl+Z.[USG6000V1]
2、配置web方式登录设备:
<USG6000V1>sys # 进入配置视图Enter system view, return user view with Ctrl+Z.[USG6000V1]int g 1/0/0 # 进入防火墙接口[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.1.1 24 # 配置防火墙接口IP(管理IP)[USG6000V1-GigabitEthernet1/0/0]undo shutdown # 打开接口[USG6000V1-GigabitEthernet1/0/0]service-manage http permit # 允许http管理[USG6000V1-GigabitEthernet1/0/0]service-manage https permit # 允许https管理[USG6000V1]firewall zone trust # 进入到 trust 区域[USG6000V1-zone-trust][USG6000V1-zone-trust]add interface GigabitEthernet 1/0/0 # 将接口1/0/0加入到该区域[USG6000V1]security-policy # 配置规则[USG6000V1-policy-security]rule name allow_web # 配置规则,allow_web是规则名称 [USG6000V1-policy-security-rule-allow_telnet] # 以下三条配置条件[USG6000V1-policy-security-rule-allow_telnet]source-zone trust # 源区域是trust[USG6000V1-policy-security-rule-allow_telnet]destination-zone local # 目标区域是防火墙本机[USG6000V1-policy-security-rule-allow_telnet]action permit # 动作为允许[USG6000V1-policy-security-rule-allow_telnet]quit[USG6000V1-policy-security]quit[USG6000V1]web-manager security enable # 开启https功能[USG6000V1]aaa # 配置aaa[USG6000V1-aaa]manager-user web # 配置web为本地用户[USG6000V1-aaa-manager-user-web]password # 密文密码Enter Password: # 输入密码Confirm Password: # 确认密码[USG6000V1-aaa-manager-user-web]service-type web # 指定用户类型[USG6000V1-aaa-manager-user-web]level 3 # 制定权限级别[USG6000V1-aaa-manager-user-web]quit[USG6000V1-aaa]quit[USG6000V1]
经过以上配置,现在即可使用web访问测试,防火墙默认情况下开启的https端口为8443,使用客户端访问测试,经过上面的配置,应使用 https://192.168.1.1:8443 进行访问(建议使用谷歌浏览器,可能是eNSP模拟器的原因,若网页加载不出来,多刷新几次就好):
至此就配置完成了
3、配置SSH方式登录:
<USG6000V1>sys # 进入配置视图Enter system view, return user view with Ctrl+Z.[USG6000V1]int g 1/0/0 # 进入防火墙接口[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.1.1 24 # 配置防火墙接口IP(管理IP)[USG6000V1-GigabitEthernet1/0/0]undo shutdown # 打开接口[USG6000V1-GigabitEthernet1/0/0]service-manage enable [USG6000V1-GigabitEthernet1/0/0]service-manage ssh permit # 允许SSH登录[USG6000V1]firewall zone trust # 进入到 trust 区域[USG6000V1-zone-trust][USG6000V1-zone-trust]add interface GigabitEthernet 1/0/0 # 将接口1/0/0加入到该区域[USG6000V1]security-policy # 配置规则[USG6000V1-policy-security]rule name allow_ssh # 配置规则,allow_ssh是规则名称 [USG6000V1-policy-security-rule-allow_telnet] # 以下三条配置条件[USG6000V1-policy-security-rule-allow_telnet]source-zone trust # 源区域是trust[USG6000V1-policy-security-rule-allow_telnet]destination-zone local # 目标区域是防火墙本机[USG6000V1-policy-security-rule-allow_telnet]action permit # 动作为允许[USG6000V1-policy-security-rule-allow_telnet]quit[USG6000V1-policy-security]quit[USG6000V1]rsa local-key-pair create # 创建ssh所需要的密钥对The key name will be: USG6000V1_HostThe 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]: # 输入默认的秘钥长度,直接回车采用默认2048Generating keys....+++++........................++....++++...........++[USG6000V1]user-interface vty 0 4[USG6000V1-ui-vty0-4]authentication-mode aaa[USG6000V1-ui-vty0-4]protocol inbound ssh[USG6000V1-ui-vty0-4]quit[USG6000V1][USG6000V1]ssh user test # 指定 test 为SSH用户[USG6000V1]ssh user test authentication-type password # 配置认证方式[USG6000V1]ssh user test service-type stelnet # 配置服务类型[USG6000V1]aaa # 进入aaa[USG6000V1-aaa]manager-user test # 指定用户[USG6000V1-aaa-manager-user-test]password # 配置密码Enter Password:Confirm Password:[USG6000V1-aaa-manager-user-test][USG6000V1-aaa-manager-user-test]service-type ssh # 类型为ssh[USG6000V1-aaa-manager-user-test]level 3 # 权限级别[USG6000V1-aaa-manager-user-test]quit[USG6000V1-aaa]quit[USG6000V1]stelnet server enable # 开启ssh
至此配置完毕,开始使用Xshell连接即可。
.
每种方式各有各的好处,各有各的方便,就看各位怎么取决了!!!