How do I restrict the number of connections used by a single IP address to my server for port 80 and 25 using iptables? You need to use the iptables connlimit module which allows you to restrict the number of parallel TCP connections to a server per client IP address (or address block). You can use domain controller to This is useful to protect your server or vps box against flooding, spamming or content scraping. Syntax The syntax is as follows: /sbin/iptables -A INPUT -p tcp --syn --dport $port -m connlimit --connlimit-above N -j REJECT --reject-with tcp-reset # save the changes see iptables-save man page, the following is redhat and friends specific command service iptables save Example: Limit SSH Connections Per IP / Host Only allow 3 ssg connections per client host: /sbin/iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 3 -j REJECT # save the changes see iptables-save man page, the following is redhat and friends specific co...