SSH sessions and long TCP transfers hang after enabling TCP window scaling on edge Linux router
Environment
Edge Linux router (custom distro, kernel 5.x) sitting between LAN and ISP modem. net.ipv4.tcp_window_scaling was enabled system-wide via sysctl. Clients are Linux/macOS machines running OpenSSH; transfers use scp/rsync over SSH.
Symptoms
Interactive SSH sessions become unresponsive during large file transfers or extended output; transfers stall mid-stream with zero progress but pings remain responsive. Short commands complete. Bypassing the router or disabling window scaling immediately restores normal behavior.
Observations
tcpdump captured repeated zero-window or window-probe packets on affected flows during stalls. Changing TCP offload settings (TSO/GSO) on the router had no effect. Disabling net.ipv4.tcp_window_scaling=0 on the router immediately removed stalls for test clients. Directly connecting the client to the ISP modem (bypassing router) also avoided the issue.
Already attempted
Disabled TCP offloads with ethtool on the router, toggled tcp_mtu_probing, updated router kernel packages, and restarted network stacks. Each change failed to resolve stalls until window scaling was disabled. Collected packet traces for analysis.
Question
Why does enabling TCP window scaling on the router cause SSH sessions and long TCP transfers to hang, and what is a safe, reversible mitigation that preserves throughput for other traffic?
Verified community troubleshooting
First, confirm it's window scaling by disabling it on the router: sudo sysctl -w net.ipv4.tcp_window_scaling=0. If that immediately fixes SSH hangs, capture tcpdump on both WAN and LAN sides to show zero-window probes and option negotiation so you can present evidence to your ISP or vendor. As a safe, reversible mitigation keep scaling off until you can put the ISP modem into bridge mode or update the modem/router firmware. When vendor patches arrive, re-enable scaling and retest; roll back if stalls return.
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Networking25% match
Edge Linux router drops long-lived TCP uploads after conntrack table thrash under heavy NAT load
Solved1 answer - Networking25% match
Clients time out to IPv4-only sites after enabling DNS64/NAT64 on OpenWrt router (intermittent synthesis failures)
Open0 answers - Networking23% match
IPsec site-to-site: SMB copies hang after ~2 MB transferred — TCP window scaling vs firewall
Open0 answers - Networking21% match
Long‑lived TCP transfers stall after enabling hardware NAT offload on edge firewall
Open1 answer - Linux20% match
Linux kernel logs NETDEV WATCHDOG and igb driver drops packets after enabling GRO on high-throughput gateway
Open1 answer