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

IPSec VPN无法建立

2024-06-19提问
  • 0关注
  • 0收藏,574浏览
粉丝:0人 关注:0人

问题描述:

如图左侧为fw1,右侧为fw2,出口都配置有nat,建立IPSecVPN主模式+隧道,要求pc4和pc5内网胡同,,

组网及组网描述:

 

fw1配置如下

fw2配置如下

诊断结果

开启debuging显示预共享没有配置,无效提议,但是我明明配置了,附件是防火墙配置fw1和fw2,请大神帮忙看看,谢谢

*Jun 19 00:28:09:699 2024 H3C IKE/7/EVENT: -COntext=1; IKE thread 3047402448 ErrCode 0 processes a job.

*Jun 19 00:28:14:697 2024 H3C IKE/7/EVENT: -COntext=1; Received message from ipsec, message type is 0.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; Received SA acquire message from IPsec.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; Received SA acquire message from IPsec.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Set IPsec SA state to IKE_P2_STATE_INIT.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; IKE SA not found. Initiate IKE SA negotiation.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Obtained profile 2_IPv4_2.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Initiator created an SA for peer 10.0.12.2, local port 500, remote port 500.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Set IKE SA state to IKE_P1_STATE_INIT.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; IKE thread 3047402448 ErrCode 0 processes a job.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Begin Main mode exchange.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Pre-shared key matching address 10.0.12.2 not found.

*Jun 19 00:28:14:698 2024 H3C IKE/7/ERROR: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

No available proposal.

*Jun 19 00:28:14:698 2024 H3C IKE/7/ERROR: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Failed to negotiate IKE SA.

*Jun 19 00:28:14:698 2024 H3C IKE/7/EVENT: -COntext=1; vrf = 0, local = 10.0.12.1, remote = 10.0.12.2/500

Send delete SA to IPsec, the reason is negotiate fail.

 

*Jun 19 00:28:14:699 2024 H3C IKE/7/EVENT: -COntext=1; IKE thread 3047402448 ErrCode 0 processes a job.

 

 

最佳答案

zhiliao_HKgBkj 知了小白
粉丝:0人 关注:0人

<fw1>dis cur
#
version 7.1.064, Alpha 7164
#
sysname H3C
#
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
#
dhcp enable
#
xbar load-single
password-recovery enable
lpu-type f-series
#
vlan 1
#
dhcp server ip-pool 14
gateway-list 10.0.14.1
network 10.0.14.0 mask 255.255.255.0
#
interface NULL0
#
interface GigabitEthernet1/0/0
port link-mode route
combo enable copper
ip address 10.0.14.1 255.255.255.0
manage ping inbound
manage ping outbound
#
interface GigabitEthernet1/0/1
port link-mode route
combo enable copper
ip address 192.168.0.1 255.255.255.0
#
interface GigabitEthernet1/0/2
port link-mode route
combo enable copper
ip address 10.0.12.1 255.255.255.0
nat outbound counting
manage ping inbound
manage ping outbound
ipsec apply policy 2
#
security-zone name Local
#
security-zone name Trust
import interface GigabitEthernet1/0/0
#
security-zone name DMZ
#
security-zone name Untrust
import interface GigabitEthernet1/0/2
#
security-zone name Management
import interface GigabitEthernet1/0/1
#
scheduler logfile size 16
#
ip route-static 0.0.0.0 0 GigabitEthernet1/0/2 10.0.12.2
#
acl basic 2000
rule 0 permit source 10.0.14.0 0.0.0.255
#
acl advanced name IPsec_2_IPv4_2
rule 0 permit ip source 10.0.14.0 0.0.0.255 destination 10.0.25.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
#
user-group system
#
local-user admin class manage
password hash $h$6$k+/ESCMLfRd0OET4$Y5B9j+jMEbuG7c1eX2jIrGnJTCKEFZEKgYulDIbmAhrslg9/U70bPGm4N0yv6ucbAh1zG+376fuxb19pfKIrkQ==
service-type telnet terminal http https
authorization-attribute user-role level-3
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
ipsec transform-set 2_IPv4_2
esp encryption-algorithm aes-cbc-128
esp authentication-algorithm sha1
#
ipsec policy 2 2 isakmp
transform-set 2_IPv4_2
security acl name IPsec_2_IPv4_2
local-address 10.0.12.1
remote-address 10.0.12.2
ike-profile 2_IPv4_2
sa trigger-mode auto
#
nat global-policy
rule name PolicyRule_1
source-zone Trust
destination-zone Untrust
source-ip subnet 10.0.14.0 24
destination-ip subnet 10.0.25.0 24
action snat no-nat
counting enable
#
ike profile 2_IPv4_2
keychain 2_IPv4_2
local-identity address 1.1.1.1
match remote identity address 2.2.2.2 255.255.255.255
match local address GigabitEthernet1/0/2
proposal 65535
#
ike proposal 65535
dh group20
authentication-algorithm sha512
#
ike keychain 2_IPv4_2
match local address GigabitEthernet1/0/2
pre-shared-key address 2.2.2.2 255.255.255.255 key cipher $c$3$k3JWdMm9JgTOZgH4kDCkFFK11CtwAWvB9hFCX+s=
#
ip http enable
ip https enable
#
security-policy ip
rule 0 name PolicyV4_0
action pass
#


<FW2>dis cur
#
version 7.1.064, Alpha 7164
#
sysname H3C
#
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
#
dhcp enable
#
xbar load-single
password-recovery enable
lpu-type f-series
#
vlan 1
#
dhcp server ip-pool 25
gateway-list 10.0.25.2
network 10.0.25.0 mask 255.255.255.0
#
interface NULL0
#
interface GigabitEthernet1/0/0
port link-mode route
combo enable copper
ip address 10.0.25.2 255.255.255.0
manage ping inbound
manage ping outbound
#
interface GigabitEthernet1/0/1
port link-mode route
combo enable copper
ip address 192.168.0.2 255.255.255.0
#
interface GigabitEthernet1/0/2
port link-mode route
combo enable copper
ip address 10.0.12.2 255.255.255.0
nat outbound counting
manage ping inbound
manage ping outbound
ipsec apply policy vpn
#
security-zone name Local
#
security-zone name Trust
import interface GigabitEthernet1/0/0
#
security-zone name DMZ
#
security-zone name Untrust
import interface GigabitEthernet1/0/2
#
security-zone name Management
import interface GigabitEthernet1/0/1
#
line vty 0 4
authentication-mode scheme
user-role network-admin
#
line vty 5 63
user-role network-operator
#
ip route-static 0.0.0.0 0 GigabitEthernet1/0/2 10.0.12.1
#
acl advanced name IPsec_vpn_IPv4_1
rule 0 permit ip source 10.0.25.0 0.0.0.255 destination 10.0.14.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
#
user-group system
#
local-user admin class manage
password hash $h$6$dUChUZgjCJzadL+9$ivyTAj1zJONO4h1E1/m7VpUSzbFUYWDm/MDShNpDonTpWglyiNvqi1HApZtBSCOPkiJ7AqsnMM/cJYeEhU2Q+A==
service-type telnet terminal http https
authorization-attribute user-role level-3
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
ipsec transform-set vpn_IPv4_1
esp encryption-algorithm aes-cbc-128
esp authentication-algorithm sha1
#
ipsec policy vpn 1 isakmp
transform-set vpn_IPv4_1
security acl name IPsec_vpn_IPv4_1
local-address 10.0.12.2
remote-address 10.0.12.1
ike-profile vpn_IPv4_1
sa trigger-mode auto
#
nat global-policy
rule name PolicyRule_1
source-zone Trust
destination-zone Untrust
source-ip subnet 10.0.25.0 24
destination-ip subnet 10.0.14.0 24
action snat no-nat
counting enable
#
ike profile vpn_IPv4_1
keychain vpn_IPv4_1
local-identity address 2.2.2.2
match remote identity address 1.1.1.1 255.255.255.255
match local address GigabitEthernet1/0/2
proposal 65535
#
ike proposal 65535
dh group20
authentication-algorithm sha512
#
ike keychain vpn_IPv4_1
match local address GigabitEthernet1/0/2
pre-shared-key address 1.1.1.1 255.255.255.255 key cipher $c$3$0/zod13X0Rwh0yY9j2BGLx20mf5746ydjBGVI/c=
#
ip http enable
ip https enable
#
security-policy ip
rule 0 name PolicyV4_0
action pass
#
return

3 个回答
粉丝:6人 关注:8人

第一阶段起来了没?用真机做的还是模拟器,模拟器有时候会有问题

使用的是模拟器

zhiliao_HKgBkj 发表时间:2024-06-19 更多>>

使用的是模拟器

zhiliao_HKgBkj 发表时间:2024-06-19
粉丝:13人 关注:8人

您好,请知:

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

粉丝:39人 关注:26人

Pre-shared key matching address 10.0.12.2 not found.这是说明匹配10.0.12.2的共享密钥没有找到,而且你的ipsec policy里面的本地和远端分别是10.0.12.2和10.0.12.1,你ike里面也需要用这两个地址作为远端和本地地址,不能用1.1.1.1和2.2.2.2

好的,我修改一下试试

zhiliao_HKgBkj 发表时间:2024-06-19 更多>>

好的,我修改一下试试

zhiliao_HKgBkj 发表时间:2024-06-19

编辑答案

你正在编辑答案

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

分享扩散:

提出建议

    +

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

确定

亲~检测到您登陆的账号未在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. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

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

不规范转载

×

举报说明