Trouble connecting MS websites

The Problem

For about a month I have trouble connecting to Microsoft websites using IPv6. The sites include linux package repository, dotnet.microsoft.com. When I disable IPv6 on the computer, everything is fine.

The Cause

From this reddit post, the cause of the problem is from MTU. There is no MTU negotiation between client and MS server.

The Solution

There are 2 ways to solve this problem

  1. Change the MTU size of the PPPoE client in my router to 1500.
  2. Do MSS clamping

I tried the MTU change option but later found that my ISP does not allow it. So the only solution is to do MSS clamping. In the above mentioned reddit post, there’s a comment showing how to do it with Mikrotik router. That’s what I need.

mikrotik
/ipv6 firewall mangle add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=clamp-to-pmtu out-interface-list=WAN