Rate limit for ipv6

This commit is contained in:
Bob Mottram 2018-01-13 20:18:58 +00:00
parent 1efce6f173
commit 06952d9137
1 changed files with 2 additions and 0 deletions

View File

@ -116,8 +116,10 @@ function mesh_hotspot_ip_address {
function global_rate_limit {
if ! grep -q "tcp_challenge_ack_limit" /etc/sysctl.conf; then
echo 'net.ipv4.tcp_challenge_ack_limit = 999999999' >> /etc/sysctl.conf
echo 'net.ipv6.tcp_challenge_ack_limit = 999999999' >> /etc/sysctl.conf
else
sed -i 's|net.ipv4.tcp_challenge_ack_limit.*|net.ipv4.tcp_challenge_ack_limit = 999999999|g' /etc/sysctl.conf
sed -i 's|net.ipv6.tcp_challenge_ack_limit.*|net.ipv6.tcp_challenge_ack_limit = 999999999|g' /etc/sysctl.conf
fi
sysctl -p -q
}