SOLVED - L2TP IPSEC stoped working after Upgrade to 6.18

I setup a new router and IPSEC was not working, giving me all the time

ipsec,error failed to pre-process ph2 packet

I had compared all the settings from the working one and noticed that it is impossible to create a peer from the GUI with having policy-template-group=*FFFFFFFF . Also if you just change anything inside the Peer than you lost the ***** and it only stands there policy-template-group=FFFFFFFF with the result that IPSEC is not working.

If you take a look to an export config than policy-template-group=*FFFFFFFF is missing in the peer

At all, you must add a new Peer with this

/ip ipsec peer

add address=0.0.0.0/0 local-address=0.0.0.0 passive=no port=500 auth-method=pre-shared-key secret="test" generate-policy=port-override policy-template-group=*FFFFFFFF exchange-mode=main-l2tp\ send-initial-contact=yes nat-traversal=yes proposal-check=obey hash-algorithm=sha1 enc-algorithm=3des dh-group=modp1024 lifetime=1d lifebytes=0 dpd-interval=disable-dpd dpd-maximum-failures=5

If you changed later the password over the GUI or anyhting else than you lost the *FFFFFFFF and IPSEC no longer works.

Puhhh…this problem cost me 3 days of my nervs.