<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Iptables on jpterry.com</title><link>/tags/iptables/</link><description>Recent content in Iptables on jpterry.com</description><generator>Hugo</generator><language>en</language><copyright>© John Terry</copyright><lastBuildDate>Fri, 07 Feb 2014 15:24:46 +0000</lastBuildDate><atom:link href="/tags/iptables/index.xml" rel="self" type="application/rss+xml"/><item><title>iptables rule to limit tcp connections per ip address</title><link>/2014/02/07/iptables-rule-to-limit-tcp-connections-per-ip-address/</link><pubDate>Fri, 07 Feb 2014 15:24:46 +0000</pubDate><guid>/2014/02/07/iptables-rule-to-limit-tcp-connections-per-ip-address/</guid><description>&lt;p&gt;A vps hosting a service I maintain came under a DOS attack today. The malicious client was
opening as many tcp connections as they could. And
eventually the service would hit the ulimit of open file descriptors and
fail. Of course the service should be more resilient, but this iptables
rule solved the problem right away.&lt;/p&gt;
&lt;p&gt;It will block an individual IPv4 address from opening any more than 25
connections to the service port. It does so by sending a TCP reset when
the the client exceeds 25 connections.&lt;/p&gt;</description></item></channel></rss>