IPsec site-to-site: SMB copies hang after ~2 MB transferred — TCP window scaling vs firewall
Environment
Two-office IPsec tunnel (openswan/strongSwan on Linux 5.15 hosts), Windows 10 clients on remote LAN, SMB file shares hosted on a Samba server (Debian 11) inside Site A.
Symptoms
Large SMB file copies from Site B to Site A succeed for small files but stall partway: transfers stop progressing after ~2.0–2.4 MB and never complete; subsequent attempts either hang or drop the TCP connection after a long timeout.
Observations
ICMP (ping, traceroute) across the tunnel is stable with ~40 ms latency. Small TCP operations (SSH sessions, small HTTP downloads <1 MB) work fine. Wireshark capture on the Samba server shows a burst of packets then the remote TCP sender retransmits and stalls; the server's TCP window does not advance. TCP options show window scaling enabled. The IPsec tunnel MTU is 1400 on both ends. Disabling TCP window scaling on the Samba host (sysctl net.ipv4.tcp_window_scaling=0) temporarily allows the same large file transfer to complete, but this is not an acceptable permanent workaround.
Already attempted
Verified tunnel settings and re-established with rekey; increased IPsec MTU to 1420 on firewall (no change); toggled TCP autotuning on Samba host; swapped packet offload settings (ethtool -K) on the Linux host (GSO/TSO) — disabling GSO reduced the number of retransmits but did not fully fix; tried copying same file locally and over a non-VPN path successfully.
Question
What are the likely root causes for large TCP transfers stalling only across the IPsec tunnel, and what reversible diagnostic steps can identify whether this is PMTUD/MTU fragmentation, TCP window scaling interaction, or firewall/NAT path altering TCP options? What mitigation steps avoid disabling window scaling in production?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags