Привет всем! Прошу помощи и совета. Есть Nat/маршрутизатор на Debian. Почти каждый день сервер в разное время ложится в полку по cpu, через некоторое время 10-50мин. его попускает. perf top выявил в этот момент nf_conntrack_tuple_taken 100%.
Проц i7-7700. Сетевая Intel I350-t4
Заранее спасибо за любые советы.
# iptables-save
# Generated by iptables-save v1.6.0 on Thu Oct 26 20:20:05 2017
*mangle
:PREROUTING ACCEPT [8049016415:5035799096738]
:INPUT ACCEPT [20556383:1399056353]
:FORWARD ACCEPT [8010527052:5033150314691]
:OUTPUT ACCEPT [5970982:315886365]
:POSTROUTING ACCEPT [8011579861:5033182613315]
:balance - [0:0]
:new_conn - [0:0]
-A PREROUTING -m conntrack --ctstate NEW -j new_conn
-A PREROUTING -j CONNMARK --restore-mark --nfmask 0xffffffff --ctmask 0xffffffff
-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
-A balance -m statistic --mode random --probability 0.50000000000 -j SET --add-set vlan2000 src
-A balance -m set --match-set uplink_list src -j RETURN
-A balance -m statistic --mode random --probability 1.00000000000 -j SET --add-set vlan2001 src
-A new_conn -m set --match-set ip_pools src -m set ! --match-set uplink_list src -j balance
-A new_conn -m set --match-set vlan2000 src -j CONNMARK --set-xmark 0x1/0xffffffff
-A new_conn -m set --match-set vlan2001 src -j CONNMARK --set-xmark 0x2/0xffffffff
-A new_conn -m set --match-set vlan2000 src -j SET --add-set vlan2000 src --exist
-A new_conn -m set --match-set vlan2001 src -j SET --add-set vlan2001 src --exist
COMMIT
# Completed on Thu Oct 26 20:20:05 2017
# Generated by iptables-save v1.6.0 on Thu Oct 26 20:20:05 2017
*filter
:INPUT DROP [19591862:1326290389]
:FORWARD ACCEPT [8005609010:5032866794927]
:OUTPUT ACCEPT [5970955:315883993]
:input_check - [0:0]
:input_new - [0:0]
-A INPUT -m conntrack --ctstate INVALID -j DROP
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate NEW -j input_new
-A FORWARD -p tcp -m set --match-set blacklist dst -j REJECT --reject-with tcp-reset
-A FORWARD -m set --match-set blacklist dst -j REJECT --reject-with icmp-port-unreachable
-A input_check -m recent --update --seconds 600 --hitcount 3 --name DEFAULT --mask 255.255.255.255 --rsource -j LOG --log-prefix "iptables INPUT bruteforce: "
-A input_check -m recent --update --seconds 600 --hitcount 3 --name DEFAULT --mask 255.255.255.255 --rsource -j DROP
-A input_check -m recent --set --name DEFAULT --mask 255.255.255.255 --rsource -j ACCEPT
-A input_new -p tcp -m tcp --dport 62222 -j input_check
-A input_new -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A input_new -m set --match-set input_src src -j ACCEPT
COMMIT
# Completed on Thu Oct 26 20:20:05 2017
# Generated by iptables-save v1.6.0 on Thu Oct 26 20:20:05 2017
*nat
:PREROUTING ACCEPT [731335048:51842951878]
:INPUT ACCEPT [19609:2145677]
:OUTPUT ACCEPT [112016:5944261]
:POSTROUTING ACCEPT [4985233:199144045]
:dnat_post - [0:0]
:dnat_pre - [0:0]
-A PREROUTING -d x.x.x.x -m set --match-set dnat_ports dst -j dnat_pre
-A OUTPUT -d x.x.x.x -m set --match-set dnat_ports dst -j dnat_pre
-A POSTROUTING -m set --match-set ip_pools src -m set --match-set dnat_ports dst -j dnat_post
-A POSTROUTING -o vlan2001 -j SNAT --to-source x.x.x.x-x.x.x.x --persistent
-A POSTROUTING -o vlan2000 -j SNAT --to-source x.x.x.x-x.x.x.x --persistent
-A dnat_post -d 172.19.0.1/32 -p udp -m multiport --dports 80,443 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 172.19.0.1/32 -p tcp -m multiport --dports 80,443 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.194.123.7/32 -p tcp -m multiport --dports 6036,6037,6038,6039 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.194.126.9/32 -p tcp -m multiport --dports 50001,50002 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.10/32 -p tcp -m multiport --dports 50004,50005 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.166/32 -p tcp -m multiport --dports 50006,50007 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.166/32 -p udp -m multiport --dports 50006,50007 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.156/32 -p tcp -m multiport --dports 50008,50029 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.41/32 -p tcp -m multiport --dports 50009,50010,50012 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.41/32 -p tcp -m multiport --dports 80 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.180/32 -p tcp -m multiport --dports 50014,50015,50050 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.130/32 -p tcp -m multiport --dports 50016,50017,50025 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.181/32 -p tcp -m multiport --dports 50027,50028 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.194.126.7/32 -p tcp -m multiport --dports 50029,50030,50031,50032 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.216/32 -p tcp -m multiport --dports 50033,50034,50035,50036 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.1.223/32 -p tcp -m multiport --dports 50037,50038 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.1.253/32 -p tcp -m multiport --dports 50039,50040,50041,50042,50043,50044,50045,50046,50047,50048,50049 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.2.8/32 -p tcp -m multiport --dports 50050,50051,50054 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.2.9/32 -p tcp -m multiport --dports 50052,50053 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.1.2/32 -p tcp -m multiport --dports 50055,50056,50057,50058,50059,50060,50061,50062,50063,50064,50065 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 172.20.0.100/32 -p tcp -m multiport --dports 80 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 172.20.0.101/32 -p tcp -m multiport --dports 80 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 172.20.0.102/32 -p tcp -m multiport --dports 80 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 172.20.0.103/32 -p tcp -m multiport --dports 80 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 172.20.0.104/32 -p tcp -m multiport --dports 80 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.193.0.244/32 -p tcp -m multiport --dports 60001,60002,60003 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.194.130.5/32 -p tcp -m multiport --dports 50100:50200 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.194.129.17/32 -p tcp -m multiport --dports 50203:50213 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.194.101.97/32 -p tcp -m multiport --dports 25565,25567,25568,30000,30001,50069:50099,4254:4258 -j SNAT --to-source 172.19.0.6
-A dnat_post -d 10.194.101.97/32 -p udp -m multiport --dports 25565,25567,25568,30000,30001,50069:50099,4254:4258 -j SNAT --to-source 172.19.0.6
-A dnat_pre -p tcp -m multiport --dports 80,443 -j DNAT --to-destination 172.19.0.1
-A dnat_pre -p udp -m multiport --dports 80,443 -j DNAT --to-destination 172.19.0.1
-A dnat_pre -p tcp -m multiport --dports 6036,6037,6038,6039 -j DNAT --to-destination 10.194.123.7
-A dnat_pre -p tcp -m multiport --dports 50001,50002 -j DNAT --to-destination 10.194.126.9
-A dnat_pre -p tcp -m multiport --dports 50004,50005 -j DNAT --to-destination 10.193.0.10
-A dnat_pre -p tcp -m multiport --dports 50006,50007 -j DNAT --to-destination 10.193.0.166
-A dnat_pre -p udp -m multiport --dports 50006,50007 -j DNAT --to-destination 10.193.0.166
-A dnat_pre -p tcp -m multiport --dports 50008,50029 -j DNAT --to-destination 10.193.0.156
-A dnat_pre -p tcp -m multiport --dports 50009,50010,50012 -j DNAT --to-destination 10.193.0.41
-A dnat_pre -p tcp -m multiport --dports 50013 -j DNAT --to-destination 10.193.0.41:80
-A dnat_pre -p tcp -m multiport --dports 50014,50015,50050 -j DNAT --to-destination 10.193.0.180
-A dnat_pre -p tcp -m multiport --dports 50016,50017,50025 -j DNAT --to-destination 10.193.0.130
-A dnat_pre -p tcp -m multiport --dports 50027,50028 -j DNAT --to-destination 10.193.0.181
-A dnat_pre -p tcp -m multiport --dports 50029,50030,50031,50032 -j DNAT --to-destination 10.194.126.7
-A dnat_pre -p tcp -m multiport --dports 50033,50034,50035,50036 -j DNAT --to-destination 10.193.0.216
-A dnat_pre -p tcp -m multiport --dports 50037,50038 -j DNAT --to-destination 10.193.1.223
-A dnat_pre -p tcp -m multiport --dports 50039,50040,50041,50042,50043,50044,50045,50046,50047,50048,50049 -j DNAT --to-destination 10.193.1.253
-A dnat_pre -p tcp -m multiport --dports 50050,50051,50054 -j DNAT --to-destination 10.193.2.8
-A dnat_pre -p tcp -m multiport --dports 50052,50053 -j DNAT --to-destination 10.193.2.9
-A dnat_pre -p tcp -m multiport --dports 50055,50056,50057,50058,50059,50060,50061,50062,50063,50064,50065 -j DNAT --to-destination 10.193.1.2
-A dnat_pre -p tcp -m multiport --dports 50066 -j DNAT --to-destination 172.20.0.101:80
-A dnat_pre -p tcp -m multiport --dports 50067 -j DNAT --to-destination 172.20.0.102:80
-A dnat_pre -p tcp -m multiport --dports 50068 -j DNAT --to-destination 172.20.0.103:80
-A dnat_pre -p tcp -m multiport --dports 50201 -j DNAT --to-destination 172.20.0.104:80
-A dnat_pre -p tcp -m multiport --dports 50202 -j DNAT --to-destination 172.20.0.100:80
-A dnat_pre -p tcp -m multiport --dports 60001,60002,60003 -j DNAT --to-destination 10.193.0.244
-A dnat_pre -p tcp -m multiport --dports 50100:50200 -j DNAT --to-destination 10.194.130.5
-A dnat_pre -p tcp -m multiport --dports 50203:50213 -j DNAT --to-destination 10.194.129.17
-A dnat_pre -p tcp -m multiport --dports 25565,25567,25568,30000,30001,50069:50099,4254:4258 -j DNAT --to-destination 10.194.101.97
-A dnat_pre -p udp -m multiport --dports 25565,25567,25568,30000,30001,50069:50099,4254:4258 -j DNAT --to-destination 10.194.101.97
COMMIT
# Completed on Thu Oct 26 20:20:05 2017