I have two systems (A and B) on different subnets, with one dual-homed box (C) that can see both. I use iptables DNAT on C to port-forward SSH to B, so that A can run
ssh -p 12345 hostC to connect to B. This appears to work fine:
DNAT tcp -- anywhere anywhere tcp dpt:12345 to:hostB:22
However, when I try to scp a file from A to B, the connection stalls at exactly 2112KB. This number seems significant, but I couldn't find anyone who knows why. I saw this question and really got my hopes up, but no luck -- both the answers there didn't help.
Things I've tried:
net.ipv4.tcp_sack=0on all 3 machines
- Setting MTU on all interfaces on all machines to 1492
-l 1000to the scp command to slow it down
- running a second
scpof a smaller file to the same machine at the same time (sounds crazy but a coworker swore it would help)
Just to make sure I'm not crazy, I tried SCPing from C to B, and transfers of any size are totally fine. And just to be clear, though it "stalls", it will eventually finish the transfer, though at a rate of a few KB/s (even though these machines are all in the same room).