Идет атака на сервер сином, сервер начинает зависать, kworker грузит проц. Вот логи tcpdump во время атаки:
15:10:16.134852 IP 173.181.212.157.37390 > myip.89: Flags [S], seq 3047489536, win 0, length 0
15:10:16.134854 IP myip.89 > 173.181.212.157.37390: Flags [S.], seq 4283190269, ack 3047489537, win 0, length 0
15:10:16.134855 IP 119.196.211.172.43315 > myip.89: Flags [S], seq 844103680, win 0, length 0
15:10:16.134858 IP myip.89 > 119.196.211.172.43315: Flags [S.], seq 641131557, ack 844103681, win 0, length 0
15:10:16.134858 IP 17.123.43.91.46507 > myip.89: Flags [S], seq 2174025728, win 0, length 0
15:10:16.134861 IP myip.89 > 17.123.43.91.46507: Flags [S.], seq 820203671, ack 2174025729, win 0, length 0
15:10:16.134862 IP 31.90.208.59.64993 > myip.89: Flags [S], seq 3345285120, win 0, length 0
15:10:16.134864 IP myip.89 > 31.90.208.59.64993: Flags [S.], seq 2314162753, ack 3345285121, win 0, length 0
15:10:16.134865 IP 52.161.206.3.28380 > myip.89: Flags [S], seq 2879717376, win 0, length 0
15:10:16.134867 IP myip.89 > 52.161.206.3.28380: Flags [S.], seq 2266352682, ack 2879717377, win 0, length 0
15:10:16.134870 IP 120.74.122.187.12031 > myip.89: Flags [S], seq 1280507904, win 0, length 0
15:10:16.134873 IP myip.89 > 120.74.122.187.12031: Flags [S.], seq 1018383813, ack 1280507905, win 0, length 0
15:10:16.134873 IP 138.222.98.218.13210 > myip.89: Flags [S], seq 2263089152, win 0, length 0
15:10:16.134876 IP myip.89 > 138.222.98.218.13210: Flags [S.], seq 3403129284, ack 2263089153, win 0, length 0
15:10:16.134913 IP 5.255.32.87.34922 > myip.89: Flags [S], seq 3228368896, win 0, length 0
15:10:16.134916 IP myip.89 > 5.255.32.87.34922: Flags [S.], seq 2378954367, ack 3228368897, win 0, length 0
15:10:16.134917 IP 64.143.12.124.50899 > myip.89: Flags [S], seq 2605383680, win 0, length 0
15:10:16.134919 IP myip.89 > 64.143.12.124.50899: Flags [S.], seq 1478185173, ack 2605383681, win 0, length 0
15:10:16.134920 IP 81.184.250.227.5977 > myip.89: Flags [S], seq 1985871872, win 0, length 0
15:10:16.134922 IP myip.89 > 81.184.250.227.5977: Flags [S.], seq 2383571245, ack 1985871873, win 0, length 0
...
Стоит синпрокси
iptables -t raw -A PREROUTING -p tcp -m tcp --syn -j CT --notrack
iptables -A INPUT -p tcp -m tcp -m conntrack --ctstate INVALID,UNTRACKED -j SYNPROXY --sack-perm --timestamp --wscale 7 --mss 1460
iptables -A INPUT -p tcp -m tcp -m conntrack --ctstate INVALID -j DROP
И вот сусктл
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.tcp_orphan_retries = 0
net.netfilter.nf_conntrack_tcp_loose = 0
net.ipv4.netfilter.ip_conntrack_max = 2000000
net.ipv4.icmp_echo_ignore_all = 1
kernel.shmmni = 81928
kernel.shmall = 16777216
kernel.sem = 250 1024000 32 8192
kernel.msgmni = 32768
kernel.msgmax = 65536
kernel.msgmnb = 65536
net.ipv4.conf.all.log_martians = 0
net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv = 20
net.ipv4.netfilter.ip_conntrack_tcp_timeout_last_ack = 30
net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 120
### ipv6 settings (no autoconfiguration)
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
### my test values
vm.swappiness = 10
vm.vfs_cache_pressure = 1000
vm.dirty_background_ratio = 10
vm.dirty_ratio = 40
vm.dirty_writeback_centisecs = 15000
kernel.printk = 4 4 1 7
kernel.panic = 10
kernel.sysrq = 0
kernel.shmmax = 4294967296
kernel.shmall = 4194304
kernel.msgmnb = 65536
kernel.msgmax = 65536
#vm.swappiness = 20
#vm.dirty_ratio = 80
#vm.dirty_background_ratio = 5
fs.file-max = 2097152
net.core.netdev_max_backlog = 262144
net.core.rmem_default = 31457280
net.core.rmem_max = 67108864
net.core.wmem_default = 31457280
net.core.wmem_max = 67108864
net.core.somaxconn = 65535
net.core.optmem_max = 25165824
net.ipv4.neigh.default.gc_thresh1 = 4096
net.ipv4.neigh.default.gc_thresh2 = 8192
net.ipv4.neigh.default.gc_thresh3 = 16384
net.ipv4.neigh.default.gc_interval = 5
net.ipv4.neigh.default.gc_stale_time = 120
net.netfilter.nf_conntrack_max = 10000000
net.netfilter.nf_conntrack_tcp_loose = 0
net.netfilter.nf_conntrack_tcp_timeout_established = 1800
net.netfilter.nf_conntrack_tcp_timeout_close = 10
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 10
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 20
net.netfilter.nf_conntrack_tcp_timeout_last_ack = 20
net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 20
net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 20
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 10
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.ip_no_pmtu_disc = 1
net.ipv4.route.flush = 1
net.ipv4.route.max_size = 8048576
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
# was cubic
net.ipv4.tcp_congestion_control = htcp
net.ipv4.tcp_mem = 65536 131072 262144
net.ipv4.udp_mem = 65536 131072 262144
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 4096 87380 33554432
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 0
# was 0, lags?
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_max_orphans = 400000
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_max_syn_backlog = 16384
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_ecn = 2
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_intvl = 60
net.ipv4.tcp_keepalive_probes = 10
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.ip_forward = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.rp_filter = 1
Подскажите как отбить :(