取消
显示结果 
搜索替代 
您的意思是: 
cancel
15837
查看次数
0
有帮助
12
回复

1841路由器和asa ipsec vpn野蛮模式不能建立

fishlonely
Level 1
Level 1
思科路由器和asa ipsec vpn 野蛮模式不能建立连接,请大神指教下:
asa配置:

ASA-2(config)# sh run
: Saved
:
: Serial Number: JMX1246L0R7
: Hardware: ASA5510, 1024 MB RAM, CPU Pentium 4 Celeron 1600 MHz
:
ASA Version 9.1(7)32
!
hostname ASA-2
enable password TPepI7G4530MZLrk encrypted
xlate per-session deny tcp any4 any4
xlate per-session deny tcp any4 any6
xlate per-session deny tcp any6 any4
xlate per-session deny tcp any6 any6
xlate per-session deny udp any4 any4 eq domain
xlate per-session deny udp any4 any6 eq domain
xlate per-session deny udp any6 any4 eq domain
xlate per-session deny udp any6 any6 eq domain
names
ip local pool SSLClientPool 172.16.110.1-172.16.110.62 mask 255.255.255.192
!
interface Ethernet0/0
no nameif
no security-level
no ip address
!
interface Ethernet0/0.10
vlan 10
nameif inside
security-level 100
ip address 192.168.11.2 255.255.255.0
!
interface Ethernet0/0.2500
vlan 2500
nameif outside
security-level 0
ip address 25.25.25.25 255.255.255.248
!
interface Ethernet0/1
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet0/3
shutdown
no nameif
security-level 100
no ip address
!
interface Management0/0
shutdown
no nameif
no security-level
no ip address
!
boot system disk0:/asa917-32-k8.bin
ftp mode passive
same-security-traffic permit intra-interface
object network obj-lan
subnet 192.168.11.0 255.255.255.0
object network obj-vpn
subnet 172.16.110.0 255.255.255.192
access-list VPN0 standard permit 192.168.11.0 255.255.255.0
access-list VPN0 standard permit 172.16.110.0 255.255.255.192
access-list vpn-1 extended permit ip 172.16.110.0 255.255.255.192 192.168.10.0 255.255.255.0
pager lines 24
logging enable
logging buffered debugging
mtu inside 1500
mtu outside 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-731.bin
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
route outside 0.0.0.0 0.0.0.0 25.25.25.1 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
aaa authentication ssh console LOCAL
aaa authentication telnet console LOCAL
http server enable 20443
http 0.0.0.0 0.0.0.0 outside
no snmp-server location
no snmp-server contact
crypto ipsec ikev1 transform-set esp-3des esp-3des esp-md5-hmac
crypto ipsec ikev1 transform-set my esp-3des esp-md5-hmac
crypto ipsec security-association pmtu-aging infinite
crypto map outside 100 match address vpn-1
crypto map outside 100 set ikev1 phase1-mode aggressive
crypto map outside 100 set ikev1 transform-set my
crypto map outside interface outside
crypto ca trustpool policy
crypto isakmp identity hostname
crypto ikev1 enable outside
crypto ikev1 policy 10
authentication pre-share
encryption 3des
hash md5
group 2
lifetime 86400
telnet 192.168.11.0 255.255.255.0 inside
telnet timeout 5
ssh stricthostkeycheck
ssh 121.29.194.143 255.255.255.255 outside
ssh 0.0.0.0 0.0.0.0 outside
ssh timeout 60
ssh version 2
ssh key-exchange group dh-group1-sha1
console timeout 0
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
port 10443
enable outside
dtls port 10443
anyconnect-essentials
anyconnect image disk0:/anyconnect-win-3.1.14018-k9.pkg 1
anyconnect enable
tunnel-group-list enable
cache
disable
group-policy SSLClientPolicy internal
group-policy SSLClientPolicy attributes
vpn-tunnel-protocol ssl-client
split-tunnel-policy tunnelspecified
split-tunnel-network-list value VPN0
default-domain value cisco.com
address-pools value SSLClientPool
username test password 0AKWGtPSEgAcPI9K encrypted
username text password OLC29d6dO/MVtMmg encrypted
username 123 password cZSQiXoztcBj8y1D encrypted
username cisco password miNpFG.9QSZNEuyO encrypted privilege 15
username yuejy password Cg6Kn9ZFzD9fXpOV encrypted privilege 15
tunnel-group SSLClientProfile type remote-access
tunnel-group SSLClientProfile general-attributes
default-group-policy SSLClientPolicy
tunnel-group SSLClientProfile webvpn-attributes
group-alias SSLVPNClient enable
tunnel-group test type ipsec-l2l
tunnel-group test ipsec-attributes
ikev1 pre-shared-key *****
tunnel-group r1 type ipsec-l2l
tunnel-group r1 ipsec-attributes
ikev1 pre-shared-key *****
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
message-length maximum client auto
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect ip-options
inspect netbios
inspect rsh
inspect rtsp
inspect skinny
inspect esmtp
inspect sqlnet
inspect sunrpc
inspect tftp
inspect sip
inspect xdmcp
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
call-home
profile CiscoTAC-1
no active
destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
destination address email callhome@cisco.com
destination transport-method http
subscribe-to-alert-group diagnostic
subscribe-to-alert-group environment
subscribe-to-alert-group inventory periodic monthly
subscribe-to-alert-group configuration periodic monthly
subscribe-to-alert-group telemetry periodic daily
Cryptochecksum:9192b0b8f6370ee988840ec3e970055a
: end
ASA-2(config)#
路由器配置:

Cisco IOS Software, 1841C Software (C1841C-ADVIPSERVICESK9-M), Version 15.0(1)M4, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2010 by Cisco Systems, Inc.
Compiled Thu 28-Oct-10 15:56 by prod_rel_team
ROM: System Bootstrap, Version 12.4(13r)T14, RELEASE SOFTWARE (fc1)
r1 uptime is 7 hours, 55 minutes
System returned to ROM by power-on
r1(config)#do sh run
Building configuration...
Current configuration : 1863 bytes
!
! Last configuration change at 12:39:02 UTC Mon Apr 8 2019
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
no logging on
!
no aaa new-model
!
!
!
dot11 syslog
ip source-route
!
!
!
ip dhcp pool LAN
network 192.168.10.0 255.255.255.0
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
license udi pid CISCO1841C/K9 sn FGL160724LZ
username yuejy privilege 15 password 0 cisco.com
!
redundancy
!
!
!
!
crypto isakmp policy 100
encr 3des
hash md5
authentication pre-share
group 2
!
crypto isakmp peer address 25.25.25.25
set aggressive-mode password cisco123
!
!
crypto ipsec transform-set myset esp-3des esp-md5-hmac
!
crypto ipsec profile test
!
!
crypto map my 10 ipsec-isakmp
set peer 25.25.25.25
set transform-set myset
set identity r1
match address 110
!
!
!
!
!
interface FastEthernet0/0
description WAN
ip address 192.168.16.222 255.255.255.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
crypto map my
!
!
interface FastEthernet0/1
description LAN
ip address 192.168.10.1 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip nat inside source list 120 interface FastEthernet0/0 overload
ip route 0.0.0.0 0.0.0.0 192.168.16.1
!
access-list 1 permit any
access-list 100 permit ip 0.0.0.0 255.255.255.0 any
access-list 100 deny ip 192.168.10.0 0.0.0.255 any
access-list 110 permit ip 192.168.10.0 0.0.0.255 172.16.110.0 0.0.0.63
access-list 120 deny ip 192.168.10.0 0.0.0.255 172.16.110.0 0.0.0.63
access-list 120 permit ip 192.168.10.0 0.0.0.255 any
!
!
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
scheduler allocate 20000 1000
end
r1(config)#
12 条回复12

检查配置是否对应。是否有做NAT?
可以debug看看。
#terminal monitor
#debug crypto isakmp
#debug crypto ipsec
#debug crypto engine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rps-Cheers | If it solves your problem, please mark as answer. Thanks !

YilinChen
Spotlight
Spotlight
亲,本来就不应该用agressive mode

fishlonely
Level 1
Level 1
1540488497lcj 发表于 2019-4-9 10:25
检查配置是否对应。是否有做NAT?
可以debug看看。
#terminal monitor

抱歉,这几天忙,没来得及回复。
路由器这端是nat出去
asa这端直接公网ip

fishlonely
Level 1
Level 1
YilinChen 发表于 2019-4-9 14:23
亲,本来就不应该用agressive mode

抱歉,这几天忙,没来得及回复。
路由器这端是nat出去
asa这端直接公网ip
实际环境就是这样。
请问有好的解决方式吗

YilinChen
Spotlight
Spotlight
fishlonely 发表于 2019-4-10 08:37
抱歉,这几天忙,没来得及回复。
路由器这端是nat出去
asa这端直接公网ip

2端设备采用标准IPSEC VPN Site-to-Site配置,主模式,开启 NAT-T功能,就可以了

fishlonely
Level 1
Level 1
YilinChen 发表于 2019-4-10 08:41
2端设备采用标准IPSEC VPN Site-to-Site配置,主模式,开启 NAT-T功能,就可以了

问题是:路由器这端是私网ip

fishlonely 发表于 2019-4-10 09:01
问题是:路由器这端是私网ip

我不知道你的IPSec建立到什么阶段了,也没debug看看。但是如果是经过了NAT,除了楼上仁兄说的开启NAT-T注意点之外,最好先看看show ip nat trans,看看建立的端口有没有被转换,举个例子,UDP 500的包,有没有被转换为UDP 512,如果确有类似的现象发生,建议修改nat的拒绝掉IPSec的感兴趣流。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rps-Cheers | If it solves your problem, please mark as answer. Thanks !

YilinChen
Spotlight
Spotlight
fishlonely 发表于 2019-4-10 09:01
问题是:路由器这端是私网ip

可以实现呀,路由器虽然是在内部用私网IP,但总有一个前端设备做NAT吧,只要路由器能访问互联网,就能实现IPSEC VPN,只是必须要开启NAT-T特性,通过UDP 4500 进行协商

fishlonely
Level 1
Level 1
YilinChen 发表于 2019-4-10 15:55
可以实现呀,路由器虽然是在内部用私网IP,但总有一个前端设备做NAT吧,只要路由器能访问互联网,就能实 ...

谢谢你的回复,营运商补给你做端口映射。

YilinChen
Spotlight
Spotlight
fishlonely 发表于 2019-4-15 10:39
谢谢你的回复,营运商补给你做端口映射。

一样能实现,没有公网IP的一端,主动发起IPSecVPN协商(开启NAT-T),有固定公网IP的一端设备,被动接收就可以了,因为不知道NAT后的公网IP是什么,要配置成0.0.0.0,充许任意公网IP进行协商

fishlonely
Level 1
Level 1
YilinChen 发表于 2019-4-15 14:48
一样能实现,没有公网IP的一端,主动发起IPSecVPN协商(开启NAT-T),有固定公网IP的一端设备,被动接收 ...

这是谢谢大神了,与君一席话,胜读十年书。
麻烦能贴下两边的配置案例吗

yueyang88300
Level 1
Level 1
大家讲讲VPN
快捷链接