Hello
I've set up a VPN between Windows 7 clients and a Juniper NS5GT Firewall according the Juniper KB articles
http://kb.juniper.net/InfoCenter/index?page=content&id=KB10939 and
http://kb.juniper.net/InfoCenter/index?page=content&id=KB16075.
With the first Windows 7 client, it work's just fine. With the second and the third clients, it won't work.
The error message while conecting is:
"Error 810: A network connection between your computer and the VPN server was started, but the VPN connection was not completed. This is typically caused by the use of an incorrect or expired certificate for authentication between the client and the server. Please contact your Administrator to ensure that the certificate being used for authentication is valid"
Debugging the vpn on the juniper firewall while connecting, I get the following difference betwen phase 1 and phase 2:
With the client that is ok:
## 2011-05-16 11:18:47 : IKE<138.188.100.248> responder (pki) constructing remote NAT-D
## 2011-05-16 11:18:47 : IKE<138.188.100.248> Construct [NATD]
## 2011-05-16 11:18:47 : IKE<138.188.100.248> responder (pki) constructing local NAT-D
## 2011-05-16 11:18:47 : IKE<138.188.100.248> Construct [NATD]
## 2011-05-16 11:18:47 : IKE<138.188.100.248> Xmit : [KE] [NONCE] [CERT-REQ] [NATD] [NATD]
## 2011-05-16 11:18:47 : IKE<138.188.100.248> Responder sending IPv4 IP 138.188.100.248/port 357
## 2011-05-16 11:18:47 : IKE<138.188.100.248> Send Phase 1 packet (len=278)
## 2011-05-16 11:18:47 : IKE<138.188.100.248> IKE msg done: PKI state<0> IKE state<2/1017200f>
## 2011-05-16 11:18:49 : IKE<0.0.0.0 > from FLOAT port.
## 2011-05-16 11:18:49 : IKE<138.188.100.248>
ike packet, len 1716, action 0## 2011-05-16 11:18:49 : IKE<138.188.100.248> Catcher: received 1688 bytes from socket.
## 2011-05-16 11:18:49 : IKE<138.188.100.248> ****** Recv packet if <untrust> of vsys <Root> ******
## 2011-05-16 11:18:49 : IKE<138.188.100.248> Catcher: get 1688 bytes. src port 63177
## 2011-05-16 11:18:49 : IKE<0.0.0.0 > ISAKMP msg: len 1684, nxp 5[ID], exch 2[MM], flag 01 E
## 2011-05-16 11:18:49 : IKE<138.188.100.248> gen_skeyid()
With a client that isn't building up the VPN:
## 2011-05-16 11:43:57 : IKE<138.188.100.226> responder (pki) constructing remote NAT-D
## 2011-05-16 11:43:57 : IKE<138.188.100.226> Construct [NATD]
## 2011-05-16 11:43:57 : IKE<138.188.100.226> responder (pki) constructing local NAT-D
## 2011-05-16 11:43:57 : IKE<138.188.100.226> Construct [NATD]
## 2011-05-16 11:43:57 : IKE<138.188.100.226> Xmit : [KE] [NONCE] [CERT-REQ] [NATD] [NATD]
## 2011-05-16 11:43:57 : IKE<138.188.100.226> Responder sending IPv4 IP 138.188.100.226/port 381
## 2011-05-16 11:43:57 : IKE<138.188.100.226> Send Phase 1 packet (len=278)
## 2011-05-16 11:43:57 : IKE<138.188.100.226> IKE msg done: PKI state<0> IKE state<2/1017200f>
## 2011-05-16 11:43:57 : IKE<0.0.0.0 > from FLOAT port.
## 2011-05-16 11:43:57 : IKE<138.188.100.226>
ike packet, len 116, action 0## 2011-05-16 11:43:57 : IKE<138.188.100.226> Catcher: received 88 bytes from socket.
## 2011-05-16 11:43:57 : IKE<138.188.100.226> ****** Recv packet if <untrust> of vsys <Root> ******
## 2011-05-16 11:43:57 : IKE<138.188.100.226> Catcher: get 88 bytes. src port 14989
## 2011-05-16 11:43:57 : IKE<0.0.0.0 > ISAKMP msg: len 84, nxp 8[HASH], exch 5[INFO], flag 01 E
## 2011-05-16 11:43:57 : IKE<138.188.100.226>
Error: Responder expecting non-floated IKE packets in phase 2, drop pak.
According to the sent packet size I'm tempted to say that the second client isn't sending all the things he should, or he is floating to a different port when he shouldn't.
On booth machines, MS kb926179 (How to configure an L2TP/IPsec server behind a NAT-T) is applied, AssumeUDPEncapsulationCont
extOnSendR
ule has value 2.
Any Idea ?
To fix this, when you get to page 32 of the Application Note, configure a phase 2 custom proposal on the firewall and apply it to the VPN configuration:
Create two new proposals as follows:
set ike p2-proposal "nopfs-esp-3des-sha-window
set ike p2-proposal "nopfs-esp-aes128-sha-wind
Then change the IPsec config as follows to reference these two p2 proposals (p.33 of the Application Note):
set vpn "WindowsVPN-vpn" gateway "WindowsVPN-gateway" no-replay transport idletime 0 proposal "nopfs-esp-3des-sha-window
Important note: The LIFE SIZE has to be set for a value 250000; if LIFE SIZE is not set to 250000, it will not work. All built-in P2 proposals set on the Juniper firewall are set to a LIFE SIZE of 0.