https://support.huawei.com/enterprise/zh/doc/EDOC1000154804/adf7af47
组网需求
如图1所示,位于分支的H3C防火墙没有公网IP地址,使用华为防火墙_B作为NAT设备进行地址转换后获取一个公网IP地址,然后与总部的华为防火墙_A建立IPSec隧道。华为防火墙_B只提供了源地址转换功能,只能实现分支到总部这一方向的访问,因此只能由分支主动与总部建立IPSec隧道。
数据规划
项目 | 华为防火墙_A | H3C防火墙 | |
---|---|---|---|
IKE SA | 加密算法 | 3des | 3des |
认证算法 | sha1 | - | |
预共享密钥 | Key@123 | Key@123 | |
身份类型 | 对端NAT后地址 | 对端公网地址 | |
对端认证地址 | 对端NAT前地址 | - | |
IKE版本 | V2 | V2 | |
DH | Group2 | Group2 | |
是否开启nat traversal | 是 | - | |
完整性算法 | sha1 | sha1 | |
IPSec SA | 封装模式 | 隧道模式 | 隧道模式 |
安全协议 | ESP | ESP | |
加密算法 | 3des | 3des | |
认证算法 | sha1 | sha1 |
配置思路
配置华为防火墙_A:
配置接口IP地址,并将接口加入安全区域;
配置域间安全策略,允许IKE协商报文、IPSec封装前和解封装后的原始报文能通过华为防火墙_A;
配置华为防火墙_A到Internet的缺省路由;
配置IPSec策略,包括定义需要保护的数据流、配置IPSec安全提议、创建IKE安全提议、配置IKE对等体、配置IPSec NAT穿越;
在接口上应用IPSec策略。
配置华为防火墙_B:
配置接口IP地址,并将接口加入安全区域;
配置untrust和trust之间的安全策略,允许NAT转换后的报文通过华为防火墙_B;
配置源NAT;
配置到总部、分支的路由。
配置H3C防火墙:
配置接口的IP地址,并将接口加入安全区域;
配置域间安全策略,允许IKE协商报文、IPSec封装前和解封装后的原始报文能通过华为防火墙;
配置H3C防火墙连接到Internet的缺省路由;
配置IPSec策略,包括定义需要保护的数据流、配置IKEv2安全提议、配置IKEv2策略、配置IKEv2 keychain、配置IKEv2 profile、配置IPSec安全提议;
在接口上应用IPSec策略。
配置注意事项
H3C防火墙可以检测网络中是否存在NAT设备,如果存在,则自动开启NAT穿越功能,无需执行命令来开启。
采用IKEv2时,H3C防火墙中没有提供配置IKE SA认证算法的命令,默认采用sha1,华为防火墙_A中必须将IKE SA认证算法配置为sha1,否则IPSec协商不成功。
本案例使用IKEv2来进行配置说明,相比采用IKEv1,H3C防火墙的配置差异比较大,华为防火墙_A的配置差异很小。
华为防火墙缺省情况下,IPSec不支持MD5、SHA1、DES、3DES、DH-GROUP1、DH-GROUP2、DH-GROUP5等弱安全算法,如需使用,需要安装弱安全算法组件包,具体步骤如下:
请登录华为技术支持网站,在软件下载专区中搜索对应产品和版本,下载product_version_WEAKEA.mod。
上传模块文件到存储介质中(必须存放在$_install_mod目录下)。
使用命令install-module product_version_WEAKEA.mod配置在线加载模块文件。
操作步骤
配置华为防火墙_A
remote-address配置为NAT后的地址,remote-address authentication-address配置为NAT前的地址。
H3C防火墙中没有提供开启NAT穿越功能的命令,H3C防火墙检测到网络中存在NAT设备时,将自动开启NAT穿越功能,但华为防火墙_A中必须执行nat traversal开启NAT穿越功能。
华为防火墙发起协商请求时,将根据路由找到出接口,根据安全策略2判断流量是否可以透传,根据ACL判断是否是走IPSec的流量,根据安全策略3判断是否能够发起协商,如果判断结果都为“是”,华为防火墙才能正式发起协商。
华为防火墙接收协商请求时,将根据ACL判断对方的流量是否是受保护流量,根据安全策略4判断是否接受协商,如果判断结果都为“是”,则开始与对方协商,否则将丢弃协商报文。
配置IKE安全提议,指定加密算法、认证算法、DH。此举例中采用IKEv2,需要配置完整性算法。
[HUAWEI_A] ike proposal 1 [HUAWEI_A-ike-proposal-1] authentication-algorithm sha1 [HUAWEI_A-ike-proposal-1] encryption-algorithm 3des [HUAWEI_A-ike-proposal-1] integrity-algorithm hmac-sha1-96 [HUAWEI_A-ike-proposal-1] dh group2 [HUAWEI_A-ike-proposal-1] quit
[HUAWEI_A] ike peer h3c [HUAWEI_A-ike-peer-h3c] undo version 1 [HUAWEI_A-ike-peer-h3c] ike-proposal 1 [HUAWEI_A-ike-peer-h3c] pre-shared-key Key@123 [HUAWEI_A-ike-peer-h3c] remote-address 2.2.2.2 [HUAWEI_A-ike-peer-h3c] remote-address authentication-address 10.10.10.2 [HUAWEI_A-ike-peer-h3c] nat traversal [HUAWEI_A-ike-peer-h3c] quit[HUAWEI_A] security-policy [HUAWEI_A-policy-security] rule name 1 [HUAWEI_A-policy-security-rule-1] source-zone untrust [HUAWEI_A-policy-security-rule-1] destination-zone trust [HUAWEI_A-policy-security-rule-1] source-address 192.168.0.0 24 [HUAWEI_A-policy-security-rule-1] destination-address 192.168.10.0 24 [HUAWEI_A-policy-security-rule-1] action permit [HUAWEI_A-policy-security-rule-1] quit [HUAWEI_A-policy-security] rule name 2 [HUAWEI_A-policy-security-rule-2] source-zone trust [HUAWEI_A-policy-security-rule-2] destination-zone untrust [HUAWEI_A-policy-security-rule-2] source-address 192.168.10.0 24 [HUAWEI_A-policy-security-rule-2] destination-address 192.168.0.0 24 [HUAWEI_A-policy-security-rule-2] action permit [HUAWEI_A-policy-security-rule-2] quit配置local与untrust之间的安全策略。
配置策略3,保证华为防火墙_A能够发起IPSec隧道建立请求;配置策略4,保证华为防火墙_A能够接收IPSec隧道建立请求。
[HUAWEI_A-policy-security] rule name 3 [HUAWEI_A-policy-security-rule-3] source-zone local [HUAWEI_A-policy-security-rule-3] destination-zone untrust [HUAWEI_A-policy-security-rule-3] source-address 1.1.1.1 24 [HUAWEI_A-policy-security-rule-3] destination-address 2.2.2.2 24 [HUAWEI_A-policy-security-rule-3] action permit [HUAWEI_A-policy-security-rule-3] quit [HUAWEI_A-policy-security] rule name 4 [HUAWEI_A-policy-security-rule-4] source-zone untrust [HUAWEI_A-policy-security-rule-4] destination-zone local [HUAWEI_A-policy-security-rule-4] source-address 2.2.2.2 24 [HUAWEI_A-policy-security-rule-4] destination-address 1.1.1.1 24 [HUAWEI_A-policy-security-rule-4] action permit [HUAWEI_A-policy-security-rule-4] quit [HUAWEI_A-policy-security] quit
[HUAWEI_A] interface GigabitEthernet 1/0/3 [HUAWEI_A-GigabitEthernet1/0/3] ip address 1.1.1.1 255.255.255.0 [HUAWEI_A-GigabitEthernet1/0/3] quit [HUAWEI_A] firewall zone untrust [HUAWEI_A-zone-untrust] add interface GigabitEthernet 1/0/3 [HUAWEI_A-zone-untrust] quit配置口GE1/0/5接口,并将接口加入trust安全区域。
[HUAWEI_A] interface GigabitEthernet 1/0/5 [HUAWEI_A-GigabitEthernet1/0/5] ip address 192.168.10.1 255.255.255.0 [HUAWEI_A-GigabitEthernet1/0/5] quit [HUAWEI_A] firewall zone trust [HUAWEI_A-zone-trust] add interface GigabitEthernet 1/0/5 [HUAWEI_A-zone-trust] quit
安装WEAKEA特性包。
<HUAWEI> install feature-software WEAKEA
配置接口,并将接口加入安全区域。
配置安全策略。
配置路由。
配置连接到Internet的缺省路由,假设下一跳为1.1.1.2。
[HUAWEI_A] ip route-static 0.0.0.0 0.0.0.0 1.1.1.2
配置ACL,定义被保护的流量。
源地址为192.168.10.0/24,目的地址为192.168.0.0/24的报文,需要经过IPSec隧道传输。
[HUAWEI_A] acl 3000 [HUAWEI_A-acl-adv-3000] rule permit ip source 192.168.10.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 [HUAWEI_A-acl-adv-3000] quit
[HUAWEI_A] ipsec proposal tran1 [HUAWEI_A-ipsec-proposal-tran1] transform esp [HUAWEI_A-ipsec-proposal-tran1] encapsulation-mode tunnel [HUAWEI_A-ipsec-proposal-tran1] esp encryption-algorithm 3des [HUAWEI_A-ipsec-proposal-tran1] esp authentication-algorithm sha1 [HUAWEI_A-ipsec-proposal-tran1] quit配置IPSec策略,绑定IKE对等体、IPSec安全提议、ACL。
[HUAWEI_A] ipsec policy map1 1 isakmp [HUAWEI_A-ipsec-policy-isakmp-map1-1] ike-peer h3c [HUAWEI_A-ipsec-policy-isakmp-map1-1] proposal tran1 [HUAWEI_A-ipsec-policy-isakmp-map1-1] security acl 3000 [HUAWEI_A-ipsec-policy-isakmp-map1-1] quit
在接口上应用IPSec策略。
[HUAWEI_A] interface GigabitEthernet 1/0/3 [HUAWEI_A-GigabitEthernet1/0/3] ipsec policy map1 [HUAWEI_A-GigabitEthernet1/0/3] quit
配置H3C防火墙。
IKEv2情况下,配置keychain需要先配置一个peer,然后在该peer中配置预共享密钥,并指定使用该预共享密钥的对端主机地址、对端身份信息。
对端主机地址、对端身份信息必须配置,否则IPSec隧道协商不成功。在协商过程中,发起方根据对端身份信息查找peer。
若存在N个对端,则需要配置N个peer,本端与每个对端都使用不同的预共享密钥协商IPSec隧道。
IKEv2情况下,配置IKEv2策略,引用IKEv2安全提议,并将IKEv2策略应用到接口Ten-GigabitEthernet 2/0/10上,后续配置的IPSec策略也将应用到该接口上。
IKEv2策略不会被profile引用,也就是IKEv2安全提议不会被profile引用,而在IKEv1情况下,IKE安全提议要被profile引用。
配置总部网络、分支网络两个对象组。
[H3C] object-group ip address trust1 [H3C-obj-grp-ip-trust1] network subnet 192.168.0.0 24 [H3C-obj-grp-ip-trust1] quit [H3C] object-group ip address untrust1 [H3C-obj-grp-ip-untrust1] network subnet 192.168.10.0 24 [H3C-obj-grp-ip-untrust1] quit
配置对象策略。
[H3C] object-policy ip trust-untrust [H3C-object-policy-ip-trust-untrust] rule pass source-ip trust1 destination-ip untrust1 [H3C-object-policy-ip-trust-untrust] quit [H3C] object-policy ip untrust-trust [H3C-object-policy-ip-untrust-trust] rule pass source-ip untrust1 destination-ip trust1 [H3C-object-policy-ip-untrust-trust] quit
配置Untrust和Trust之间的安全策略,保证总部网络和分支网络能够互通。
[H3C] zone-pair security source trust destination untrust [H3C-zone-pair-security-Trust-Untrust] object-policy apply ip trust-untrust [H3C-zone-pair-security-Trust-Untrust] quit [H3C] zone-pair security source untrust destination trust [H3C-zone-pair-security-Untrust-Trust] object-policy apply ip untrust-trust [H3C-zone-pair-security-Untrust-Trust] quit
配置ACL,用于Local与Untrust间的安全策略。
[H3C] acl advanced 3999 [H3C-acl-ipv4-adv-3999] rule 0 permit ip [H3C-acl-ipv4-adv-3999] quit
配置Local与Untrust之间的安全策略。
[H3C] zone-pair security source untrust destination local [H3C-zone-pair-security-Untrust-Local] packet-filter 3999 [H3C-zone-pair-security-Untrust-Local] quit [H3C] zone-pair security source local destination untrust [H3C-zone-pair-security-Local-Untrust] packet-filter 3999 [H3C-zone-pair-security-Local-Untrust] quit
[H3C] interface Ten-GigabitEthernet2/0/10 [H3C-Ten-GigabitEthernet2/0/10] port link-mode route [H3C-Ten-GigabitEthernet2/0/10] ip address 10.10.10.2 255.255.255.0 [H3C-Ten-GigabitEthernet2/0/10] quit [H3C] security-zone name Untrust [H3C-security-zone-Untrust] import interface Ten-GigabitEthernet 2/0/10 [H3C-security-zone-Untrust] quit配置接口GE2/0/9接口,并将接口加入Trust安全区域。
[H3C] interface Ten-GigabitEthernet2/0/9 [H3C-Ten-GigabitEthernet2/0/9] ip address 192.168.0.1 24 [H3C-Ten-GigabitEthernet2/0/9] quit [H3C] security-zone name Trust [H3C-security-zone-Trust] import interface Ten-GigabitEthernet 2/0/9 [H3C-security-zone-Trust] quit
配置接口,并将接口加入安全区域。
配置安全策略。
配置路由。
配置连接到Internet的缺省路由,下一跳为10.10.10.3。
[H3C] ip route-static 0.0.0.0 0.0.0.0 10.10.10.3
配置ACL,定义被保护的流量。
源地址为192.168.0.0/24,目的地址为192.168.10.0/24的报文,需要经过IPSec隧道传输。定义的流量要与华为防火墙_A中定义的流量互为镜像,否则协商失败。
[H3C] acl advanced 3000 [H3C-acl-ipv4-adv-3000] rule permit ip source 192.168.0.0 0.0.0.255 destination 192.168.10.0 0.0.0.255 [H3C-acl-ipv4-adv-3000] quit
配置IKEv2安全提议。
配置IKE安全提议,指定加密算法、DH、完整性校验算法,取值要与华为防火墙_A的配置值严格一致。
[H3C] ikev2 proposal 1 [H3C-ikev2-proposal-1] encryption 3des [H3C-ikev2-proposal-1] integrity sha1 [H3C-ikev2-proposal-1] dh group2 [H3C-ikev2-proposal-1] quit
配置IKEv2策略。
[H3C] ikev2 policy policy1 [H3C-ikev2-policy-policy1] match local address Ten-GigabitEthernet 2/0/10 [H3C-ikev2-policy-policy1] proposal 1 [H3C-ikev2-policy-policy1] quit
配置IKEv2 keychain。
配置IKEv2 keychain,指定预共享密钥,并配置对端主机地址、对端身份信息,此处使用对端主机地址作为对端身份信息。
[H3C] ikev2 keychain keychain1 [H3C-ikev2-keychain-keychain1] peer firewall [H3C-ikev2-keychain-keychain1-peer-firewall] address 1.1.1.1 255.255.255.0 [H3C-ikev2-keychain-keychain1-peer-firewall] identity address 1.1.1.1 [H3C-ikev2-keychain-keychain1-peer-firewall] pre-shared-key plaintext Key@123 [H3C-ikev2-keychain-keychain1-peer-firewall] quit
配置profile。
配置IKEv2 profile,指定本端、对端的认证方式,引用的keychain1,本端身份,对端身份,profile的使用范围。
[H3C] ikev2 profile profile1 [H3C-ikev2-profile-profile1] authentication-method local pre-share [H3C-ikev2-profile-profile1] authentication-method remote pre-share [H3C-ikev2-profile-profile1] keychain keychain1 [H3C-ikev2-profile-profile1] identity local address 10.10.10.2 [H3C-ikev2-profile-profile1] match remote identity address 1.1.1.1 255.255.255.0 [H3C-ikev2-profile-profile1] match local address Ten-GigabitEthernet 2/0/10 [H3C-ikev2-profile-profile1] quit
配置IPSec安全提议。
指定封装模式、安全协议,加密算法、认证算法,取值要与华为防火墙_A的配置值严格一致。
[H3C] ipsec transform-set tran1 [H3C-ipsec-transform-set-tran1] encapsulation-mode tunnel [H3C-ipsec-transform-set-tran1] protocol esp [H3C-ipsec-transform-set-tran1] esp encryption-algorithm 3des [H3C-ipsec-transform-set-tran1] esp authentication-algorithm sha1 [H3C-ipsec-transform-set-tran1] quit
配置IPSec策略。
[H3C] ipsec policy map1 1 isakmp [H3C-ipsec-policy-isakmp-map1-1] remote-address 1.1.1.1 [H3C-ipsec-policy-isakmp-map1-1] security acl 3000 [H3C-ipsec-policy-isakmp-map1-1] transform-set tran1 [H3C-ipsec-policy-isakmp-map1-1] ikev2-profile profile1 [H3C-ipsec-policy-isakmp-map1-1] quit
在接口上应用IPSec策略。
[H3C] interface Ten-GigabitEthernet 2/0/10 [H3C-Ten-GigabitEthernet2/0/10] ipsec apply policy map1 [H3C-Ten-GigabitEthernet2/0/10] quit
配置华为防火墙_B(NAT设备)。
配置口GE1/0/6接口,并将接口加入untrust安全区域。
[HUAWEI_B] interface GigabitEthernet 1/0/6 [HUAWEI_B-GigabitEthernet1/0/6] ip address 2.2.2.2 255.255.255.0 [HUAWEI_B-GigabitEthernet1/0/6] quit [HUAWEI_B] firewall zone untrust [HUAWEI_B-zone-untrust] add interface GigabitEthernet 1/0/6 [HUAWEI_B-zone-untrust] quit
配置GE1/0/9接口,并将接口加入trust安全区域。
[HUAWEI_B] interface GigabitEthernet 1/0/9 [HUAWEI_B-GigabitEthernet1/0/9] ip address 10.10.10.3 24 [HUAWEI_B-GigabitEthernet1/0/9] quit [HUAWEI_B] firewall zone trust [HUAWEI_B-zone-trust] add interface GigabitEthernet 1/0/9 [HUAWEI_B-zone-trust] quit
配置接口,并将接口加入安全区域。
配置untrust和trust之间的安全策略。
[HUAWEI_B] security-policy [HUAWEI_B-policy-security] rule name 1 [HUAWEI_B-policy-security-rule-1] source-zone untrust [HUAWEI_B-policy-security-rule-1] destination-zone trust [HUAWEI_B-policy-security-rule-1] source-address 1.1.1.0 24 [HUAWEI_B-policy-security-rule-1] destination-address 10.10.10.0 24 [HUAWEI_B-policy-security-rule-1] action permit [HUAWEI_B-policy-security-rule-1] quit [HUAWEI_B-policy-security] rule name 2 [HUAWEI_B-policy-security-rule-2] source-zone trust [HUAWEI_B-policy-security-rule-2] destination-zone untrust [HUAWEI_B-policy-security-rule-2] source-address 10.10.10.0 24 [HUAWEI_B-policy-security-rule-2] destination-address 1.1.1.0 24 [HUAWEI_B-policy-security-rule-2] action permit [HUAWEI_B-policy-security-rule-2] quit
配置源NAT。
[HUAWEI_B] nat-policy [HUAWEI_B-policy-nat] rule name policy_nat1 [HUAWEI_B-policy-nat-rule-policy_nat1] source-zone trust [HUAWEI_B-policy-nat-rule-policy_nat1] destination-zone untrust [HUAWEI_B-policy-nat-rule-policy_nat1] source-address 10.10.10.0 24 [HUAWEI_B-policy-nat-rule-policy_nat1] action nat easy-ip [HUAWEI_B-policy-nat-rule-policy_nat1] quit [HUAWEI_B-policy-nat] quit
配置到总部、分支的路由。
[HUAWEI_B]ip route-static 192.168.10.0 255.255.255.0 2.2.2.1 [HUAWEI_B]ip route-static 192.168.0.0 255.255.255.0 10.10.10.2
结果验证
在分支PC2中Ping总部的PC1,验证分支是否能够主动与总部建立IPSec隧道。
在总部华为防火墙_A中,执行display ike sa命令,若显示如下信息,表明IKE SA建立成功。
[HUAWEI_A] display ike sa current ike sa number: 2 ----------------------------------------------------------------------------- conn-id peer flag phase vpn ----------------------------------------------------------------------------- 2 2.2.2.2:2048 RD|A v2:2 public 1 2.2.2.2:2048 RD|A v2:1 public flag meaning RD--READY ST--STAYALIVE RL--REPLACED FD--FADING TO--TIMEOUT TD--DELETING NEG--NEGOTIATING D--DPD M--ACTIVE S--STANDBY A--ALONE
在总部的华为防火墙_A中,执行display ipsec sa命令,若显示如下信息,表明IPSec SA建立成功。
[HUAWEI_A] display ipsec sa =============================== Interface: GigabitEthernet1/0/3 path MTU: 1500 =============================== ----------------------------- IPSec policy name: "map1" sequence number: 1 mode: isakmp vpn: public ----------------------------- connection id: 2 rule number: 5 encapsulation mode: tunnel holding time: 0d 0h 15m 0s tunnel local : 1.1.1.1 tunnel remote: 2.2.2.2 flow source: 192.168.10.0-192.168.10.255 0-65535 0 flow destination: 192.168.0.0-192.168.0.255 0-65535 0 [inbound ESP SAs] spi: 169992973 (0xa21e30d) vpn: public said: 0 cpuid: 0x0000 proposal: ESP-ENCRYPT-3DES ESP-AUTH-SHA1 sa remaining key duration (kilobytes/sec): 1843200/2700 max received sequence-number: 7 udp encapsulation used for nat traversal: Y [outbound ESP SAs] spi: 3484754186 (0xcfb5210a) vpn: public said: 1 cpuid: 0x0000 proposal: ESP-ENCRYPT-3DES ESP-AUTH-SHA1 sa remaining key duration (kilobytes/sec): 1843200/2700 max sent sequence-number: 6 udp encapsulation used for nat traversal: Y
登录到分支H3C防火墙中执行display ikev2 sa命令查看IKE建立情况,若显示如下信息,表明IKE SA建立成功。
[H3C] display ikev2 sa Tunnel ID Local Remote Status --------------------------------------------------------------------------- 1 10.10.10.2/4500 1.1.1.1/4500 EST Status: IN-NEGO: Negotiating, EST: Established, DEL:Deleting
登录到分支H3C防火墙中执行display ipsec sa命令查看IPSec建立情况,若显示如下信息,表明IPSec SA建立成功。
[H3C] display ipsec sa ------------------------------- Interface: Ten-GigabitEthernet2/0/10 ------------------------------- ----------------------------- IPSec policy: map1 Sequence number: 1 Mode: ISAKMP Flow table status: Active ----------------------------- Tunnel id: 0 Encapsulation mode: tunnel Perfect Forward Secrecy: Inside VPN: Extended Sequence Numbers enable: N Traffic Flow Confidentiality enable: N Path MTU: 1436 Tunnel: local address: 10.10.10.2 remote address: 1.1.1.1 Flow: sour addr: 192.168.0.0/255.255.255.0 port: 0 protocol: ip dest addr: 192.168.10.0/255.255.255.0 port: 0 protocol: ip [Inbound ESP SAs] SPI: 3484754186 (0xcfb5210a) Connection ID: 356482285571 Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-SHA1 SA duration (kilobytes/sec): 1843200/3600 SA remaining duration (kilobytes/sec): 1843199/2490 Max received sequence-number: 5 Anti-replay check enable: Y Anti-replay window size: 64 UDP encapsulation used for NAT traversal: Y Status: Active [Outbound ESP SAs] SPI: 169992973 (0x0a21e30d) Connection ID: 356482285570 Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-SHA1 SA duration (kilobytes/sec): 1843200/3600 SA remaining duration (kilobytes/sec): 1843199/2490 Max sent sequence-number: 6 UDP encapsulation used for NAT traversal: Y Status: Active
配置文件
华为防火墙_A配置文件
# sysname HUAWEI_A # interface GigabitEthernet 1/0/3 ip address 1.1.1.1 255.255.255.0 ipsec policy map1 # interface GigabitEthernet 1/0/5 ip address 192.168.10.1 255.255.255.0 # firewall zone untrust add interface GigabitEthernet 1/0/3 # firewall zone trust add interface GigabitEthernet 1/0/5 # security-policy rule name 1 source-zone untrust destination-zone trust source-address 192.168.0.0 24 destination-address 192.168.10.0 24 action permit rule name 2 source-zone trust destination-zone untrust source-address 192.168.10.0 24 destination-address 192.168.0.0 24 action permit rule name 3 source-zone local destination-zone untrust source-address 1.1.1.1 24 destination-address 2.2.2.2 24 action permit rule name 4 source-zone untrust destination-zone local source-address 2.2.2.2 24 destination-address 1.1.1.1 24 action permit # ip route-static 0.0.0.0 0.0.0.0 1.1.1.2 # acl 3000 rule permit ip source 192.168.10.0 0.0.0.255 destination 192.168.0.0 0.0.0.255 # ike proposal 1 authentication-algorithm sha1 encryption-algorithm 3des integrity-algorithm hmac-sha1-96 dh group2 # ike peer h3c undo version 1 ike-proposal 1 pre-shared-key Key@123 remote-address 2.2.2.2 remote-address authentication-address 10.10.10.2 nat traversal # ipsec proposal tran1 transform esp encapsulation-mode tunnel esp encryption-algorithm 3des esp authentication-algorithm sha1 # ipsec policy map1 1 isakmp ike-peer h3c proposal tran1 security acl 3000 # return
华为防火墙_B配置文件
# sysname HUAWEI_B # interface GigabitEthernet 1/0/6 ip address 2.2.2.2 255.255.255.0 # interface GigabitEthernet 1/0/9 ip address 10.10.10.3 24 # firewall zone untrust add interface GigabitEthernet 1/0/6 # firewall zone trust add interface GigabitEthernet 1/0/9 # security-policy rule name 1 source-zone untrust destination-zone trust source-address 1.1.1.0 24 destination-address 10.10.10.0 24 action permit rule name 2 source-zone trust destination-zone untrust source-address 10.10.10.0 24 destination-address 1.1.1.0 24 action permit # nat-policy rule name policy_nat1 source-zone trust destination-zone untrust source-address 10.10.10.0 24 action nat easy-ip # ip route-static 192.168.10.0 255.255.255.0 2.2.2.1 ip route-static 192.168.0.0 255.255.255.0 10.10.10.2 # return
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/5792.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~
作者:hqy | 分类:Network | 浏览:311 | 评论:0发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
您的IP地址是: