龙空技术网

华为防火墙几个基本配置命令

思源Edward 1104

前言:

此刻你们对“防火墙配置命令”大体比较注意,兄弟们都需要学习一些“防火墙配置命令”的相关知识。那么小编也在网上网罗了一些有关“防火墙配置命令””的相关资讯,希望我们能喜欢,咱们快快来学习一下吧!

防火墙也是经常用到的设备,可以先来了解一下!

1、 查看当前版本

命令:<SRG>display version

2、 查看当前配置

<SRG>display current-configuration

3、 防火墙的四个区:local,trust ,untrust, dmz, 这四个是系统自带不能删除,除了这四个域之外,还可以自定义域。域的优先级local>trust>dmz>untrust,自定义的域的优先级是可以自己调节的。域与域之间如果不做策略默认是deny的,即任何数据如果不做策略是通不过的,如果是在同一区域的就相当于二层交换机一样直接转发。域与域之间有inbound和outbound区分,华为定义了优先级低的域向优先级高的域方向就是inbound,优先级高的域向优先级低的域方向就是outbound

4、 设置防火墙安全区域,将接口放入安全区域

[SRG]firewall zone trust

[SRG-zone-trust]add interface GigabitEthernet 0/0/0

[SRG]firewall zone untrust

[SRG-zone-untrust]add interface GigabitEthernet 0/0/1

案例测试

防火墙FW1配置

[SRG]interface g0/0/0

[SRG-GigabitEthernet0/0/0]ip address 192.168.1.1 24

[SRG]interface g0/0/1

[SRG-GigabitEthernet0/0/1]ip address 20.1.1.1 24

[SRG]ip route-static 0.0.0.0 0.0.0.0 20.1.1.2 //设置默认路由

路由器AR1的配置

[AR1]interface g0/0/0

[AR1-GigabitEthernet0/0/0]ip address 20.1.1.2 24

防火墙FW1配置:把两个接口分别放到不同的区域

[SRG]firewall zone trust

[SRG-zone-trust]add interface GigabitEthernet 0/0/0

[SRG]firewall zone untrust

[SRG-zone-untrust]add interface GigabitEthernet 0/0/1

在防火墙FW1上布署域间包过滤规则,

[SRG]policy interzone trust untrust outbound

[SRG-policy-interzone-trust-untrust-outbound]policy 0

[SRG-policy-interzone-trust-untrust-outbound-0]action permit

[SRG-policy-interzone-trust-untrust-outbound-0]policy source 192.168.1.0 0.0.0.255

FW1设置NAT技术

[SRG]nat-policy interzone trust untrust outbound

[SRG-nat-policy-interzone-trust-untrust-outbound]policy 1

[SRG-nat-policy-interzone-trust-untrust-outbound-1]action source-nat

[SRG-nat-policy-interzone-trust-untrust-outbound-1]policy source 192.168.1.0 0.0.0.255

[SRG-nat-policy-interzone-trust-untrust-outbound-1]easy-ip GigabitEthernet 0/0/1

测试发现主机可以通过防火墙访问外网路由器

很不错的一个案例!!!

标签: #防火墙配置命令 #防火墙配置命令是什么