华为防火墙(USG)的管理方式配置

1、华为防火墙设备的几种管理方式介绍:
因为在对防火墙设备配置管理方式时,涉及到了AAA这个概念,索性就将AAA的相关介绍简单写一下。web

AAA是验证(Authentication)、受权(Authorization)和记帐(Accounting)三个部分组成,是一个可以处理用户访问请求的服务器程序,主要目的是管理用户访问网络服务器,为具备访问权限的用户提供服务。其中:shell

  • 验证:哪些用户能够访问网络服务器。
  • 受权:具备访问权限的用户能够获得哪些服务,有什么权限。
  • 记帐:如何对正在使用网络资源的用户进行审计。

AAA服务器一般同网络访问控制、网关服务器、数据库及用户信息目录等协同工做。若要访问网络资源,首先要进行用户的入网认证,这样才能访问网络资源。鉴别的过程就是验证用户身份的合法性;鉴别完成后,才能对用户访问网络资源进行受权,并对用户访问网络资源进行计费管理。
.
网络设备的AAA认证方式有本地身份验证、远程身份验证两大类,本地身份验证经过将用户名和密码在本地建立并验证,而远程身份验证经过各个厂商自有的AAA服务器来完成,这须要设备和AAA服务器进行关联。
.
华为防火墙支持用户进行本地与远程配置,如下全部配置都将以本地配置来进行身份验证。数据库

华为防火墙常见的管理方式有:浏览器

  • 经过Console方式管理:属于带外管理,不占用带宽,适用于新设备的首次配置时使用,在第一次配置时,会配置下面几个管理方式的其中一个或多个,下次在配置直接远程链接便可,无须使用Console链接了。
  • 经过Telnet方式管理:属于带内管理,配置简单,安全性低,资源占用少,主要适用于安全性不高、设备性能差的场景。由于在配置时全部数据是明文传输,因此仅限于内网环境使用。
  • 经过web管理方式:属于带内管理,能够基于图形化管理,适用于新手配置设备(但也要熟知其工做原理)。
  • 经过SSH方式管理,属于带内管理,配置相比较复杂些,资源占用也高,可是欣慰的是安全性极高,主要适用于对安全性要求较高的场景,如经过互联网远程管理公司网络设备。

2、各类管理方式的配置:
Console方式的管理,只要链接console线,在客户端使用超级终端链接便可,具体操做请百度吧,这里就不写了。
环境很简单,以下所示:
华为防火墙(USG)的管理方式配置
USG6000的防火墙,默认编号最小的接口(通常是G0/0/0)已经配置了远程管理的一些相关配置及IP地址,因此有不少配置是能够省略的,不过为了完整的将所需的配置写下来,我不使用它的G0/0/0接口,而使用别的全新没有配置的接口。
一、经过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接口的验证方式设为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]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命令便可链接,以下:服务器


.
华为防火墙(USG)的管理方式配置网络

[E:\~]$ telnet 192.168.1.1

Connecting 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:zhangsan
Password:                                   # 输入新密码
*************************************************************************
*         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>sys
Enter system view, return user view with Ctrl+Z.
[USG6000V1]

二、配置web方式登陆设备: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 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模拟器的缘由,若网页加载不出来,多刷新几回就好):
华为防火墙(USG)的管理方式配置
华为防火墙(USG)的管理方式配置
华为防火墙(USG)的管理方式配置
华为防火墙(USG)的管理方式配置
至此就配置完成了
三、配置SSH方式登陆:ide

<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_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]:                    # 输入默认的秘钥长度,直接回车采用默认2048
Generating 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链接便可。
华为防火墙(USG)的管理方式配置
华为防火墙(USG)的管理方式配置
华为防火墙(USG)的管理方式配置
华为防火墙(USG)的管理方式配置
华为防火墙(USG)的管理方式配置
.
每种方式各有各的好处,各有各的方便,就看各位怎么取决了!!!性能

相关文章
相关标签/搜索