- 本篇来讲一下USG6000的各种配置命令,此外还有配置web登录和ssh登录
一.防火墙简介
防火墙的工作模式
- 路由模式:当防火墙处于内部网络和外部网络中间时,需要将防火墙的内部网络、外部网络、DMZ三个区域不同地址段的时候,这个时候防火墙首先是一台路由器,其后在提供其他的防火墙功能
- 透明模式:华为防火墙和外层相连的时候,则防火墙处于透明模式下
- 混合模式:既处于路由接口模式又处于透明模式下,则防火墙是混合模式,目前只用于透明模式下的双机热备的特殊应用中,别的环境不用。
华为防火墙的安全区域
- Local:通常定义防火墙本身,优先级100,防火墙除了转发的流量外,自己也有收发流量,如控制流量、动态路由协议等,这些报文通常是从Local区域发送的
- trust:主要用户连接公司内部网络,优先级是85,安全等级较高
- DMZ:非军事化区域,优先级为50,是介于军事管事区和公共区域之间的一个区域,安全等级中
- untrust:外部网络,优先级为5,安全等级低
- 自定义区域:用户自定义区域。默认最多16个区域,默认没有优先级,用户自定义优先级
防火墙的inbound和outbound
- inbound:数据由等级低的流向等级高的,如untrust(5)区域流向trust(85)
- outbound:数据由等级高的流向等级低的,如DMZ(50)区域流向untrust(5)
安全策略
- 传统的防火墙都是基于5元组:源ip、目标IP、协议号、源端口号、目标端口号
- 新一代的防火墙除了传统的5元组之外,还加入了应用、内容、时间、用户、威胁、位置进行深层次探测
- 任何2个安全区域的优先级不能相同
- 本域内不同接口间的报文不过滤直接转发
- 接口没有加入域之前不能转发包
- 在USG6600系列防火墙上默认是没有安全策略的,也就是说,不管是什么区域之间项目访问,都必须要配置安全策略,除非是同一区域内的报文传递
二.USG6000具体配置
网络拓扑图
Cloud1的配置
USG6000防火墙配置使用Telnet协议,登录远程软件
- 在ensp上的usg终端上的配置
Username:admin
Password:
The password needs to be changed. Change now? [Y/N]: y
Please enter old password:
Please enter new password:
Please confirm new password:
Info: Your password has been changed. Save the change to survive a reboot.
*************************************************************************
* Copyright (C) 2014-2018 Huawei Technologies Co., Ltd. *
* All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
*************************************************************************
<USG6000V1>sys
Enter system view, return user view with Ctrl+Z.
[USG6000V1]un in en
Info: Saving log files...
Info: Information center is disabled.
[USG6000V1]sysname FW
[FW]int g0/0/0
[FW-GigabitEthernet0/0/0]ip add 192.168.70.10 24 //进入g口,配置IP地址
[FW-GigabitEthernet0/0/0]service-manage enable //配置接口管理模式
[FW-GigabitEthernet0/0/0]service-manage telnet permit //允许telnet服务
[FW-GigabitEthernet0/0/0]un sh //激活接口
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[FW-GigabitEthernet0/0/0]q
[FW]telnet server enable //开启telnet服务
Warning: Telnet is not a secure protocol, and it is recommended to use Stelnet.
[FW]firewall zone trust //进入防火墙的trust区域
[FW-zone-trust]dis this //确定g口,添加进入trust区域
2020-02-11 03:11:23.790
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
#
return
[FW-zone-trust]q
[FW]security-policy //安全策略配置
[FW-policy-security]rule name allow_telnet //取名规则,命名为allow_telnet
[FW-policy-security-rule-allow_telnet]source-zone trust //来自trust区域
[FW-policy-security-rule-allow_telnet]destination-zone local //去local区域
[FW-policy-security-rule-allow_telnet]action permit //动作是允许放通
[FW-policy-security-rule-allow_telnet]q
[FW-policy-security]q
[FW]user-interface vty 0 4 //进入配置认证模式
[FW-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.
[FW-ui-vty0-4]protocol inbound telnet //允许telnet连接虚拟终端
[FW-ui-vty0-4]q
[FW]aaa //进入AAA模式
[FW-aaa]manager-user demo //配置管理用户名为demo
[FW-aaa-manager-user-demo]password cipher bdqn@123 //设置密码
Info: You are advised to config on man-machine mode.
[FW-aaa-manager-user-demo]service-type telnet //服务类型是telnet
Warning: The user access modes include Telnet or FTP, so security risks exist.
[FW-aaa-manager-user-demo]level 3 //用户权限级别是3
[FW-aaa-manager-user-demo]q
[FW-aaa]
- 点击SecureCRT软件远程登录防火墙
USG6000防火墙配置WEB界面登录
<FW>sys
Enter system view, return user view with Ctrl+Z.
[FW]int g0/0/0
[FW-GigabitEthernet0/0/0]service-manage http permit //允许http服务
[FW-GigabitEthernet0/0/0]service-manage https permit //允许https服务
[FW-GigabitEthernet0/0/0]q
[FW]aaa //进入AAA模式
[FW-aaa]manager-user demo
[FW-aaa-manager-user-demo]service-type web //服务类型web
- 在本机浏览器输入http://192.168.70.10:8443/,具体web界面配置方法参考百度
USG6000防火墙配置使用SSH协议,登录远程软件
[FW]int g0/0/0
[FW-GigabitEthernet0/0/0]service-manage ssh permit //ssh流量放通
[FW-GigabitEthernet0/0/0]q
[FW]rsa local-key-pair create //生成ssh密钥
The key name will be: FW_Host
The range of public key size is (2048 ~ 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...
...+++++
........................++
....++++
...........++
[FW]aaa
[FW-aaa]manager-user demo
[FW-aaa-manager-user-demo]service-type ssh //服务类型是ssh
[FW-aaa-manager-user-demo]q
[FW-aaa]q
[FW]stelnet server enable
Info: Succeeded in starting the Stelnet server.
[FW]user-interface vty 0 4 //进入配置认证模式
[FW-ui-vty0-4]protocol inbound ssh //允许ssh连接虚拟终端
[FW-ui-vty0-4]q
[FW]
扫描二维码关注公众号,回复:
9165277 查看本文章