<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A bit of this, a bit of that &#187; IT</title>
	<atom:link href="http://gael.enix.org/tag/it/feed/" rel="self" type="application/rss+xml" />
	<link>http://gael.enix.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 24 Aug 2009 17:11:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fail2ban &#8211; Security tool</title>
		<link>http://gael.enix.org/2009/05/23/fail2ban-security-tool/</link>
		<comments>http://gael.enix.org/2009/05/23/fail2ban-security-tool/#comments</comments>
		<pubDate>Sat, 23 May 2009 22:35:41 +0000</pubDate>
		<dc:creator>Gael</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://gael.enix.org/wordpress/?p=20</guid>
		<description><![CDATA[A great tool to enhance your firewalling.
You probably all have a firewall such as IPTables on your server in order to restrict the access to some services like SSH, FTP or HTTP.
But what about the threat like scripts trying to enter your FTP with dumb login and password in order to access your server?
Would not [...]]]></description>
			<content:encoded><![CDATA[<p>A great tool to enhance your firewalling.</p>
<p>You probably all have a firewall such as IPTables on your server in order to restrict the access to some services like SSH, FTP or HTTP.</p>
<p>But what about the threat like scripts trying to enter your FTP with dumb login and password in order to access your server?</p>
<p>Would not it be nice to have a tool that read the secure log file, detect the failed attempts then adds a rule to your firewall for 5 minutes in order to ban all the traffic from this source?</p>
<p>This tool exists and is called <strong>Fail2Ban</strong>!</p>
<h3>How Fail2Ban work?</h3>
<p>Every time anyone tries to access your server through services like SSH or FTP, an entry is logged in the  log files</p>
<p>In the background Fail2Ban is monitoring this log file and when it detects too many password failures, it adds a DROP rule in IPTables for a defined amount of time to reject that IP address. After the 10 minutes, the rule is removed from the firewall automatically. And on top of that, it sends an email to the operation team.</p>
<p>Last but not least, as the script that launched the attack cannot access the service on your server as it is banned, it moves to another server. Basically an easier target to attack.</p>
<p>This tool is written in python, by a French guy: <a title="Fail2Ban website" href="http://www.fail2ban.org/" target="_blank">http://www.fail2ban.org</a></p>
<h3>Installation and configuration</h3>
<p>The installation is really simple as Fail2Ban is part of the rpmforge repository.</p>
<pre>yum install fail2ban</pre>
<p>Then, you need to update the configuration  The configuration file is located here: /etc/fail2ban/jail.conf</p>
<p>In this file, you will find several settings, the most important options are:</p>
<pre>ignoreip: you have to specify the IP from your network that fail2ban will never ban as they are part of the trusted network.

bantime: how long you want the attacker to be banned</pre>
<p>Then you will define the rule that inspect the log file.</p>
<pre>[ssh-iptables]

enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
           sendmail-whois[name=SSH, dest=ops@my.company.com, sender=fail2ban-my.server@my.company.com]
# logpath  = /var/log/messages
logpath = /var/log/secure
maxretry = 5</pre>
<p>Some comments about those configuration options.</p>
<ul>
<li>ssh-iptables defines  the beginning of a configuration block. The rule will be named: fail2ban-SSH</li>
<li>enabled defines if the rule will be loaded when Fail2Ban starts</li>
<li>filter: that  is the search filter for the secure log file</li>
<li>action: it defines the action to take if a condition is true.</li>
<li>logpath: it defines the log file to read in order to ban attackers</li>
<li>maxretry: it defines the number of time an attacker fails to enter the system.</li>
</ul>
<p>Once you are done with the configuration, you can start the service</p>
<pre>/etc/init.d/iptables start</pre>
<p>And add it to the service which start when the server boots.</p>
<pre>chkconfig fail2ban on</pre>
<p>Now you are all done, you have a server configured to block SSH attempts and it will survive a reboot as it will start automatically. I am really interesting in reading your feed back about the article. So do not hesitate to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://gael.enix.org/2009/05/23/fail2ban-security-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good bye Multimap &#8230; Welcome MS &#8230;</title>
		<link>http://gael.enix.org/2008/04/23/6/</link>
		<comments>http://gael.enix.org/2008/04/23/6/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 22:11:40 +0000</pubDate>
		<dc:creator>Gael</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Multimap]]></category>

		<guid isPermaLink="false">http://gael.enix.org/wordpress/?p=6</guid>
		<description><![CDATA[Today, it was the day when the Multimap network went down &#8230;
And MS migrates us to corpnet&#8230; They gave us new laptop and new bags. Well the laptop has great specs but it is too heavy and the bottom line, I think it is crap.
But the bags are really nice! These are courier bags &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Today, it was the day when the Multimap network went down &#8230;</p>
<p>And MS migrates us to corpnet&#8230; They gave us new laptop and new bags. Well the laptop has great specs but it is too heavy and the bottom line, I think it is crap.</p>
<p>But the bags are really nice! These are courier bags &#8211; Timbuk2 &#8211; and really nice! Imagine a crumpler but nicer!</p>
<p>So the laptop is not so nice but the bag is!</p>
<p>We had nice cards with our face on it to access the office as MS loves security &#8230;</p>
<p>And that&#8217;s pretty much it!</p>
]]></content:encoded>
			<wfw:commentRss>http://gael.enix.org/2008/04/23/6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
