From Web Design to ERP — Your IT Partner

MikroTik CHR MSS Clamping INVALID Flag Fix (RouterOS 7.x)

The bug: On MikroTik CHR (the x86 virtual router, not physical hardware), MSS-clamping rules written the standard way — using out-interface=<wireguard-interface> — silently show an I (INVALID) flag in RouterOS 7.x and stop matching packets. The fix is a different rule shape entirely.

MSS clamping is the standard TCP-layer safety net that sits alongside a WireGuard MTU fix: even after the tunnel's own MTU is correct, TCP connections can still negotiate a segment size based on the underlying WAN link's larger MTU, which is too big for the WireGuard tunnel to carry. The textbook fix is a firewall mangle rule using out-interface. On physical MikroTik hardware, that works exactly as documented. On CHR, it doesn't — and the failure is silent enough that it's easy to assume the rule is working when it isn't.

Need MikroTik Bugs Fixed?

Need help? Connect on WhatsApp 👉 wa.link/uw9n3f

Or ask on website chat for freelancer support.

The Target MSS Value

WireGuard MTU (1412) - IP header (20) - TCP header (20) = 1372

This assumes the WireGuard interface MTU is already correctly set to 1412 for a PPPoE-constrained path — see our MTU fix write-up if that step hasn't been done yet. MSS clamping without a correct MTU underneath it treats a symptom without the underlying cause fixed.

What Doesn't Work on CHR

/ip firewall mangle add \

chain=forward action=change-mss new-mss=1372 passthrough=yes \

tcp-flags=syn protocol=tcp \

out-interface=wg-uae comment="MSS clamp — BROKEN on CHR"

Checking rule stats after this is in place:

/ip firewall mangle print stats

# CHAIN ACTION FLAGS BYTES PACKETS

# forward change-mss I 0 0 ← 'I' = INVALID, never matches

The rule accepts the configuration with no error at creation time — it just never actually clamps anything. Five different variations of the out-interface-based rule were tried against this specific combination (CHR + WireGuard interface + change-mss) before concluding it's a platform-specific limitation on RouterOS 7.x's CHR build, not a syntax mistake.

The Fix: Address-List-Based Clamping

Instead of matching on the outgoing interface, match on the source/destination address ranges that traverse the tunnel. First, build an address list of every WireGuard-connected subnet:

/ip firewall address-list add list=wg-subnets address=10.50.0.0/24

/ip firewall address-list add list=wg-subnets address=172.20.10.0/24

/ip firewall address-list add list=wg-subnets address=172.20.11.0/24

/ip firewall address-list add list=wg-subnets address=172.20.60.0/24

/ip firewall address-list add list=wg-subnets address=172.20.90.0/24

/ip firewall address-list add list=wg-subnets address=172.20.100.0/24

Then add two clamping rules — one for traffic originating from the tunnel, one for traffic destined to it — using src-address-list / dst-address-list instead of out-interface:

/ip firewall mangle add \

chain=forward action=change-mss new-mss=1372 passthrough=yes \

tcp-flags=syn protocol=tcp \

src-address-list=wg-subnets comment="MSS clamp WG src"

/ip firewall mangle add \

chain=forward action=change-mss new-mss=1372 passthrough=yes \

tcp-flags=syn protocol=tcp \

dst-address-list=wg-subnets comment="MSS clamp WG dst"

Same two rules, adapted with the relevant subnet list, on every other CHR router in the mesh.

Verifying It's Actually Working

/ip firewall mangle print stats

# CHAIN ACTION BYTES PACKETS

# forward change-mss 29,496 550 ← no 'I' flag, packets counting up

# forward change-mss 24,180 403

No I flag, and the packet counters climb as new TCP connections open through the tunnel. That's the confirmation the address-list approach is actually clamping traffic, where the interface-based version silently wasn't.

Physical vs CHR: Same Feature, Different Rule Shape

Physical MikroTikMikroTik CHR

Rule match methodout-interface=<wg-interface>Doesn't work — shows I flag

Working alternativeNot neededsrc-address-list / dst-address-list

Setup overheadTwo rulesAddress list + two rules

Works on both platforms?Address-list approach: yesAddress-list approach: yes

Given that the address-list method works identically on both physical and CHR routers, it's worth using it everywhere in a mixed fleet rather than maintaining two different rule styles depending on hardware type.

FAQ

Why does out-interface matching fail specifically on CHR?

It appears to be a platform-specific limitation in how RouterOS 7.x's CHR build resolves virtual WireGuard interfaces for mangle-rule interface matching — physical hardware doesn't show the same behavior. MikroTik hasn't published a root-cause explanation; the address-list workaround was arrived at empirically after the interface-based approach was confirmed non-functional through packet counters.

Does the address-list method have any downside compared to out-interface matching?

It requires maintaining the subnet list as the mesh grows — add a site, add its subnet to the list. In exchange, it works consistently across physical and CHR hardware, which in a mixed fleet is arguably simpler to maintain than two different rule patterns.

How do I know if my existing MSS rules have this bug right now?

Run /ip firewall mangle print stats and check the FLAGS column next to any change-mss rule. An I means it's never matching a single packet — check the byte/packet counters too; they'll be stuck at zero no matter how much TCP traffic crosses the tunnel.

MSS rules showing zero packets matched? This is exactly the kind of platform-specific gotcha that looks configured-correctly and isn't. We audit MikroTik firewall and VPN configs for exactly this class of silent failure. Talk to us.