华为USG6000V防火墙之双机热备实验

双机热备
VGMP---VRRP组管理协议

 首先,我们先配置好所有设备的地址,再划分好两台USG6000V防火墙的信任域、不信任域以及DMZ区域。

接下来,我们分别在两台防火墙上分别配置VRRP协议,起到组备份的作用

VRRP备份组1                VRRP备份组2
 vrid=1                    vrid=2
 vip=192.168.1.254         vip=200.1.1.254vrid=1
FW1:
[USG6000V1-GigabitEthernet1/0/0]vrrp vrid 1 virtual-ip 192.168.1.254 24 active
[USG6000V1-GigabitEthernet1/0/0]service-manage ping permit 
[USG6000V1-GigabitEthernet1/0/1]service-manage ping permit 
[USG6000V1-GigabitEthernet1/0/1]vrrp vrid 2 virtual-ip 200.1.1.254 24 active 
[USG6000V1]security-policy
[USG6000V1-policy-security]rule name 1	
[USG6000V1-policy-security-rule-1]source-zone trust 
[USG6000V1-policy-security-rule-1]destination-zone untrust 
[USG6000V1-policy-security-rule-1]action permit 
[USG6000V1]dis firewall session table   查看会话表
FW2:
[USG6000V1-GigabitEthernet1/0/0]vrrp vrid 1 virtual-ip 192.168.1.254 24 standby
[USG6000V1-GigabitEthernet1/0/0]service-manage ping permit 	
[USG6000V1-GigabitEthernet1/0/1]service-manage ping permit 
[USG6000V1-GigabitEthernet1/0/1]vrrp vrid 2 virtual-ip 200.1.1.254 24 standby 
[USG6000V1]security-policy
[USG6000V1-policy-security]rule name 1
[USG6000V1-policy-security-rule-1]source-zone trust 	
[USG6000V1-policy-security-rule-1]destination-zone untrust 
[USG6000V1-policy-security-rule-1]action permit 

之后,我们就提出了一个新的概念,叫做心跳机制。

也就是,HRP协议---用来同步主备防火墙之间的会话和策略

这个协议配置在两台防火墙的DMZ区域之中。

FW1:
[USG6000V1]firewall zone dmz
[USG6000V1-zone-dmz]add int g1/0/2
[USG6000V1]hrp enable
HRP_M[USG6000V1]hrp int g1/0/2 remote 12.1.1.2
FW2:
[USG6000V1]firewall zone dmz 
[USG6000V1-zone-dmz]add int g1/0/2
[USG6000V1]hrp enable
HRP_S[USG6000V1]hrp standby-device 
HRP_M[USG6000V1]hrp int g1/0/2 remote 12.1.1.1
退出HRP:
quit
save
sy
undo hrp enable

到这里呢,我们双机热备实验就基本结束了,接下来来看一下两台防火墙配置之后的所有命令

FW1:

<USG6000V1>dis cu
!Software Version V500R001C10
#
sysname USG6000V1
#
 undo l2tp sendaccm enable
 l2tp domain suffix-separator @
#
undo info-center enable
#
undo telnet server enable
undo telnet ipv6 server enable
#
 hrp interface GigabitEthernet1/0/2 remote 12.1.1.2
#
 firewall packet-filter basic-protocol enable
#
 firewall detect ftp
#
 log type traffic enable
 log type syslog enable
 log type policy enable
#
 undo dataflow enable
#
 isp name "china mobile"
 isp name "china mobile" set filename china-mobile.csv
 isp name "china unicom"
 isp name "china unicom" set filename china-unicom.csv
 isp name "china telecom"
 isp name "china telecom" set filename china-telecom.csv
 isp name "china educationnet"
 isp name "china educationnet" set filename china-educationnet.csv
#
 snmp-agent session history-max-number enable
 snmp-agent session trap threshold 4000
 snmp-agent session-rate trap threshold 24000
#
 web-manager security version tlsv1 tlsv1.1
 web-manager security enable
#
firewall dataplane to manageplane application-apperceive default-action drop
#
 update schedule ips-sdb daily 00:56
 update schedule av-sdb daily 00:56
 update schedule sa-sdb daily 00:56
 update schedule cnc daily 00:56
#
ip vpn-instance default
 ipv4-family
#
 time-range worktime
  period-range 08:00:00 to 18:00:00 working-day
#
aaa
 authentication-scheme default
 authentication-scheme admin_local
 authentication-scheme admin_radius_local
 authentication-scheme admin_hwtacacs_local
 authentication-scheme admin_ad_local
 authentication-scheme admin_ldap_local
 authentication-scheme admin_radius
 authentication-scheme admin_hwtacacs
 authentication-scheme admin_ad
 authentication-scheme admin_ldap
 authorization-scheme default
 accounting-scheme default
 domain default
  service-type l2tp ike
  reference user current-domain
 manager-user password-modify enable
 manager-user audit-admin
  password cipher @%@%LDB}RIlTu"T2#/REASl-zF<-qK''K:UdG~uz[MKlLnDAF<0z@%@%
  service-type web terminal
  level 15

 manager-user api-admin
  password cipher @%@%zA'S.A$lx$0OdNE$t{m1|Thxu/WxW~~d!@ENG$.:y[BWTh{|@%@%
  service-type api
  level 15

 manager-user admin
  password cipher @%@%;%Kj#Ns0SJGX)n.H,x}Ixvqq[Iv#"buyo9o>ZWWbY"x<vqtx@%@%
  service-type web terminal
  level 15

 role system-admin
  dashboard read-write
  monitor read-write
  policy read-write
  object read-write
  network read-write
  system read-write
 role device-admin
  dashboard read-only
  monitor read-only log log-traffic log-threat log-policy-matching report traffi
c-map threat-map session statistic statistic-acl
  monitor none diagnose
  policy read-write
  object read-write
  network read-write
  system read-write high-reliability
  system none configuration vsys license update-center mail-send feedback
 role device-admin(monitor)
  dashboard read-only
  monitor read-only log log-traffic log-threat log-policy-matching report traffi
c-map threat-map session statistic statistic-acl
  monitor none diagnose
  policy read-only
  object read-only
  network read-only
  system read-only high-reliability
  system none configuration vsys license update-center mail-send feedback
 role audit-admin
  dashboard read-only
  monitor read-write log-audit
  monitor read-only log log-traffic log-threat log-syslog log-policy-matching re
port traffic-map threat-map
  monitor none session statistic statistic-acl diagnose
  policy none
  object none
  network none
  system none
 bind manager-user audit-admin role audit-admin
#
interface GigabitEthernet0/0/0
 undo shutdown
 ip binding vpn-instance default
 ip address 192.168.0.1 255.255.255.0
 service-manage http permit
 service-manage https permit
 service-manage ping permit
 service-manage ssh permit
 service-manage snmp permit
 service-manage telnet permit
 service-manage netconf permit
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 192.168.1.10 255.255.255.0
 vrrp vrid 1 virtual-ip 192.168.1.254 active
 service-manage ping permit
#
interface GigabitEthernet1/0/1
 undo shutdown
 ip address 200.1.1.10 255.255.255.0
 vrrp vrid 2 virtual-ip 200.1.1.254 active
 service-manage ping permit
#
interface GigabitEthernet1/0/2
 undo shutdown
 ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/3
 undo shutdown
#
interface GigabitEthernet1/0/4
 undo shutdown
#
interface GigabitEthernet1/0/5
 undo shutdown
#
interface GigabitEthernet1/0/6
 undo shutdown
#
interface Virtual-if0
#
interface NULL0
#
firewall zone local
 set priority 100
#
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 GigabitEthernet1/0/2
#
l2tp-group default-lns
#
undo ssh server compatible-ssh1x enable
#
user-interface con 0
 authentication-mode password
 set authentication password cipher $1a$e=B\I"c4~L$wl'N*oc[WBVYh1Y=dFGG>D*>";TEc
2i`-mN)k<@J$
user-interface vty 0 4
 authentication-mode aaa
 protocol inbound ssh
user-interface vty 16 20
#
sa
#
location
#
 multi-interface
  mode proportion-of-weight
#
security-policy
 rule name 1
  source-zone trust
  destination-zone untrust
  action permit
#
traffic-policy
#
policy-based-route
#
nat-policy
#
pcp-policy
#
dns-transparent-policy
#
return

FW2:

<USG6000V1>dis cu
!Software Version V500R001C10
#
sysname USG6000V1
#
 undo l2tp sendaccm enable
 l2tp domain suffix-separator @
#
undo info-center enable
#
undo telnet server enable
undo telnet ipv6 server enable
#
 hrp standby-device
 hrp interface GigabitEthernet1/0/2 remote 12.1.1.1
#
 firewall packet-filter basic-protocol enable
#
 firewall detect ftp
#
 log type traffic enable
 log type syslog enable
 log type policy enable
#
 undo dataflow enable
#
 isp name "china mobile"
 isp name "china mobile" set filename china-mobile.csv
 isp name "china unicom"
 isp name "china unicom" set filename china-unicom.csv
 isp name "china telecom"
 isp name "china telecom" set filename china-telecom.csv
 isp name "china educationnet"
 isp name "china educationnet" set filename china-educationnet.csv
#
 snmp-agent session history-max-number enable
 snmp-agent session trap threshold 4000
 snmp-agent session-rate trap threshold 24000
#
 web-manager security version tlsv1 tlsv1.1
 web-manager security enable
#
firewall dataplane to manageplane application-apperceive default-action drop
#
 update schedule ips-sdb daily 07:23
 update schedule av-sdb daily 07:23
 update schedule sa-sdb daily 07:23
 update schedule cnc daily 07:23
#
ip vpn-instance default
 ipv4-family
#
 time-range worktime
  period-range 08:00:00 to 18:00:00 working-day
#
aaa
 authentication-scheme default
 authentication-scheme admin_local
 authentication-scheme admin_radius_local
 authentication-scheme admin_hwtacacs_local
 authentication-scheme admin_ad_local
 authentication-scheme admin_ldap_local
 authentication-scheme admin_radius
 authentication-scheme admin_hwtacacs
 authentication-scheme admin_ad
 authentication-scheme admin_ldap
 authorization-scheme default
 accounting-scheme default
 domain default
  service-type l2tp ike
  reference user current-domain
 manager-user password-modify enable
 manager-user audit-admin
  password cipher @%@%nf=@Z(<T%'s5JIOG()'D~'1/Z%{-8i_pC9y[M/;R*J\)'12~@%@%
  service-type web terminal
  level 15

 manager-user api-admin
  password cipher @%@%Iw\]&!7-^NXzA;)]O1U'@>N1s|40Psb~{S0k#N#!sdi->N4@@%@%
  service-type api
  level 15

 manager-user admin
  password cipher @%@%>Q&h02DNTI:2x}I14lhG=pHOiGcw%]4Ra9R~vdS-=.lBpHR=@%@%
  service-type web terminal
  level 15

 role system-admin
  dashboard read-write
  monitor read-write
  policy read-write
  object read-write
  network read-write
  system read-write
 role device-admin
  dashboard read-only
  monitor read-only log log-traffic log-threat log-policy-matching report traffi
c-map threat-map session statistic statistic-acl
  monitor none diagnose
  policy read-write
  object read-write
  network read-write
  system read-write high-reliability
  system none configuration vsys license update-center mail-send feedback
 role device-admin(monitor)
  dashboard read-only
  monitor read-only log log-traffic log-threat log-policy-matching report traffi
c-map threat-map session statistic statistic-acl
  monitor none diagnose
  policy read-only
  object read-only
  network read-only
  system read-only high-reliability
  system none configuration vsys license update-center mail-send feedback
 role audit-admin
  dashboard read-only
  monitor read-write log-audit
  monitor read-only log log-traffic log-threat log-syslog log-policy-matching re
port traffic-map threat-map
  monitor none session statistic statistic-acl diagnose
  policy none
  object none
  network none
  system none
 bind manager-user audit-admin role audit-admin
#
interface GigabitEthernet0/0/0
 undo shutdown
 ip binding vpn-instance default
 ip address 192.168.0.1 255.255.255.0
 service-manage http permit
 service-manage https permit
 service-manage ping permit
 service-manage ssh permit
 service-manage snmp permit
 service-manage telnet permit
 service-manage netconf permit
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 192.168.1.20 255.255.255.0
 vrrp vrid 1 virtual-ip 192.168.1.254 standby
 service-manage ping permit
#
interface GigabitEthernet1/0/1
 undo shutdown
 ip address 200.1.1.20 255.255.255.0
 vrrp vrid 2 virtual-ip 200.1.1.254 standby
 service-manage ping permit
#
interface GigabitEthernet1/0/2
 undo shutdown
 ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/3
 undo shutdown
#
interface GigabitEthernet1/0/4
 undo shutdown
#
interface GigabitEthernet1/0/5
 undo shutdown
#
interface GigabitEthernet1/0/6
 undo shutdown
#
interface Virtual-if0
#
interface NULL0
#
firewall zone local
 set priority 100
#
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 GigabitEthernet1/0/2
#
l2tp-group default-lns
#
undo ssh server compatible-ssh1x enable
#
user-interface con 0
 authentication-mode password
 set authentication password cipher $1a$O.hZ;{*5nE$7lGb*tO9hYaF9!~"/g(*R_mg6V\3M
L0v^F7zG865$
user-interface vty 0 4
 authentication-mode aaa
 protocol inbound ssh
user-interface vty 16 20
#
sa
#
location
#
 multi-interface
  mode proportion-of-weight
#
security-policy
 rule name 1
  source-zone trust
  destination-zone untrust
  action permit
#
traffic-policy
#
policy-based-route
#
nat-policy
#
pcp-policy
#
dns-transparent-policy
#
return

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值