华为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.测试



总结

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

相关推荐
Xの哲學2 小时前
Linux多级时间轮:高精度定时器的艺术与科学
linux·服务器·网络·算法·边缘计算
FlourishingMind2 小时前
蓝牙授时CTS (Current Time Service)、PTP、NTP
运维·服务器·网络
不爱吃糖的程序媛2 小时前
ArkUI-X 6.0.0 Release发布
华为·harmonyos
Winner13002 小时前
查看rk3566摄像头设备、能力、支持格式
linux·网络·人工智能
w139548564224 小时前
Flutter跨平台组件集成框架鸿蒙化使用指南
flutter·华为·harmonyos
微爱帮监所写信寄信4 小时前
微爱帮监狱写信寄信工具信件加密技术方案
网络
专业开发者5 小时前
蓝牙技术联盟推出网络照明控制(NLC)规范
网络·物联网
Kiyra5 小时前
阿里云 OSS + STS:安全的文件上传方案
网络·人工智能·安全·阿里云·系统架构·云计算·json
小趴菜不能喝6 小时前
Docker 网络
网络·docker·容器
DARLING Zero two♡7 小时前
拒绝“环境劝退”:Llama-2-7b 在昇腾 NPU 上的工程化部署与深度故障排查实录
华为·llama·gpu算力