I found a strange problem with the last releases. The initiator side of an IPsec association is not showing NAT-T flag, while the responder does. Also there is a blackhole between 1406-1422 bytes size in the intiator side. This is happening at least in 6.45.1-3, currently both sides run 6.45.3. How to see the problem:
# Initiator, NATT not shown
[admin@MTClient] > :ip ipsec active-peers print
Flags: R - responder, N - natt-peer
# ID STATE UPTIME PH2-TOTAL REMOTE-ADDRESS DYNAMIC-ADDRESS
0 established 1h14m39s 6 83.44.NN.NNN 192.168.90.253
[admin@MTClient] > :ping 192.168.90.1 size=1406 do-not-fragment count=1
SEQ HOST SIZE TTL TIME STATUS
0 192.168.90.1 1406 64 28ms
sent=1 received=1 packet-loss=0% min-rtt=28ms avg-rtt=28ms max-rtt=28ms
[admin@MTClient] > :ping 192.168.90.1 size=1407 do-not-fragment count=1
SEQ HOST SIZE TTL TIME STATUS
0 192.168.90.1 timeout
sent=1 received=0 packet-loss=100%
[admin@MTClient] > :ping 192.168.90.1 size=1422 do-not-fragment count=1
SEQ HOST SIZE TTL TIME STATUS
0 192.168.90.1 timeout
sent=1 received=0 packet-loss=100%
[admin@MTClient] > :ping 192.168.90.1 size=1423 do-not-fragment count=1
SEQ HOST SIZE TTL TIME STATUS
0 packet too large and cannot be fragmented
sent=1 received=0 packet-loss=100%
# Responder, NATT shown
[admin@MTServer] > :ip ipsec active-peers print where id=client
Flags: R - responder, N - natt-peer
# ID STATE UPTIME PH2-TOTAL REMOTE-ADDRESS DYNAMIC-ADDRESS
0 RN client established 1h13m56s 6 89.35.NNN.NNN 192.168.90.253
[admin@MTServer] > :ping 192.168.90.253 size=1406 do-not-fragment count=1
SEQ HOST SIZE TTL TIME STATUS
0 192.168.90.253 1406 64 27ms
sent=1 received=1 packet-loss=0% min-rtt=27ms avg-rtt=27ms max-rtt=27ms
[admin@MTServer] > :ping 192.168.90.253 size=1407 do-not-fragment count=1
SEQ HOST SIZE TTL TIME STATUS
0 packet too large and cannot be fragmented
sent=1 received=0 packet-loss=100%
My configuration seems to be straightforward enough:
[admin@MTClient] > /ip ipsec export hide-sensitive
# aug/03/2019 09:43:42 by RouterOS 6.45.3
#
# model = RBD52G-5HacD2HnD
/ip ipsec peer
add address=mt.server name=server send-initial-contact=no
/ip ipsec identity
add auth-method=pre-shared-key-xauth generate-policy=port-strict mode-config=request-only my-id=fqdn:shad.mine peer=server \
remote-id=fqdn:mt.server username=client
[admin@MTServer] > /ip ipsec export hide-sensitive
# aug/03/2019 10:43:03 by RouterOS 6.45.3
#
# model = RouterBOARD 962UiGS-5HacT2HnT
/ip ipsec mode-config
add address-pool=vpn2 name=RW-cfg split-include=192.168.88.0/24,192.168.90.0/24
/ip ipsec policy group
add name=RoadWarrior
/ip ipsec profile
add name=rw
/ip ipsec peer
add name=RoadWarrior passive=yes profile=rw
/ip ipsec identity
add auth-method=pre-shared-key-xauth generate-policy=port-strict mode-config=RW-cfg peer=RoadWarrior policy-template-group=\
RoadWarrior username=client
/ip ipsec policy
add dst-address=192.168.90.0/24 group=RoadWarrior src-address=192.168.88.0/24 template=yes
add dst-address=192.168.90.0/24 group=RoadWarrior src-address=192.168.90.0/24 template=yes
The blackhole is making TCP connections impossible unless I trim the MTU in the initiator side. I’d say that this was not happening pre-6.45, but it is hard to remember if I tried to do tcp connections using IPsec this way while running previous releases.