Skip to content

Instantly share code, notes, and snippets.

@chpwssn
Created June 18, 2019 03:31
Show Gist options
  • Save chpwssn/e2d963444f55767a66d9477a7f201df4 to your computer and use it in GitHub Desktop.
Save chpwssn/e2d963444f55767a66d9477a7f201df4 to your computer and use it in GitHub Desktop.
SACK mitigation
# Disable SACK
sudo sysctl -w net.ipv4.tcp_sack=0
# Drop connections with an MSS less than 500
sudo iptables -A INPUT -p tcp -m tcpmss --mss 1:500 -j DROP
# Validate, should return: net.ipv4.tcp_mtu_probing = 0
sysctl net.ipv4.tcp_mtu_probing
# Disable SACK
sysctl net.inet.tcp.sack.enable=0
# Disable SACK
sudo sysctl -w net.ipv4.tcp_sack=0
# Drop connections with an MSS less than 500
sudo iptables -A INPUT -p tcp -m tcpmss --mss 1:500 -j DROP
# Validate, should return: net.ipv4.tcp_mtu_probing = 0
sysctl net.ipv4.tcp_mtu_probing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment