Rate limit for ipv6
This commit is contained in:
parent
1efce6f173
commit
06952d9137
|
@ -116,8 +116,10 @@ function mesh_hotspot_ip_address {
|
||||||
function global_rate_limit {
|
function global_rate_limit {
|
||||||
if ! grep -q "tcp_challenge_ack_limit" /etc/sysctl.conf; then
|
if ! grep -q "tcp_challenge_ack_limit" /etc/sysctl.conf; then
|
||||||
echo 'net.ipv4.tcp_challenge_ack_limit = 999999999' >> /etc/sysctl.conf
|
echo 'net.ipv4.tcp_challenge_ack_limit = 999999999' >> /etc/sysctl.conf
|
||||||
|
echo 'net.ipv6.tcp_challenge_ack_limit = 999999999' >> /etc/sysctl.conf
|
||||||
else
|
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.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
|
fi
|
||||||
sysctl -p -q
|
sysctl -p -q
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue