温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

华为防火墙实现远程管理的方式及配置详解

发布时间:2020-06-28 12:42:41 来源:网络 阅读:1556 作者:筱振 栏目:安全技术

关于网络设备或是服务器,管理人员几乎很少会守着设备进行维护及管理,最普遍、应用最广泛的就是——远程管理。下面简单介绍一下华为防火墙管理的几种方式。

博文大纲:
一、华为防火墙常见的管理方式;
二、各种管理方式配置详解;
1.通过Console线进行管理;
2.通过Telnet方式管理;
3.通过Web方式登录设备;
4.配置SSH方式登录设备;

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

提到管理,必然会涉及到AAA的概念,我们首先来了解一下——AAA。

AAA概述

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

其中:

  • 验证:哪些用户可以访问网络服务器;
  • 授权:具有访问权限的用户可以得到哪些服务,具有什么样的权限;
  • 记账:如何对正在使用网络资源的用户进行审计;

AAA服务器通常同网络访问控制、网关服务器、数据库及用户信息目录等协同工作。若要访问网络资源,首先要进行用户的入网认证,这样才能访问网络资源。鉴别的过程就是验证用户身份的合法性;鉴别完成后,才能对用户访问网络资源进行授权,并对用户访问网络资源进行计费管理。

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

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

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

  • 通过Console方式管理:属于带外管理,不占用带宽,适用于新设备的首次配置场景;
  • 通过Telnet方式管理:属于带内管理,配置简单、安全性低、资源占用少,主要适用于安全性不高的场景。比如:公司内部;
  • 通过Web方式管理,属于带内管理,可以基于图形化管理,更适用于新手配置设备;
  • 通过SSH方式管理:属于带内管理配置复杂、安全性高、资源占用高,主要适用于对安全性要求较高的场景,如通过互联网远程管理公司网络设备;

二、各种管理方式配置详解

1.通过Console线进行管理

这种方式适用于刚购买的新设备,实际环境中,插上Console即可!这里就不再多说了!

2.通过Telnet方式管理

Telnet管理方式通过配置使终端通过Telnet方式登录设备,实现对设备的配置和管理。其实这种环境拓补只需一个防火墙(版本为USG6000)和Cloud(主要是为了可以桥接到宿主机或虚拟机)即可,实验拓补如下:
华为防火墙实现远程管理的方式及配置详解

(1)首次登录Console控制台时,按要求配置密码,如图

华为防火墙实现远程管理的方式及配置详解

(2)配置防火墙接口IP地址,便于日后管理
<USG6000V1>system-view 
Enter system view, return user view with Ctrl+Z.
[USG6000V1]undo info enable 
Info: Information center is disabled.
[USG6000V1]int g0/0/0
[USG6000V1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[USG6000V1-GigabitEthernet0/0/0]undo shutdown 
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[USG6000V1-GigabitEthernet0/0/0]quit 
(3)打开防火墙的Telnet功能
[USG6000V1]telnet server enable 
(4)配置防火墙允许远程管理
[USG6000V1]int g0/0/0
[USG6000V1-GigabitEthernet0/0/0]service-manage enable 
//配置接口管理模式
[USG6000V1-GigabitEthernet0/0/0]service-manage telnet permit 
//允许Telnet
[USG6000V1-GigabitEthernet0/0/0]quit
(5)将防火墙接口g0/0/0加入安全区域
[USG6000V1]firewall zone trust 
[USG6000V1-zone-trust]add int g0/0/0
 Error: The interface has been added to trust security zone. 
 //这是正常提示,表示这个接口 已经添加到安全区域中
[USG6000V1-zone-trust]quit
(6)将防火墙配置域间包过滤,以保证网络基本通信正常

因为Telnet流量属于防火墙自身收发,所以需要配置Trust区域到Local区域的安全策略,命令如下:

[USG6000V1]security-policy 
[USG6000V1-policy-security]rule name allow_telent
//配置规则,其中allow_telnet为规则名,可自定义
[USG6000V1-policy-security-rule-allow_telent]source-zone trust 
//匹配条件,源区域是trust区域
[USG6000V1-policy-security-rule-allow_telent]destination-zone local 
//匹配条件,目标区域是local区域
[USG6000V1-policy-security-rule-allow_telent]action permit 
//匹配条件满足后,执行的动作,permit为允许的意思
[USG6000V1-policy-security-rule-allow_telent]quit
[USG6000V1-policy-security]quit
(7)配置认证模式及本地用户信息
[USG6000V1]user-interface vty 0 4
[USG6000V1-ui-vty0-4]authentication-mode aaa
//用户接口验证方式为AAA
[USG6000V1-ui-vty0-4]protocol inbound telnet 
//允许Telnet连接虚拟终端
[USG6000V1-ui-vty0-4]quit
[USG6000V1]aaa
[USG6000V1-aaa]manager-user lzj
//配置本地用户lzj
[USG6000V1-aaa-manager-user-lzj]password cipher lzj@1234
//配置用户密码(cipher为密文方式)
Info: You are advised to config on man-machine mode.
//建议使用man-machine方式配置密码
[USG6000V1-aaa-manager-user-lzj]service-type telnet 
//配置服务类型为telnet
[USG6000V1-aaa-manager-user-lzj]level 3
//配置用户权限级别
[USG6000V1-aaa-manager-user-lzj]quit 
[USG6000V1-aaa]quit

注意:USG6000系列属于最新版本,配置本地用户名和密码需要使用manager-user命令,之前的版本则使用local-user命令。

(8)客户端测试访问

华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解

客户端Telnet访问成功!

3.通过Web方式登录设备

建议在模拟器上重新部署设备,当然也可在Telnet的基础上继续配置Web方式访问!为了简单明了,朋友更加明白配置Web方式,本人重新画实验拓补,实验拓补还是原本的样子,一朵 Cloud模拟真实客户端,一台USG6000防火墙。配置命令如下:

<USG6000V1>sys
Enter system view, return user view with Ctrl+Z.
[USG6000V1]undo info enable 
Info: Information center is disabled.
[USG6000V1]int g0/0/0
[USG6000V1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[USG6000V1-GigabitEthernet0/0/0]undo shutdown 
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[USG6000V1-GigabitEthernet0/0/0]service-manage http permit 
[USG6000V1-GigabitEthernet0/0/0]service-manage https permit 
[USG6000V1-GigabitEthernet0/0/0]quit
//打开接口的http和https管理
[USG6000V1]firewall zone trust 
[USG6000V1-zone-trust]add int g0/0/0
 Error: The interface has been added to trust security zone. 
 //正常提示,可以忽略
[USG6000V1-zone-trust]quit
//配置接口加入Trust区域
[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]quit
[USG6000V1-policy-security]quit
//如果在Telnet基础上配置Web方式访问,这些安全配置可以忽略
[USG6000V1]web-manager security enable 
//开启https安全访问功能
[USG6000V1]aaa
[USG6000V1-aaa]manager-user lzj
[USG6000V1-aaa-manager-user-lzj]password

Enter Password:

Confirm Password:
//在这种模式下,配置的密码将不可见,这也是华为推荐的方式
[USG6000V1-aaa-manager-user-lzj]service-type web
//指定服务类型
[USG6000V1-aaa-manager-user-lzj]level 3
//指定权限级别
[USG6000V1-aaa-manager-user-lzj]quit
[USG6000V1-aaa]quit

注意:
其中“web-manager security enable ”命令后也可以自定义端口,比如:web-manager security enableport 2000,执行security参数,是开启https管理,不加security参数则表示可以开启http管理。绝对不允许https和http管理使用相同的端口,这样配置会导致端口冲突。访问失败!

客户端访问验证:
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
客户端通过Web方式访问成功!

4.配置SSH方式登录设备

为了初学者能够看明白,这里还是重新部署设备,实验拓补,跟前两种方式一样!也可在之前的基础继续配置,根据自己能力即可!SSH方式登录设备,配置命令如下:

<USG6000V1>sys
Enter system view, return user view with Ctrl+Z.
[USG6000V1]undo info enable 
Info: Information center is disabled.
[USG6000V1]int g0/0/0
[USG6000V1-GigabitEthernet0/0/0]ip add 192.168.1.20 24
[USG6000V1-GigabitEthernet0/0/0]undo shutdown 
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[USG6000V1-GigabitEthernet0/0/0]service-manage enable 
[USG6000V1-GigabitEthernet0/0/0]service-manage ssh permit 
[USG6000V1-GigabitEthernet0/0/0]quit
//打开接口的ssh管理
[USG6000V1]firewall zone trust 
[USG6000V1-zone-trust]add int g0/0/0
 Error: The interface has been added to trust security zone. 
 //正常提示,可以忽略
[USG6000V1-zone-trust]quit
[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]quit
[USG6000V1-policy-security]quit 
[USG6000V1]
//配置安全策略,如果在web方式或者Telnet方式之后,这些步骤可以省略
[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.
输入默认的密钥长度,默认值为2048           
Input the bits in the modulus[default = 2048]:
Generating keys...
.+++++
........................++
....++++
...........++

[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]quit
//并且开启ssh协议访问
[USG6000V1]ssh user lzj 
//指定lzj为SSH用户
[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 lzj@1234
Info: You are advised to config on man-machine mode.
//提示建议使用man-machine模式设置密码
[USG6000V1-aaa-manager-user-lzj]service-type ssh
//指定服务类型为ssh
[USG6000V1-aaa-manager-user-lzj]level 3
//管理模式为3
[USG6000V1-aaa-manager-user-lzj]quit
[USG6000V1-aaa]quit
[USG6000V1]stelnet server enable
//开启SSH服务

客户端访问测试:
本人习惯使用xshell,个人习惯,cmd命令框也可以的!
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解
华为防火墙实现远程管理的方式及配置详解

客户端SSH方式访问成功!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI