• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

华三f1000防火墙的ipsec

11小时前提问
  • 0关注
  • 0收藏,82浏览
粉丝:0人 关注:0人

问题描述:

ike好着,IPSEC隧道不通。。谢谢啦我们,

组网及组网描述:

dis ike sa Connection-ID Remote Flag DOI ------------------------------------------------------------------ 954 124.115.171.130 Unknown IPsec Flags: RD--READY RL--REPLACED FD-FADING RK-REKEY dis ip se dis ips dis ipsec sa sys System View: return to User View with Ctrl+Z. [H3C]dis cu [H3C]dis current-configuration # version 7.1.064, Release 9514P2302 # sysname H3C # clock timezone China add 08:00:00 # context Admin id 1 # telnet server enable # irf mac-address persistent timer irf auto-update enable undo irf link-delay irf member 1 priority 1 # dns proxy enable dns server 211.137.130.19 dns server 119.29.29.29 dns server 223.5.5.5 dns server 114.114.114.114 # password-recovery enable # vlan 1 # object-group ip address ±¾µֱ59150.20.0 security-zone Untrust 0 network subnet 159.150.20.0 255.255.255.0 # object-group ip address x¿௵9 security-zone Trust 0 network subnet 159.150.20.0 255.255.255.0 # object-group ip address ʡͼ192.168.11.0 security-zone Untrust 0 network subnet 192.168.11.0 255.255.255.0 # nqa entry admin test type icmp-echo destination ip 192.168.11.250 frequency 5000 history-record enable history-record number 10 probe count 10 probe timeout 500 source ip 159.150.20.1 # nqa schedule admin test start-time now lifetime forever # interface NULL0 # interface GigabitEthernet1/0/0 port link-mode route combo enable copper ip address 192.168.0.1 255.255.255.0 # interface GigabitEthernet1/0/1 port link-mode route combo enable fiber # interface GigabitEthernet1/0/2 port link-mode route ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/3 port link-mode route ip address 111.20.110.250 255.255.255.252 nat outbound 3101 nat outbound 3000 nat server protocol tcp global 111.20.110.250 8000 inside 159.150.20.8 8000 nat server protocol tcp global 111.20.110.250 8888 inside 159.150.20.8 8080 nat server protocol tcp global 111.20.110.250 10020 inside 159.150.20.9 10020 ipsec apply policy GE1/0/3 # interface GigabitEthernet1/0/4 port link-mode route ip address 159.150.20.1 255.255.255.0 nat hairpin enable # interface GigabitEthernet1/0/5 port link-mode route # interface GigabitEthernet1/0/6 port link-mode route # interface GigabitEthernet1/0/7 port link-mode route # interface GigabitEthernet1/0/8 port link-mode route # interface GigabitEthernet1/0/9 port link-mode route # security-zone name Local # security-zone name Trust import interface GigabitEthernet1/0/4 # security-zone name DMZ # security-zone name Untrust import interface GigabitEthernet1/0/3 # security-zone name Management import interface GigabitEthernet1/0/0 import interface GigabitEthernet1/0/2 # scheduler logfile size 16 # line class aux user-role network-operator # line class console authentication-mode scheme user-role network-admin # line class vty user-role network-operator # line aux 0 authentication-mode scheme user-role network-admin user-role network-operator # line con 0 authentication-mode scheme user-role network-admin user-role network-operator # line vty 0 4 authentication-mode scheme user-role network-admin user-role network-operator # line vty 5 63 authentication-mode scheme user-role network-admin # ip route-static 0.0.0.0 0 GigabitEthernet1/0/3 111.20.110.249 ip route-static 192.168.11.0 24 111.20.110.249 # ssh server enable sftp server enable ssh server port 65522 # ntp-service enable ntp-service unicast-server ***.*** ntp-service unicast-server ***.*** # acl advanced 3000 rule 1 deny ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255 rule 5 deny ip source 159.150.20.0 0.0.0.255 destination 192.168.20.0 0.0.0.255 rule 10 permit ip # acl advanced 3100 rule 1 permit ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255 # acl advanced 3101 rule 0 permit ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255 # acl advanced name IPsec_GE1/0/3_IPv4_1 rule 5 permit ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255 # acl advanced name IPsec_GE1/0/3_IPv4_2 rule 1 permit ip source 159.150.20.0 0.0.0.255 destination 192.168.20.0 0.0.0.255 # domain system # aaa session-limit ftp 16 aaa session-limit telnet 16 aaa session-limit ssh 16 domain default enable system # role name level-0 description Predefined level-0 role # role name level-1 description Predefined level-1 role # role name level-2 description Predefined level-2 role # role name level-3 description Predefined level-3 role # role name level-4 description Predefined level-4 role # role name level-5 description Predefined level-5 role # role name level-6 description Predefined level-6 role # role name level-7 description Predefined level-7 role # role name level-8 description Predefined level-8 role # role name level-9 description Predefined level-9 role # role name level-10 description Predefined level-10 role # role name level-11 description Predefined level-11 role # role name level-12 description Predefined level-12 role # role name level-13 description Predefined level-13 role # role name level-14 description Predefined level-14 role # user-group system # local-user admin class manage password hash $h$6$7DOCZmGOhXvDCJ2K$crTMYJlvSMqI7R1gnxFNl0mPgvOn9RlBa9aLsBjmLB9bEoiYylAhy7SdcvlN0Nsg4Q+FRyybEdhYwVBngiZ7mQ== service-type ssh telnet terminal http https authorization-attribute user-role level-3 authorization-attribute user-role network-admin authorization-attribute user-role network-operator # local-user relyon class manage password hash $h$6$/hZphBR5l2e0GjRb$EWxNjIAXJHwwrJkJ4XDYrFkbSexzcezYUhvph8t2RVrFrLciCF9qcXPTJTNXLP6LEqGsiT9SkqS6plt7b5Uv3A== service-type ssh telnet terminal http authorization-attribute user-role network-admin authorization-attribute user-role network-operator # ipsec transform-set ceshi esp encryption-algorithm aes-cbc-128 esp authentication-algorithm sha1 # ipsec transform-set GE1/0/3_IPv4_2 esp encryption-algorithm 3des-cbc esp authentication-algorithm md5 # ipsec policy GE1/0/3 1 isakmp transform-set ceshi security acl name IPsec_GE1/0/3_IPv4_1 local-address 111.20.110.250 remote-address 124.115.171.130 qos pre-classify ike-profile GE1/0/3_IPv4_1 sa duration time-based 28800 sa idle-time 28800 # ipsec policy GE1/0/3 2 isakmp transform-set GE1/0/3_IPv4_2 security acl name IPsec_GE1/0/3_IPv4_2 local-address 111.20.110.250 remote-address 117.32.154.10 ike-profile GE1/0/3_IPv4_2 sa duration time-based 28800 # ike invalid-spi-recovery enable ike dpd interval 10 on-demand ike identity fqdn 203@2020 # ike profile g1/0/3_ipv4_1 # ike profile GE1/0/3_IPv4_1 keychain 1 dpd interval 5 periodic exchange-mode aggressive local-identity address 111.20.110.250 match remote identity address 124.115.171.130 255.255.255.255 match remote identity fqdn LSJ match local address GigabitEthernet1/0/3 proposal 1 # ike profile GE1/0/3_IPv4_2 keychain GE1/0/3_IPv4_2 exchange-mode aggressive local-identity fqdn tc match remote identity fqdn scbl match local address GigabitEthernet1/0/3 proposal 1 # ike proposal 1 encryption-algorithm aes-cbc-128 dh group2 # ike proposal 2 encryption-algorithm aes-cbc-128 dh group2 # ike keychain 1 match local address GigabitEthernet1/0/3 pre-shared-key hostname LSJ key cipher $c$3$yWSp84Avi/1AmCqqTBPDEFXsQOHNr0i0pw== # ike keychain GE1/0/3_IPv4_2 match local address GigabitEthernet1/0/3 pre-shared-key hostname scbl key cipher $c$3$YyVrhDq1mYkE3btJluUn9kabLAXFvBrMHw== # ip http enable ip https port 65443 ip https enable webui log enable # security-policy ip rule 4 name 55 action pass logging enable counting enable source-zone Untrust destination-zone Local rule 5 name 66 action pass logging enable counting enable source-zone Local destination-zone Untrust rule 8 name x¿⵽ʡͼ action pass logging enable counting enable source-zone Trust destination-zone Untrust source-ip x¿௵9 destination-ip ʡͼ192.168.11.0 rule 9 name ʡͼµ½x¿ action pass logging enable counting enable source-zone Untrust destination-zone Trust source-ip ʡͼ192.168.11.0 destination-ip x¿௵9 rule 0 name 11 action pass counting enable source-zone Untrust destination-zone Trust rule 1 name 22 action pass counting enable source-zone Trust destination-zone Untrust rule 2 name 33 action pass counting enable source-zone Trust destination-zone Local rule 3 name 44 action pass counting enable source-zone Local destination-zone Trust rule 6 name 77 action pass counting enable source-zone Trust destination-zone Trust rule 7 name 88 action pass counting enable source-zone Untrust destination-zone Untrust rule 10 name ȫͨ action pass logging enable counting enable source-zone Local destination-zone Local

4 个回答

人机,又刷屏

暂无评论

粉丝:174人 关注:0人

IPSEC VPN故障排查:

1、检查公网地址的连通性
2、检查ipsec acl是否配置正确(两端ACL以互为镜像的方式配置)
3、检查ike keychain/ike profile 协商参数配置是否正确(工作模式、keychain、identity、本端/对端隧道地址或隧道名称、NAT穿越功能v7自适应)
4、检查ipsec proposal(v5平台) /ipsec transform-set(v7平台)参数两端是否一致(封装模式、安全协议、验证算法、加密算法)
5、检查设备是否创建ipsec策略,并加载协商参数(acl、ike profile 、ipsec transform-set、对端隧道IP)
6、检查ipsec策略是否应用在正确的接口上

IPSEC排查命令:
1、disp ipsec policy
2、disp acl
3、dis cu conf ike-profile
4、dis cu conf ike-keychain
5、display ike proposal
6、display ipsec transform-set
7、disp ike sa (verbose)
8、disp ipsec sa
9、reset ipsec sa
10、reset ike sa

暂无评论

粉丝:140人 关注:1人


1. IPSec配置检查

  • 检查策略与SA匹配:请确保您的IPSec策略与IKE配置中的参数相匹配,特别是加密算法、身份验证算法以及密钥交换(如 DH组)的设置。

  • IPSec配置的例子

    ipsec transform-set ceshi esp encryption-algorithm aes-cbc-128 esp authentication-algorithm sha1 ipsec transform-set GE1/0/3_IPv4_2 esp encryption-algorithm 3des-cbc esp authentication-algorithm md5

    确保 transform-set 的加密和认证算法一致。如果IKE和IPSec的设置不一致,隧道会无法建立。

2. 检查IKE配置

  • 确保IKE的身份匹配正确,检查本地和远端的身份配置:

    ike profile GE1/0/3_IPv4_1 keychain 1 dpd interval 5 periodic exchange-mode aggressive

    确保 local-identityremote-identity 配置没有问题,匹配的是 IP 地址还是 fqdn。

  • DPD配置:如果DPD (Dead Peer Detection) 没有配置正确或没有启用,可能导致隧道在没有流量时断开。您可以尝试启用 dpd interval 设置:

    ike invalid-spi-recovery enable ike dpd interval 10 on-demand

3. ACL设置检查

  • 确保ACL放行正确的流量:检查 IPsec 的访问控制列表(ACL)设置。确保允许流量从源 IP(如 159.150.20.0/24)到目标 IP(如 192.168.11.0/24)的通过。

    acl advanced name IPsec_GE1/0/3_IPv4_1 rule 5 permit ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255

    如果ACL设置错误,流量会被过滤掉,导致IPSec隧道无法建立。

4. IPSec政策检查

  • 确保您配置了正确的 IPSec policy 来适配隧道:

    ipsec policy GE1/0/3 1 isakmp transform-set ceshi security acl name IPsec_GE1/0/3_IPv4_1 local-address 111.20.110.250 remote-address 124.115.171.130

    确保 local-addressremote-address 配置没有错。

5. 路由与静态路由检查

  • 确保有正确的路由,尤其是与远程IPSec隧道相连的接口和目标网络的静态路由:

    ip route-static 0.0.0.0 0 GigabitEthernet1/0/3 111.20.110.249 ip route-static 192.168.11.0 24 111.20.110.249

    如果路由配置有误,隧道流量可能无法正确路由到隧道端。

6. 检查数据包的抓包与日志

  • 使用工具抓包确认数据包是否有正确的流动,以及是否存在ICMP或TCP连接失败的情况。

  • 查看IKE和IPSec的日志,以查看是否存在报文丢失或错误配置的详细信息。

总结:

您需要仔细检查:

  • IPSec策略和IKE配置是否一致。

  • ACL规则是否放行正确的流量。

  • 路由设置是否正确,确保流量通过正确的接口。

  • 确保DPD和IKE的keepalive功能正确配置。


暂无评论

军刺 二段
粉丝:0人 关注:0人

从配置和现象来看,IKE SA 已建立但 IPsec 隧道不通,核心问题可能出在ACL 匹配、安全策略或 IPsec 参数配置上。结合配置细节分析如下:

一、关键问题定位

  1. ACL 与流量不匹配
    • 配置中 IPsec 策略GE1/0/3 1引用了 ACL IPsec_GE1/0/3_IPv4_1,规则为:
      rule 5 permit ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255
      即仅允许159.150.20.0/24 → 192.168.11.0/24的流量走 IPsec 隧道。
    • 但同时存在 ACL 3000,其中规则 1 明确拒绝了相同流量:
      acl advanced 3000
      rule 1 deny ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255
      GigabitEthernet1/0/3接口应用了nat outbound 3000,导致 IPsec 流量被 ACL 3000 优先拒绝,无法进入隧道。
  2. IPsec SA 未建立执行display ipsec sa未看到 IPsec SA 信息,说明 IKE 协商成功后,未触发 IPsec SA 建立,根本原因是没有匹配 ACL 的流量触发隧道协商(被 ACL 3000 阻断)。
  3. 安全策略方向问题安全策略中虽允许Trust ↔ Untrust的流量,但需确认是否明确允许 IPsec 加密后的流量(ESP/AH 协议)通过,否则可能被防火墙拦截。

二、解决步骤

1. 修正 ACL 冲突,允许 IPsec 流量

  • 删除或调整 ACL 3000 中对 IPsec 流量的拒绝规则
    [H3C] acl advanced 3000
    [H3C-acl-ipv4-adv-3000] undo rule 1 # 删除拒绝IPsec流量的规则
    (若需保留其他规则,确保 IPsec 相关流量不被拒绝)
  • 确保 NAT 不作用于 IPsec 流量:当前GigabitEthernet1/0/3同时配置了nat outbound 3000ipsec apply policy GE1/0/3,需保证 IPsec 流量不被 NAT 转换(IPsec 流量应优先于 NAT 处理,但 ACL 冲突会导致异常)。建议在 ACL 3000 中明确排除 IPsec 流量:
    [H3C-acl-ipv4-adv-3000] rule 1 deny ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255 # 先删除此规则,或替换为允许
    [H3C-acl-ipv4-adv-3000] rule 1 permit ip source 159.150.20.0 0.0.0.255 destination 192.168.11.0 0.0.0.255 # 允许IPsec流量不做NAT

2. 触发 IPsec SA 建立

  • 159.150.20.0/24网段的主机 ping 对端192.168.11.0/24网段的 IP(如ping 192.168.11.250),生成匹配 ACL 的流量,触发 IPsec SA 协商。
  • 执行display ipsec sa确认是否生成 IPsec SA,若看到inboundoutbound的 SA 条目,说明隧道已建立。

3. 补充安全策略,允许 IPsec 协议

  • 确保安全策略允许 ESP(协议号 50)或 AH(协议号 51)通过,避免加密后的流量被拦截:
    [H3C] security-policy ip
    [H3C-security-policy-ip] rule name allow_ipsec_protocol [H3C-security-policy-ip-rule-allow_ipsec_protocol] action pass [H3C-security-policy-ip-rule-allow_ipsec_protocol] protocol esp # 允许ESP协议 [H3C-security-policy-ip-rule-allow_ipsec_protocol] source-zone Untrust [H3C-security-policy-ip-rule-allow_ipsec_protocol] destination-zone Trust

三、验证与后续检查

  1. 确认 IPsec SA 状态:
    display ipsec sa # 应有inbound/outbound SA,且状态为active
  2. 检查流量统计:
    display ipsec sa counter # 查看发送/接收的加密/解密报文数,确认有流量通过
  3. 若仍不通,抓包分析GigabitEthernet1/0/3接口,确认是否有 ESP 报文发送 / 接收,或存在对端未响应的情况(可能是对端配置不匹配)。

总结

核心问题是ACL 3000 拒绝了 IPsec 隧道的流量,导致 IPsec SA 无法触发建立。修正 ACL 冲突后,通过实际流量触发协商,即可建立 IPsec 隧道。若对端配置有差异(如加密算法、ACL 反向不匹配),需同步检查对端设备配置。

暂无评论

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明