Hey guys,
Having issues with terminating a VPN on an ASA 5505 when it's behind a standard home DSL router running PAT.
Looks like this:
Juniper SSG520 -> ASA 5520 -> Internet -> Netopia 2247 -> ASA 5505
Interesting traffic is: 172.26.1.0/24 (Juniper) , 172.16.2.0/24 (ASA 5505)
Juniper IP(Peer): 2.2.2.2
ASA 5505 IP(Peer): 1.1.1.1
Site to site VPN terminating on the Juniper and ASA 5505.
The VPN can be established when the Netopia is in bridge mode. So usual VPN requirements configured on the Juniper and ASA 5505 and an ACL rule on the ASA 5520 allowing isakmp, esp and non-isakmp through. Using main mode for phase 1. NAT-T not required because it's a static map being used on the 5520 for the outside IP of the Juniper and not PAT. I tested NAT-T anyway and it negotiates fine.
It all breaks down when I leave the Netopia in it's standard mode. (The usual home DSL router. PPPoE, PAT etc.)
Created the subnet 172.16.1.0/24 between the ASA and Netopia.
Added a default route on the ASA to point towards 172.16.1.254. (Inside IP of Netopia)
Added a static route on the Netopia for the network 172.16.2.0/24 (Inside network of ASA) to point towards 172.16.1.253. (Outside IP of ASA)
Port forwarded ports 500 and 4500 on the Netopia to 172.16.1.253 (Outside IP of ASA)
Here's the result of the debug on the ASA 5505 after trying to initiate VPN from Juniper side. (172.26.1.0/24)
TEST-ASA5505# Jul 21 09:26:34 [IKEv1]: IP = 2.2.2.2, IKE_DECODE RECEIVED Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + VENDOR (13) + VENDOR (13) + VENDOR (13) + VENDOR (13) + NONE (0) total length : 196
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, processing SA payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, Oakley proposal is acceptable
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, processing VID payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, processing VID payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, Received NAT-Traversal ver 02 VID
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, processing VID payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, processing VID payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, Received DPD VID
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, processing VID payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, processing IKE SA payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, IKE SA Proposal # 1, Transform # 1 acceptable Matches global IKE entry # 3
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, constructing ISAKMP SA payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, constructing NAT-Traversal VID ver 02 payload
Jul 21 09:26:34 [IKEv1 DEBUG]: IP = 2.2.2.2, constructing Fragmentation VID + extended capabilities payload
Jul 21 09:26:34 [IKEv1]: IP = 2.2.2.2, IKE_DECODE SENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + VENDOR (13) + NONE (0) total length : 124
Jul 21 09:26:38 [IKEv1]: IP = 2.2.2.2, Duplicate Phase 1 packet detected. Retransmitting last packet.
Jul 21 09:26:38 [IKEv1]: IP = 2.2.2.2, P1 Retransmit msg dispatched to MM FSM
Jul 21 09:26:38 [IKEv1]: IP = 2.2.2.2, IKE_DECODE RESENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + VENDOR (13) + NONE (0) total length : 124
Jul 21 09:26:42 [IKEv1]: IP = 2.2.2.2, Duplicate Phase 1 packet detected. Retransmitting last packet.
Jul 21 09:26:42 [IKEv1]: IP = 2.2.2.2, P1 Retransmit msg dispatched to MM FSM
Jul 21 09:26:42 [IKEv1]: IP = 2.2.2.2, IKE_DECODE RESENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + VENDOR (13) + NONE (0) total length : 124
Jul 21 09:26:46 [IKEv1]: IP = 2.2.2.2, Duplicate Phase 1 packet detected. Retransmitting last packet.
Jul 21 09:26:46 [IKEv1]: IP = 2.2.2.2, P1 Retransmit msg dispatched to MM FSM
Jul 21 09:26:46 [IKEv1]: IP = 2.2.2.2, IKE_DECODE RESENDING Message (msgid=0) with payloads : HDR + SA (1) + VENDOR (13) + VENDOR (13) + NONE (0) total length : 124
Jul 21 09:26:50 [IKEv1]: IP = 2.2.2.2, Duplicate Phase 1 packet detected. Retransmitting last packet.
Jul 21 09:26:50 [IKEv1]: IP = 2.2.2.2, P1 Retransmit msg dispatched to MM FSM
Jul 21 09:26:50 [IKEv1 DEBUG]: IP = 2.2.2.2, IKE MM Responder FSM error history (struct &0xd7e41be

<state>, <event>: MM_DONE, EV_ERROR-->MM_WAIT_MSG3, EV_RESEND_MSG-->MM_WAIT_MSG3, NullEvent-->MM_SND_MSG2, EV_SND_MSG-->MM_SND_MSG2, EV_START_TMR-->MM_SND_MSG2, EV_RESEND_MSG-->MM_WAIT_MSG3, EV_RESEND_MSG-->MM_WAIT_MSG3, NullEvent
Jul 21 09:26:50 [IKEv1 DEBUG]: IP = 2.2.2.2, IKE SA MM:57474668 terminating: flags 0x01000002, refcnt 0, tuncnt 0
Jul 21 09:26:50 [IKEv1 DEBUG]: IP = 2.2.2.2, sending delete/delete with reason message
Jul 21 09:26:50 [IKEv1]: IP = 2.2.2.2, Removing peer from peer table failed, no match!
Jul 21 09:26:50 [IKEv1]: IP = 2.2.2.2, Error: Unable to remove PeerTblEntry
Any thoughts?
My thoughts right now are that traffic from the ASA 5505 is being dropped somewhere. It can receive traffic as it received the proposal. It then tries to send something back. Just after this we see the "Duplicate Phase 1 packet detected. Retransmitting last packet". I think this means that the Juniper resent something back because it did not receive the acknowledge ment of the original proposal...
I should have a look at the logs on the Juniper side when initiating the VPN from the ASA side to see if it receives anything.