You can create an ipset. This way you can add as many IPs to the set as you need without modifying the iptables ruleset. Ipset -N myset iphashipset -A myset 1.1.1.1ipset -A myset 2.2.2.2Or, in your case, use the output of your script, and read it with something like: while read a; do ipset -A myset '$a'; done.
![Script Linux Count Netstat And Limit Tcp Connections Iptables Dos Attack Script Linux Count Netstat And Limit Tcp Connections Iptables Dos Attack](http://2.bp.blogspot.com/-Ihbz8a6B6H0/U5KAVnpm2fI/AAAAAAAAAuk/O8Nl0T02ECc/s1600/ddos_netstat.jpg)
Feb 9, 2010 - How do I restrict the number of connections used by a single IP. To restrict the number of parallel TCP connections to a server per client IP address (or address block). To port 80 within 100 seconds (add rules to your iptables shell script). It's Good, but some of DDos Attack Can Bypass This Rule or it's.