# IPSEC and NAT-T problem

**URL:** <https://forum.mikrotik.com/t/ipsec-and-nat-t-problem/30115>\
**Category:** General\
**Created:** [July 21, 2009, 3:13pm UTC](https://forum.mikrotik.com/t/ipsec-and-nat-t-problem/30115 "2009-07-21T15:13:45Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![rpress](https://forum.mikrotik.com/letter_avatar/rpress/32/6_449c533f586939b6e5f246632a46421f.png) [@rpress](https://forum.mikrotik.com/u/rpress)\
**Post date:** [July 21, 2009, 3:13pm UTC](https://forum.mikrotik.com/t/ipsec-and-nat-t-problem/30115/1 "2009-07-21T15:13:45Z")

</div>

I have a VPN from Windows 7 laptop to MikroTik using L2TP/IPSEC with NAT-T. It works without NAT-T but it has a strange error using NAT-T:

```plaintext
14:59:28 ipsec respond new phase 1 negotiation: 68.183.xxx.xxx[500]<=>67.169.xxx.xxx[500] 
14:59:28 ipsec begin Identity Protection mode. 
14:59:28 ipsec received broken Microsoft ID: MS NT5 ISAKMPOAKLEY 
14:59:28 ipsec received Vendor ID: RFC 3947 
14:59:28 ipsec received Vendor ID: draft-ietf-ipsec-nat-t-ike-02 
14:59:28 ipsec 
14:59:28 ipsec received Vendor ID: FRAGMENTATION 
14:59:28 ipsec Selected NAT-T version: RFC 3947 
14:59:28 ipsec invalid DH group 20. 
14:59:28 ipsec invalid DH group 19. 
14:59:28 ipsec Hashing 68.183.xxx.xxx[500] with algo #2  
14:59:28 ipsec NAT-D payload #0 verified 
14:59:28 ipsec Hashing 67.169.xxx.xxx[500] with algo #2  
14:59:28 ipsec NAT-D payload #1 doesn't match 
14:59:28 ipsec NAT detected: PEER 
14:59:28 ipsec Hashing 67.169.xxx.xxx[500] with algo #2  
14:59:28 ipsec Hashing 68.183.xxx.xxx[500] with algo #2  
14:59:28 ipsec Adding remote and local NAT-D payloads. 
14:59:28 ipsec NAT-T: ports changed to: 67.169.xxx.xxx[4500]<->68.183.xxx.xxx[4500] 
14:59:28 ipsec KA list add: 68.183.xxx.xxx[4500]->67.169.xxx.xxx[4500] 
14:59:28 ipsec ISAKMP-SA established 68.183.xxx.xxx[4500]-67.169.xxx.xxx[4500] spi:4ad7f89178310abd:5ca6f63efdbf1
b79 
14:59:28 ipsec respond new phase 2 negotiation: 68.183.xxx.xxx[4500]<=>67.169.xxx.xxx[4500] 
14:59:28 ipsec Update the generated policy : 192.168.1.101/32[1701] 68.183.xxx.xxx/32[1701] proto=udp dir=in 
14:59:28 ipsec Adjusting my encmode UDP-Transport->Transport 
14:59:28 ipsec Adjusting peer's encmode UDP-Transport(4)->Transport(2) 
14:59:28 ipsec IPsec-SA established: ESP/Transport 67.169.xxx.xxx[4500]->68.183.xxx.xxx[4500] spi=76079680(0x488e
240) 
14:59:28 ipsec IPsec-SA established: ESP/Transport 68.183.xxx.xxx[4500]->67.169.xxx.xxx[4500] spi=4062236856(0xf2
20d0b8) 
14:59:28 ipsec the length in the isakmp header is too big. 
14:59:29 ipsec the length in the isakmp header is too big. 
14:59:31 ipsec the length in the isakmp header is too big. 
14:59:35 ipsec the length in the isakmp header is too big.

```

Any ideas about “the length in the isakmp header is too big.” ???

---

_[View the full topic](https://forum.mikrotik.com/t/ipsec-and-nat-t-problem/30115)._
