如图左侧为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.
(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
(0)
第一阶段起来了没?用真机做的还是模拟器,模拟器有时候会有问题
(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
(0)
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
(0)
好的,我修改一下试试
好的,我修改一下试试
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明