今天继续给大家介绍HCIE安全。本文以华为eNSP模拟器为例,实现了配置防火墙双击热备技术配置实例,采用的是上下行交换机配置VRRP的主备模式。
阅读本文,您需要有一定的防火墙配置基础和防火墙双机热备理论基础,如果您对此还存在困惑,欢迎查阅我博客内的其他文章,相信您一定会有所收获!
推荐先导文章阅读:
VGMP协议详解
HRP协议详解
防火墙双机热备技术详解
一、实验目的及拓扑
实验拓扑如上所示,现在两台防火墙上下行设备都是交换机,防火墙都是运行于路由模式,现在要求按照图示要求配置防火墙A/S模式双机热备组网。
二、实验配置命令
(一)接口VRRP配置命令
在本实验中,防火墙双机热备检测的是接口上的VRRP状态,其命令配置与普通VRRP配置大致相同,但是vrrp后面必须配置active或者standby表明此VRRP隶属于哪个VGMP组。接口上VRRP配置相关命令如下所示:
interface GigabitEthernet1/0/0
vrrp vrid 1 virtual-ip 192.168.1.254 active
#
这样,后面的active就表示本防火墙为主设备,那么在另一台防火墙上就应该配置standby。
(二)HRP配置命令
在完成上述配置后,还必须开启HRP并且配置心跳线,相关命令如下所示:
hrp enable
hrp interface Eth-Trunk1 remote 192.168.0.2
(三)双机热备其他配置说明
除了上述配置外,对于两个防火墙而言,还必须都要要配置的是安全区域,要把各自对应的接口加入相应的安全区域。
但是,至于安全策略,则因为备防火墙会自动同步主防火墙上的安全策略,因此可以只在主防火墙上配置安全策略,而备防火墙则不需要进行此配置。
在本实验中,安全策略配置命令如下:
security-policy
rule name 1
source-zone trust
destination-zone untrust
action permit
三、实验现象
(一)双机热备组网状态
(二)主备设备状态会话表同步
(三)双机热备组网故障后切换主备
四、附录——防火墙FW1配置命令
hrp enable
hrp interface Eth-Trunk1 remote 192.168.0.2
#
interface Eth-Trunk1
ip address 192.168.0.1 255.255.255.0
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 192.168.1.253 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.254 active
#
interface GigabitEthernet1/0/1
undo shutdown
ip address 192.168.2.1 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.2.3 active
#
interface GigabitEthernet1/0/5
undo shutdown
eth-trunk 1
#
interface GigabitEthernet1/0/6
undo shutdown
eth-trunk 1
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet1/0/0
#
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/1
#
firewall zone dmz
set priority 50
add interface Eth-Trunk1
#
ip route-static 0.0.0.0 0.0.0.0 192.168.2.254
#
security-policy
rule name 1
source-zone trust
destination-zone untrust
action permit
#
原创不易,转载请说明出处:https://blog.csdn.net/weixin_40228200/article/details/119281242