Skip to content

Instantly share code, notes, and snippets.

@rendoaw
Created June 4, 2015 03:55
Show Gist options
  • Save rendoaw/567cd345e97a99f98de0 to your computer and use it in GitHub Desktop.
Save rendoaw/567cd345e97a99f98de0 to your computer and use it in GitHub Desktop.
Linux TCP Keepalive
echo 3 > /proc/sys/net/ipv4/tcp_keepalive_probes
echo 10 > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time

cat /proc/sys/net/ipv4/tcp_keepalive_probes
cat /proc/sys/net/ipv4/tcp_keepalive_intvl
cat /proc/sys/net/ipv4/tcp_keepalive_time

sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_probes=3 net.ipv4.tcp_keepalive_intvl=10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment