首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Openswan Cisco ASA 9.1 --无法响应IPsec SA请求,因为没有已知的连接

问Openswan Cisco ASA 9.1 --无法响应IPsec SA请求,因为没有已知的连接
EN

Server Fault用户
提问于 2014-04-09 19:02:00
回答 1查看 5.6K关注 0票数 3

好的,我有一个简单的VPN IPSEC设置,它只有一个Linux主机,它有一个公共IP地址和172.16.255.1的回送接口。在右边,我有一个思科ASA 5505 9.1。问题是思科ASA说,当调试“第二阶段完成”,所以我知道没有冲突,我的ISKMP谈判。但是,我收到了以下应该指示网络ACL不匹配的信息,但我无法理解。

代码语言:javascript
复制
Apr 09 14:30:26 [IKEv1 DEBUG]Group = x.x.137.133, IP = x.x.137.133, IKE got a KEY_ADD msg for SA: SPI = 0x61af9f82
Apr 09 14:30:26 [IKEv1 DEBUG]Group = x.x.137.133, IP = x.x.137.133, Pitcher: received KEY_UPDATE, spi 0x95cad3f0
Apr 09 14:30:26 [IKEv1 DEBUG]Group = x.x.137.133, IP = x.x.137.133, Starting P2 rekey timer: 27360 seconds.
Apr 09 14:30:26 [IKEv1]Group = x.x.137.133, IP = x.x.137.133, PHASE 2 COMPLETED (msgid=0504e77c)
Apr 09 14:23:29 [IKEv1]Group = x.x.137.133, IP = x.x.137.133, Received non-routine Notify message: Invalid ID info (18)

在运行OpenSwan的Linux盒上,我看到:

代码语言:javascript
复制
"L2L-IPSEC-CT" #1: the peer proposed: 172.16.255.1/32:0/0 -> 192.168.0.0/24:0/0
"L2L-IPSEC-CT" #1: cannot respond to IPsec SA request because no connection is known for 172.16.255.1/32===x.x.137.133<x.x.137.133>[+S=C]:1/0...x.x.157.15<x.x.157.15>[+S=C]:1/0===192.168.0.0/24
"L2L-IPSEC-CT" #1: sending encrypted notification INVALID_ID_INFORMATION to x.x.157.15:500

在进行了一些研究之后,这似乎是拟议中的网络允许穿越隧道的一个问题。然而,我对这两件事的信任都是相同的。

Cisco配置

代码语言:javascript
复制
access-list VPN-TRAFFIC-VPS1 line 1 extended permit icmp 192.168.0.0 255.255.255.0 host 172.16.255.1 (hitcnt=422) 0x150f2cfc
access-list VPN-TRAFFIC-VPS1 line 2 extended permit ip 192.168.0.0 255.255.255.0 host 172.16.255.1 (hitcnt=42) 0xfd98dbac

Openswan Config

代码语言:javascript
复制
conn L2L-IPSEC-CT
        auto=start #automatically start if detected
        type=tunnel #tunnel mode/not transport
        compress=no

        ###THIS SIDE###
        left=x.x.137.133
        leftsubnet=172.16.255.1/32

        ###PEER SIDE###
        right=x.x.157.15
        rightsubnet=192.168.0.0/24

        #phase 1 encryption-integrity-diffhellman
        keyexchange=ike
        ike=3des-md5-modp1024,aes256-sha1-modp1024
        ikelifetime=86400s
        authby=secret #use presharedkey

        #phase 2 encryption-pfsgroup
        phase2=esp #esp for encryption | ah for authentication only
        phase2alg=3des-md5;modp1024
        pfs=no

我的测试从192.168.0.200到172.16.255.1一直是一个ping :下面是“密码ipsec”节目

代码语言:javascript
复制
asa(config)# show crypto ipsec sa
interface: outside
    Crypto map tag: outside-cmap, seq num: 40, local addr: x.x.157.15

      access-list VPN-TRAFFIC-VPS1 extended permit ip 192.168.0.0 255.255.255.0 host 172.16.255.1
      local ident (addr/mask/prot/port): (192.168.0.0/255.255.255.0/0/0)
      remote ident (addr/mask/prot/port): (172.16.255.1/255.255.255.255/0/0)
      current_peer: x.x.137.133

      #pkts encaps: 0, #pkts encrypt: 0, #pkts digest: 0
      #pkts decaps: 0, #pkts decrypt: 0, #pkts verify: 0
      #pkts compressed: 0, #pkts decompressed: 0
      #pkts not compressed: 0, #pkts comp failed: 0, #pkts decomp failed: 0
      #pre-frag successes: 0, #pre-frag failures: 0, #fragments created: 0
      #PMTUs sent: 0, #PMTUs rcvd: 0, #decapsulated frgs needing reassembly: 0
      #TFC rcvd: 0, #TFC sent: 0
      #Valid ICMP Errors rcvd: 0, #Invalid ICMP Errors rcvd: 0
      #send errors: 0, #recv errors: 0

      local crypto endpt.: x.x.157.15/0, remote crypto endpt.: x.x.137.133/0
      path mtu 1500, ipsec overhead 58(36), media mtu 1500
      PMTU time remaining (sec): 0, DF policy: copy-df
      ICMP error validation: disabled, TFC packets: disabled
      current outbound spi: 61AF9F82
      current inbound spi : 95CAD3F0

开放天鹅ipsec自动状态

代码语言:javascript
复制
**000 "L2L-IPSEC-CT": 172.16.255.1/32===x.x.137.133<x.x.137.133>[+S=C]...x.x.157.15<x.x.157.15>[+S=C]===192.168.0.0/24; erouted; eroute owner: #4
000 "L2L-IPSEC-CT":     myip=unset; hisip=unset;
000 "L2L-IPSEC-CT":   ike_life: 86400s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 0
000 "L2L-IPSEC-CT":   policy: PSK+ENCRYPT+TUNNEL+UP+IKEv2ALLOW+SAREFTRACK+lKOD+rKOD; prio: 32,24; interface: eth0;
000 "L2L-IPSEC-CT":   newest ISAKMP SA: #3; newest IPsec SA: #4;
000 "L2L-IPSEC-CT":   IKE algorithms wanted: 3DES_CBC(5)_000-MD5(1)_000-MODP1024(2), AES_CBC(7)_256-SHA1(2)_000-MODP1024(2); flags=-strict
000 "L2L-IPSEC-CT":   IKE algorithms found:  3DES_CBC(5)_192-MD5(1)_128-MODP1024(2), AES_CBC(7)_256-SHA1(2)_160-MODP1024(2)
000 "L2L-IPSEC-CT":   IKE algorithm newest: 3DES_CBC_192-MD5-MODP1024
000 "L2L-IPSEC-CT":   ESP algorithms wanted: 3DES(3)_000-MD5(1)_000; pfsgroup=MODP1024(2); flags=-strict
000 "L2L-IPSEC-CT":   ESP algorithms loaded: 3DES(3)_192-MD5(1)_128
000 "L2L-IPSEC-CT":   ESP algorithm newest: 3DES_000-HMAC_MD5; pfsgroup=<N/A>
000
000 #4: "L2L-IPSEC-CT":500 STATE_QUICK_I2 (sent QI2, IPsec SA established); EVENT_SA_REPLACE in 27518s; newest IPSEC; eroute owner; isakmp#3; idle; import:admin initiate
000 #4: "L2L-IPSEC-CT" esp.95cad3f0@x.x.157.15 esp.61af9f82@x.x.137.133 tun.0@x.x.157.15 tun.0@x.x.137.133 ref=0 refhim=4294901761
000 #3: "L2L-IPSEC-CT":500 STATE_MAIN_I4 (ISAKMP SA established); EVENT_SA_REPLACE in 85221s; newest ISAKMP; lastdpd=1s(seq in:0 out:0); idle; import:admin initiate
**

我真的不明白为什么这不管用。也许是一双新的眼睛,因为我已经做了三天了!呀!

感谢您的帮助服务器故障社区!

有什么OpenSwan命令可以用来验证这些子网是否被隧道"openswan“接收到?

EN

回答 1

Server Fault用户

发布于 2014-04-10 13:14:18

好吧,所以我相信我搞清楚了。

因此,即使我的Openswan盒不是在NAT后面,并且有一个带有公共IP的直接NIC,我也不得不打开NAT遍历。考虑到这一点,我不得不添加leftsoureip=172.16.255.1来告诉Openswan在与隧道右侧通信时使用什么源地址。我要做的最后一件事就是使用武力。由于某种原因,我一做完这件事,隧道就开始工作了。

代码语言:javascript
复制
config setup
     listen=x.x.137.133
     nat_traversal=yes
     virtual_private=%v:172.16.255.1/32,192.168.0.0/24
     oe=off
     protostack=netkey

conn L2L-IPSEC-CT
    auto=start #automatically start if detected
    type=tunnel #tunnel mode/not transport
    compress=no

    ###THIS SIDE###
    left=x.x.137.133
    leftid=x.x.137.133
    leftsubnet=172.16.255.1/32
    leftsourceip=172.16.255.1

    ###PEER SIDE###
    right=x.x.157.15
    rightid=x.x.157.15
    rightsubnet=192.168.0.0/24

    #phase 1 encryption-integrity-diffhellman
    keyexchange=ike
    ike=3des-md5-modp1024,aes256-sha1-modp1024
    ikelifetime=86400s
    authby=secret #use presharedkey

    #phase 2 encryption-pfsgroup
    phase2=esp #esp for encryption | ah for authentication only
    phase2alg=3des-md5;modp1024
    pfs=no
    forceencaps=yes
票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/587872

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档