なお、iptablesの使い方は、ここ(iptablesの使い方)を参照してください。 2 環境. VMware Workstation 14 Player上の仮想マシンを使いました。 サーバ(server)側でiptables-extensionsを使用します。 IPアドレス、MACアドレスは以下のとおりです。
iptables -A INPUT -s 192.186.0.0/24 -p tcp --syn -m connlimit --connlimit-above 15 -j DROP #为了防止DOS太多连接进来,那么可以允许最多15个初始连接,超过的丢弃 iptables -A INPUT -p icmp -m limit --limit 3/s -j LOG --log-level INFO --log-prefix "ICMP packet IN: " May 31, 2019 · iptables: v1.4.21 My answer: It’s not surprising you are having a performance issue, since you’re now asking the system to spend a lot of time counting connections to determine if there are more than an arbitrary number of them, and it has to do this on every new request.