mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
ddos: set net.ipv4.tcp_syncookies to 1
set tcp_syncookies to 1 alone with iptables SYNPROXY module reduce latency, this improves situation when XDP acceleration is not enabled and just let iptables SYNPROXY handles SYN flood attack, see [0] [0]: https://bugzilla.kernel.org/show_bug.cgi?id=219500 Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@@ -53,7 +53,7 @@ get_ports () {
|
||||
}
|
||||
|
||||
load_syncookie () {
|
||||
sysctl -w net.ipv4.tcp_syncookies=2
|
||||
sysctl -w net.ipv4.tcp_syncookies=1
|
||||
sysctl -w net.ipv4.tcp_timestamps=1
|
||||
sysctl -w net.netfilter.nf_conntrack_tcp_loose=0
|
||||
/usr/sbin/xdp-loader status red0 | grep 'syncookie_xdp'
|
||||
|
||||
Reference in New Issue
Block a user