<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — Block IP class if too many auth failures?]]></title>
		<link>http://www.iredmail.org/forum/topic344-block-ip-class-if-too-many-auth-failures.html</link>
		<atom:link href="http://www.iredmail.org/forum/feed-rss-topic344.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Block IP class if too many auth failures?.]]></description>
		<lastBuildDate>Mon, 19 Oct 2009 14:00:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1560.html#p1560</link>
			<description><![CDATA[<div class="quotebox"><cite>maxie_ro wrote:</cite><blockquote><p>But out of curiosity, what do you need a script for? To automate the process for the script which is run after the main CentOS installation?</p></blockquote></div><p>iRedMail is a set of shell scripts, each script is used to install and configure component automaticly. <img src="http://www.iredmail.org/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 19 Oct 2009 14:00:15 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1560.html#p1560</guid>
		</item>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1559.html#p1559</link>
			<description><![CDATA[<p>Let&#039;s just say I don&#039;t consider bash/sh scripting to be one of my strongest points...</p><p>But out of curiosity, what do you need a script for? To automate the process for the script which is run after the main CentOS installation?</p><p>P.S.</p><p>Forgot to say, but to check that shorewall is really working you should delete everything from /etc/sysconfig/iptales. Shorewall will send it&#039;s own rules, so I put the ones to allow SSH/POP/IMAP/SMTP/HTTP in it&#039;s own config file and cleared the iptables. Take care not to lock yourself out of your own server, this can happen very fast with shorewall.</p><p>Oh, and I setup my SSHD to listen on another port than 22, you will see than in the configs (13xx).</p>]]></description>
			<author><![CDATA[null@example.com (maxie_ro)]]></author>
			<pubDate>Mon, 19 Oct 2009 13:55:36 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1559.html#p1559</guid>
		</item>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1558.html#p1558</link>
			<description><![CDATA[<p>Got it. I will try to make it work for me first, and then try to integrate it as an optional components in iRedMail and iRedOS. Just be patient.</p><p>And if you are familar with Bash shell script, you can write script directly, so that we can have it in iRedMail/iRedOS quickly. <img src="http://www.iredmail.org/forum/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 19 Oct 2009 13:47:38 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1558.html#p1558</guid>
		</item>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1557.html#p1557</link>
			<description><![CDATA[<p>Oh, and something else:</p><p>I put the config for fail2ban to ban the IP after only 5 authentication failures, for 12 hours, no matter which is the source (ssh, sasl, postfix or roundcube). Some will find this too paranoid...</p>]]></description>
			<author><![CDATA[null@example.com (maxie_ro)]]></author>
			<pubDate>Mon, 19 Oct 2009 13:47:11 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1557.html#p1557</guid>
		</item>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1556.html#p1556</link>
			<description><![CDATA[<p>Of course. This is how I did it:</p><p>1. Get the EPEL package (epel-release-5-3.noarch.rpm) and install it for quick access to EPEL repo.</p><p>2. Install gamin-python, with dependencies (gamin itself, etc.).</p><p>3. Install shorewall from EPEL (better support for iptables then iptables command line itself).</p><p>4. Configure shorewall (enabled: yes, accept from outside only ssh/pop/smtp/imap, check the files).</p><p>5. Install fail2ban from EPEL.</p><p>6. Configure fail2ban to listen to 4 sources in 3 log files (one of which is Roundcube, but you need to patch it to work).</p><p>I will attach the config files in the zip.</p><p>What&#039;s in the zip:</p><p>/shorewall - should go in /etc/shorewall; mostly as in docs, but I added zone &quot;loop&quot; for loopback, ACCEPT ALL;<br />Allow only what&#039;s needed for incoming (LDAP is commented out cause I don&#039;t use it), everything else DROP<br />For outgoing, accept all.</p><p>/fail2ban - should go in /etc/fail2ban, in corresponding dirs<br />For the filter for postfix (from /var/log/maillog), I modifies the syntax to only ban in case of 5xx codes, *NOT* 4xx, otherwise I will accidentally ban everyone because of greylisting and other temporary errors <img src="http://www.iredmail.org/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /><br />For SASL I modified the syntax, the original one didn&#039;t work with iRedOS.<br />The syntax for SSHD is the same, but I include it because I modified the Jail.<br />The syntax for Roundcube is made by me, but caution: it won&#039;t work without <a href="http://www.roundcubeforum.net/requests/5639-imap-inc-patch.html">this patch</a> to roundcube 0.3-stable.</p><p>Have fun.</p>]]></description>
			<author><![CDATA[null@example.com (maxie_ro)]]></author>
			<pubDate>Mon, 19 Oct 2009 13:38:27 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1556.html#p1556</guid>
		</item>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1555.html#p1555</link>
			<description><![CDATA[<p>It&#039;s on my TODO list, but i don&#039;t have time to integrate it now.</p><p>Will you share you doc? so that i can easily integrate it into iRedMail/iRedOS <img src="http://www.iredmail.org/forum/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 19 Oct 2009 12:35:03 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1555.html#p1555</guid>
		</item>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1554.html#p1554</link>
			<description><![CDATA[<p>Thank you, this fail2ban is exactly what I needed. It works flawlessly. I also put a rule for roundcube log, and created a patch for roundcube to show IP for authentication failures, so I can get that too.</p><p>ZhangHuangbin, you should consider adding this to iRedOS. <img src="http://www.iredmail.org/forum/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[null@example.com (maxie_ro)]]></author>
			<pubDate>Mon, 19 Oct 2009 12:23:40 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1554.html#p1554</guid>
		</item>
		<item>
			<title><![CDATA[Re: Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1540.html#p1540</link>
			<description><![CDATA[<p>fail2ban can do that (and more: ssh ...)<br />For integration see <a href="http://www.fail2ban.org/wiki/index.php/Main_Page">http://www.fail2ban.org/wiki/index.php/Main_Page</a></p>]]></description>
			<author><![CDATA[null@example.com (peterpp)]]></author>
			<pubDate>Fri, 16 Oct 2009 22:15:12 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1540.html#p1540</guid>
		</item>
		<item>
			<title><![CDATA[Block IP class if too many auth failures?]]></title>
			<link>http://www.iredmail.org/forum/post1539.html#p1539</link>
			<description><![CDATA[<p>Hi.</p><p>Is there any way in iRedOS to block a class of IPs if too many SMTP/POP3/IMAP authentication failures from that class? I had today a lot of tries from one IP, probably to hyjack mail accounts... I saw the attacker trying all possible combinations of username, probably with a dictionary attack...</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (maxie_ro)]]></author>
			<pubDate>Fri, 16 Oct 2009 19:08:01 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post1539.html#p1539</guid>
		</item>
	</channel>
</rss>
