华为防火墙设备管理方式

温馨提示:本章介绍最常用的两种Telnet、SSH方式管理

华为是AAA(Authentication Authorization Accounting)服务器,它是一种机制,能够处理用户访问请求的服务程序,为具有访问权限的用户提供服务。

验证:Authentication哪些用户可以访问
授权:具有访问权限的用户可以得到哪些服务,有什么权限
记账:对使用网络资源的用户审计

带外管理:Console方式管理,适用于刚买的新设备或者网络故障无法使用其他方式管理,此方式不需要IP地址,通过物理线连接。

带内管理:Telnet、web、SSH方式管理,Telnet安全性低、占用资源少;web图形化界面,适合新手;SSH配置复杂、安全性高、占用资源高,互联网远程管理公司设备。


配置SSH方式管理

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_服务器

注意:默认防火墙接口g0/0/0,IP是192.168.0.1并加入安全区域trust
若使用默认的地址和区域则不用配置此项。首次登录,必须配置一个本地登录密码,默认是admin@123

1、 允许ssh远程管理

[USG6000V1]int g0/0/0
[USG6000V1-GigabitEthernet0/0/0]service-manage enable //启用接口管理模式
[USG6000V1-GigabitEthernet0/0/0]service-manage ssh permit //允许ssh服务流量通过
[USG6000V1-GigabitEthernet0/0/0]quit

查看默认接口地址:

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_安全_02


2、启用并配置防火墙域间包过滤安全策略,允许trust区域流量与local区域互相通信

[USG6000V1]security-policy   //进入安全策略
[USG6000V1-policy-security]rule name allow_ssh //配置规则,名称为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 //配置动作

3、 配置认证模式及本地用户信息

[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]: //按Enter键,采用默认密钥长度
Generating keys...
...+++++
........................++
....++++
...........++

[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 ssh //协议类型是ssh入站
[USG6000V1-ui-vty0-4]quit

[USG6000V1]ssh user test //指定SSH用户为test
Info: Succeeded in adding a new SSH user.

[USG6000V1]ssh user test authentication-type password //认证方式,密码
[USG6000V1]ssh user test service-type stelnet //服务类型

[USG6000V1]aaa
[USG6000V1-aaa]manager-user test //创建本地用户
[USG6000V1-aaa-manager-user-test]password cipher test@123 //指定密码
Info: You are advised to config on man-machine mode. //提示信息:建议采用man-machine模式

[USG6000V1-aaa-manager-user-test]service-type ssh //服务类型
[USG6000V1-aaa-manager-user-test]level 3 //此用户的访问级别

[USG6000V1-aaa-manager-user-test]quit
[USG6000V1-aaa]quit
[USG6000V1]stelnet server enable //启用此服务类型

4、 验证:在客户端以test用户登录,注意首次登录,提示设置新密码,必须设置符合密码复杂性要求的新密码,断开连接再次登录即可!

下图是x-shell登录成功,界面

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_安全_03


配置Telnet方式管理

1、打开防火墙Telnet远程管理功能

[USG6000V1]telnet server enable

2、 启用并配置防火墙安全策略

[USG6000V1]int g0/0/0 
[USG6000V1-GigabitEthernet0/0/0]service-manage enable //启用接口管理模式
[USG6000V1-GigabitEthernet0/0/0]service-manage telnet permit //允许telnet管理流量通过

[USG6000V1]security-policy //进入安全策略模式
[USG6000V1-policy-security]rule name allow_telnet //规则名称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]quit
[USG6000V1-policy-security]quit

3、 配置认证模式及本地用户信息

[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
[USG6000V1-ui-vty0-4]quit

[USG6000V1]aaa
[USG6000V1-aaa]manager-user demo
[USG6000V1-aaa-manager-user-demo]password cipher demo@1234
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.
//翻译:警告用户访问方式有Telnet或FTP,存在安全隐患。忽略
[USG6000V1-aaa-manager-user-demo]level 3 //此用户的访问级别
[USG6000V1-aaa-manager-user-demo]quit
[USG6000V1-aaa]quit

4、验证:方法类似SSH

提示修改密码,修改完,自动断开连接。

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_华为_04


再次以新密码登录

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_运维_05


配置安全策略-实现服务访问控制

温馨提示:有好多种方式实现,具体视场景需求

  1. 实现内部的pc1可以访问外部的pc2,而pc3不可以访问
[USG6000V1]security-policy 
[USG6000V1-policy-security]rule name pc1toout

[USG6000V1-policy-security-rule-pc1toout]source 192.168.1.2 32
[USG6000V1-policy-security-rule-pc1toout]service icmp
[USG6000V1-policy-security-rule-pc1toout]destination-zone untrust
[USG6000V1-policy-security-rule-pc1toout]action permit

验证:pc1可以ping通外部主机pc2

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_安全_06


pc3不可以ping通外部主机pc2

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_华为_07


查看会话:aaa认证模式实现记账功能,对使用网络资源的用户审计

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_防火墙_08

  1. 实现外部的pc2可以访问dmz中的服务器(ftp,http以及icmp)
[USG6000V1-policy-security]rule name outtodmz
[USG6000V1-policy-security-rule-outtodmz]source-zone untrust
[USG6000V1-policy-security-rule-outtodmz]destination-address 192.168.3.2 32

[USG6000V1-policy-security-rule-outtodmz]service icmp
[USG6000V1-policy-security-rule-outtodmz]service http
[USG6000V1-policy-security-rule-outtodmz]service ftp
[USG6000V1-policy-security-rule-outtodmz]action permit

测试:pc2可以ping通 dmz中的主机192.168.3.2

饿了吗!来点营养的-华为USG6000V防火墙超详细配置_安全_09