GRE over IPSec not coming up (maybe since 7.25.1)

This is a cross-post from the Subreddit, no Deja Vu intended.

Hi,

today I updated two CHR instances from 7.20.6 to 7.25.1 and having some issues with GRE (over IPSec). This configuration was working for over a year just fine.

Environment:
CHR on AWS <-> 3x IPSec Tunnel to a FortiGate with 3 WAN IFs <-> CHR behind FortiGate

Are there any known problems when the Remote Address of the GRE Tunnel Interface is behind an IPSec Tunnel (seperate Tunnel, not the IPSec secret within the GRE configuration)? It looks to me that no GRE packets are generated or at least not routed into the IPSec tunnel. I disabled Allow FastPath, but that did not make any difference.

I can ping over the IPSec tunnel just fine, so routing isn't an issue.

In an act of desperation I removed the Local Address from the GRE tunnel (AWS), hit apply, added the Local Address again and hit OK. The GRE tunnel went back up. I did the same for the other 2 GRE tunnels, but only one more came up.

All GRE tunnels having distinct Local and Remote Addresses and each GRE has it's own IPSec counterpart.

It might have to do with the latest changes in 7.25, but I cannot say for sure because 7.20.6 was released 11 months ago with a lot of updates inbetween.

Help highly appreciated.

/ip ipsec proposal
add auth-algorithms=sha256 enc-algorithms=aes-256-cbc lifetime=6h name=P2 pfs-group=modp2048

/interface gre
add allow-fast-path=no local-address=10.5.0.209 name=GRE_HQ-WAN1 remote-address=10.5.0.2
add allow-fast-path=no local-address=10.5.0.225 name=GRE_HQ-WAN2 remote-address=10.5.0.3
add allow-fast-path=no local-address=10.5.0.241 name=GRE_HQ-WAN3 remote-address=10.5.0.4

/ip address
add address=10.0.254.16/24 interface=ether2 network=10.0.254.0
add address=10.5.0.209/28 interface=lo network=10.5.0.208
add address=10.5.0.225/28 interface=lo network=10.5.0.224
add address=10.5.0.241/28 interface=lo network=10.5.0.240
add address=10.5.0.78/28 interface=GRE_HQ-WAN3 network=10.5.0.64
add address=10.5.0.62/28 interface=GRE_HQ-WAN2 network=10.5.0.48
add address=10.5.0.46/28 interface=GRE_HQ-WAN1 network=10.5.0.32

/ip firewall nat
add action=accept chain=srcnat dst-address=10.5.0.0/24 src-address=10.5.0.0/24

/ip route
add check-gateway=ping disabled=no distance=1 dst-address=192.168.4.128/28 gateway=10.5.0.33 routing-table=main scope=\
    30 target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=192.168.4.128/28 gateway=10.5.0.49 routing-table=main scope=\
    30 target-scope=10
add check-gateway=ping disabled=no distance=3 dst-address=192.168.4.128/28 gateway=10.5.0.65 routing-table=main scope=\
    30 target-scope=10
add check-gateway=none disabled=no dst-address=10.0.240.0/24 gateway=10.0.254.1 routing-table=main

/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
add dh-group=modp2048 enc-algorithm=aes-256,3des hash-algorithm=sha256 name=P1 prf-algorithm=sha256

/ip ipsec peer
add address=xxx.xx.xxx.124/32 exchange-mode=ike2 name="HQ (wan2)" profile=P1
add address=xx.xxx.xxx.127/32 exchange-mode=ike2 name="HQ (wan1)" profile=P1
add address=xx.xx.xxx.101/32 exchange-mode=ike2 name="HQ (wan3)" profile=P1

/ip ipsec policy
add dst-address=10.5.0.4/32 peer="HQ (wan3)" proposal=P2 src-address=10.5.0.240/28 tunnel=yes
add dst-address=10.5.0.3/32 peer="HQ (wan2)" proposal=P2 src-address=10.5.0.224/28 tunnel=yes
add dst-address=10.5.0.2/32 peer="HQ (wan1)" proposal=P2 src-address=10.5.0.208/28 tunnel=yes

--Michael

I think I saw another user mention that GRE over IPsec works on 7.24.5 but breaks on 7.25 (check the release threads). So I'd try 7.24.6 first to see if this is a 7.25 regression. Before you downgrade, grab a supout.rif on 7.25.1 while a tunnel is down. If 7.24.6 works send that supout to support@mikrotik.com and post the result here so others with the same setup know. Then I suggest you stay on 7.24.6 until a 7.25.x changelog mentions a fix.

If it still fails on 7.24.6 please post your firewall filter and raw rules (GRE is protocol 47 and must be allowed in the input chain) and the full route table including how 10.5.0.2 to .4 are reached. While a tunnel is down on the AWS CHR also post the output of /interface gre print detail, /ip ipsec policy print stats and /ip ipsec installed-sa print. Also check with /tool sniffer quick ip-protocol=gre if GRE packets actually leave or arrive.

Might also be useful: config and version of the CHR behind the FortiGate, the phase 2 selectors on the FortiGate, any ipsec log entries (from /log print where topics~"ipsec") and if a reboot changes anything.

Thanks, I'll give that a shot.

Probably a dumb (nobody knows that dumb has the letter b in it) question, can I just upload 7.24.6 and reboot or additional steps necessary?

--Michael

Not dumb at all. Upload the 7.24.6 x86 main package (plus any extra packages from /system/package print) and run /system/package/downgrade. Or even simpler: set the channel to long-term under System > Packages > Check for Updates. Take an export, a backup and the supout first.

Btw, please post back if you get it sorted and how you did it, so others with the same issue can benefit. Thanks!

Downgrade to 7.24.6 resolved the issue and it's only IPSec related.

AWS CHR (with IPSec tunnels) running 7.24.6 and local CHR (IPSec tunnels on the FortiGate) with 7.25.1.

I'll contact Support, thanks for helping out.

--Michael