华为ensp防火墙配置(纯享版)

文章目录


前言

防火墙是生活和项目中不可或缺的一部分,本篇文章对华为的ensp防火墙配置做一个总结。在之前的dhcp配置中有软件的下载地址,需要地址的小伙伴可以去看之前的dhcp中继配置。


一、拓扑结构


  1. 路由器选择:AR2220
  2. 防火墙选择:USG6000V(这个防火墙需要导入镜像后才能启动)

二、配置步骤

整体拓扑以及ip,个人喜欢使用/24的掩码

1.路由器配置(路由器代替互联网)

路由器这边配置很简单就一个ip

c 复制代码
system
undo info-center enable   -----关闭消息
interface GigabitEthernet 0/0/1
ip address 114.114.114.1 24

2.server和pc配置

c 复制代码
server添加对应ip和网关,网关是防火墙的GE 1/0/1的地址
pc添加对应ip和网关,这两个配置完后一定要点击应用或者保存,不然可能测试的时候不通

3.防护墙配置

防火墙需要输入密码才能登录

c 复制代码
Username:admin
Password:Admin@123
输入后它会提示你修改密码,选择Y,密码复杂程度是大小写加特殊字符(我设置的是Root@1234)
----------------------------------------------------------------------------------------
system
undo info-center enable   -----关闭消息
interface GigabitEthernet 1/0/0   -----untrust
ip address 114.114.114.254 24
interface GigabitEthernet 1/0/1   -----dmz
ip address 10.1.1.254 24
interface GigabitEthernet 1/0/2   -----trust
ip address 192.168.1.254 24
----------------------------------------------------------------------------------------
firewall zone untrust
add interface  GigabitEthernet 1/0/0   -----untrust
firewall zone dmz
add interface  GigabitEthernet 1/0/1   -----dmz
firewall zone trust
add interface  GigabitEthernet 1/0/2   -----trust
----------------------------------------------------------------------------------------
security-policy     -----安全策略
rule name t_to_ut   -----命名为t_to_ut,意思是这个策略是从trust到untrust
source-zone trust
destination-zone utrust   -----从trust到untrust,执行到这里其实就可以了,下面内容是拓展内容
source-address 192.168.1.0 24   -----添加源ip
destination-address any         -----添加目前ip,any表示trust到untrust的任意ip
action permit
rule name t_to_dmz  -----命名为t_to_dmz,意思是这个策略是从trust到dmz
source-zone trust
destination-zone dmz
source-address 192.168.1.0 24   -----添加源ip,都是trust至其他区域所以这里是一样的
destination-address any         -----添加目前ip,都是trust至其他区域所以这里是一样的
action permit                   -----如果想实现dmz到untrust可以根据上述内容反推
----------------------------------------------------------------------------------------
nat address-group t_to_ut    -----nat配置,添加nat组,名字为t_to_ut
mode pat                     -----选择模式
section 0 114.114.114.30 114.114.114.50   -----添加地址池,要注意避开114.114.114.1和254
nat-policy                   -----nat策略
rule name t_to_ut            -----nat策略名
source-zone trust
destination-zone utrust      -----和之前的security-policy一样可以加源目ip
action source-nat address-group t_to_ut-----表示使用组t_to_ut源nat地址的转换
nat address-group t_to_dmz
mode pat                     -----选择模式
section 0 10.1.1.30 10.1.1.50   -----添加地址池,要注意避开
nat-policy                   -----nat策略
rule name t_to_dmz            -----nat策略名
source-zone trust
destination-zone dmz      -----和之前的security-policy一样可以加源目ip
action source-nat address-group t_to_dmz

4.测试



总结

防火墙的配置拓展很多,本文不涉及抄袭,写文的目的是解决自在配置时候的问题,并总结经验,提供一些方法给需要的同学!!!!

相关推荐
The Straggling Crow10 小时前
Network
网络
yyuuuzz10 小时前
独立站的技术基础与常见运维问题
大数据·运维·服务器·网络·数据库·aws
Oll Correct13 小时前
实验二十九:TCP的运输连接管理
网络·笔记
Cheng小攸15 小时前
综合实验2
网络·windows
瑶总迷弟15 小时前
使用 mis-tei 在昇腾310P上部署 bge-m3模型
pytorch·python·华为·语言模型·自然语言处理·cnn·unix
Soari16 小时前
SSH 主机密钥冲突
运维·网络·ssh
不羁的木木16 小时前
《HarmonyOS技术精讲》四:驱动开发入门 ── 标准外设与非标USB串口
驱动开发·华为·harmonyos
不羁的木木17 小时前
《HarmonyOS底部页签-沉浸光感组件实战》高级定制:图标出血与分割线
华为·harmonyos
且听风吟_xincell17 小时前
用 TypeScript 从零写一个 TCP 聊天室(上)—— 网络编程入门实战
网络·tcp/ip·typescript
Goway_Hui18 小时前
【鸿蒙原生应用开发--ArkUI--015】File-manager 文件管理器应用开发教程
华为·harmonyos