Fix Slow SFTP/SCP File Upload Rate and Stalling caused by TCP SACK

In brief, sometimes a conflict occurs between some firewalls and the TCP SACK. In my case, the upload was severely affected and reached upload speeds of a few kilobytes over a LAN!

The following command disables TCP SACK and fixes the slow upload on all Ethernet cards:

sudo sysctl -w net.ipv4.tcp_sack=0

To make it permanent, edit /etc/sysctl.conf and add this line

net.ipv4.tcp_sack = 0

Then run:

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek
This entry was posted in Linux, Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

Leave a comment