Fixing window scaling problems with Linux TCP

Starting with the 2.6.17 (or there abouts) linux kernel, the default scale factor was increased. The downside of this is that there appear to be routers/firewalls/etc. that do not correctly deal with TCP Window Scaling (the rfc is only ~16 years old). If you have to traverse one of these devices then you need to turn off the window scaling or else things get real slow.

On a Redhat/Redhat like system the "fix" is to:

  /bin/cat <<'EOT'>>/etc/sysctl.conf

  # Turn off the tcp_window_scaling
  net.ipv4.tcp_window_scaling = 0
  EOT

  /sbin/sysctl -p