<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=384794&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / proftpd log mal pour fail2ban [résolu]]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=384794</link>
		<description><![CDATA[Les sujets les plus récents dans proftpd log mal pour fail2ban [résolu].]]></description>
		<lastBuildDate>Tue, 05 Feb 2013 19:11:55 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  proftpd log mal pour fail2ban [résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12477271#p12477271</link>
			<description><![CDATA[<p>Vous trouverez la réponse <a href="http://www.markasread.fr/proftpd-fail2ban-locales">ici</a>.<br />C&#039;est un problème de date en Français alors que Fail2ban le veut en anglais.</p>]]></description>
			<author><![CDATA[dummy@example.com (PatriceJ)]]></author>
			<pubDate>Tue, 05 Feb 2013 19:11:55 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12477271#p12477271</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  proftpd log mal pour fail2ban [résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3704714#p3704714</link>
			<description><![CDATA[<p>Je rencontre actuellement le même problème, j&#039;ai mis en place une solution similaire à celle de 2F en éditant le fichier /etc/init.d/proftpd et en modifiant la ligne (81 chez moi)</p><div class="codebox"><pre><code>start-stop-daemon --start --quiet --pidfile &quot;$PIDFILE&quot; --oknodo --exec $DAEMON -- $OPTIONS</code></pre></div><p>par </p><div class="codebox"><pre><code>export LANG=&quot;en_US.UTF-8&quot; &amp;&amp; start-stop-daemon --start --quiet --pidfile &quot;$PIDFILE&quot; --oknodo --exec $DAEMON -- $OPTIONS</code></pre></div><p>C&#039;est quand même dommage de se priver de la protection de fail2ban juste pour une date francisée dans le log...</p>]]></description>
			<author><![CDATA[dummy@example.com (mika23)]]></author>
			<pubDate>Fri, 03 Sep 2010 07:37:34 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3704714#p3704714</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  proftpd log mal pour fail2ban [résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3655167#p3655167</link>
			<description><![CDATA[<p>Salut, </p><p>Je sais que je déterre un post &quot;résolu&quot; ; mais perso, j&#039;ai pas trop compris la manoeuvre... </p><p>Je me retrouve exactement avec le même problème.<br />Mais LOG de ProFTP sont en &quot;Franglais&quot; :</p><div class="codebox"><pre><code>aoû 09 18:48:57 myhost proftpd[17654] myhost.mydomain.tld (192.168.10.210[192.168.10.210]): no such user &#039;demo&#039;
aoû 09 18:48:57 myhost proftpd[17654] myhost.mydomain.tld (192.168.10.210[192.168.10.210]): USER demo: no such user found from 192.168.10.210 [192.168.10.210] to 192.168.10.220:21
aoû 09 19:55:00 myhost proftpd[17809] myhost.mydomain.tld (192.168.10.210[192.168.10.210]): USER demo (Login failed): No such user found.</code></pre></div><p>On voit bien la date en français et le log en anglais ; du coup ma Regex est foireuse.</p><p>Après modification de la regex de fail2ban, il me détecte bien les entrées:</p><div class="codebox"><pre><code>fail2ban-regex /var/log/proftpd/proftpd.log /etc/fail2ban/filter.d/proftpd.conf 

Running tests
=============

Use regex file : /etc/fail2ban/filter.d/proftpd.conf
Use log file   : /var/log/proftpd/proftpd.log

Found a match for &#039; hiposprod proftpd[10713] hiposprod.hipos.tv (192.168.10.23[192.168.10.23]): USER demo (Login failed): No such user found.
&#039; but no valid date/time found for &#039;aoû 11 14:45:29&#039;. Please contact the author in order to get support for this format

Results
=======

Failregex
|- Regular expressions:
|  [1] \(\S+\[&lt;HOST&gt;\]\)[: -]+ USER \S+: no such user found from \S+ \[\S+\] to \S+:\S+$
|  [2] \(\S+\[&lt;HOST&gt;\]\)[: -]+ USER \S+ \(Login failed\): Incorrect password\.$
|  [3] \(\S+\[&lt;HOST&gt;\]\)[: -]+ SECURITY VIOLATION: \S+ login attempted\.$
|  [4] \(\S+\[&lt;HOST&gt;\]\)[: -]+ Maximum login attempts \(\d+\) exceeded$
|  [5] \(\S+\[&lt;HOST&gt;\]\)[: -]+ USER \S+ \(Login failed\): No such user found\.$
|
`- Number of matches:
   [1] 0 match(es)
   [2] 0 match(es)
   [3] 0 match(es)
   [4] 0 match(es)
   [5] 0 match(es)</code></pre></div><p>Si j&#039;ai bien compris, il ne détecte pas correctement la date !?</p><p>Quelqu&#039;un a une idée, solution ? </p><p>Merci</p>]]></description>
			<author><![CDATA[dummy@example.com (Akarun)]]></author>
			<pubDate>Wed, 11 Aug 2010 13:06:22 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3655167#p3655167</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  proftpd log mal pour fail2ban [résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3368078#p3368078</link>
			<description><![CDATA[<p>apres presqu&#039;un mois tranquille, suite à redémarrage, proftpd log à nouveau avec la date en francais.<br />j&#039;ai essayé de mettre dans proftpd.conf<br />logformat&#160; ....%{format}t&#160; &#160;au lieu de %t<br />j&#039;ai aussi essayé de déplacer les logs comme ca avait fonctionner avant mais rien n&#039;y fait !!! pourquoi ce truc log en francais. et pourquoi fail2ban ne sait pas le résoudre.<br />bizarre, ca correspond au changement d&#039;heure, une histoire de gmt machin...suis je le seul ?</p><p>merci aux as du regex ou aux as du fuseau horaire et de la faille spatio-temporelle française</p><p>edit : j&#039;a aussi essayé &quot;timesGMT on&quot;&#160; mais sans succès. molière me poursuit<br />j&#039;ai essayé le mod_lang.c, le export lang et plein de choses<br />La seule solution, pas très propre que j&#039;ai trouvé et qui focntionne c&#039;est de le lancer avec :</p><div class="codebox"><pre><code>export LANG=&quot;en_US.UTF-8&quot; &amp;&amp; sudo service proftpd restart</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (2F)]]></author>
			<pubDate>Sun, 28 Mar 2010 19:54:29 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3368078#p3368078</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  proftpd log mal pour fail2ban [résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3342113#p3342113</link>
			<description><![CDATA[<p>Suis je le seul dans ce cas? <img src="http://forum.ubuntu-fr.org/img/smilies/neutral.png" width="15" height="15" alt="neutral" /></p><p>edit : non résolu, j&#039;avais pour des raisons de fénéantise, dirigé les logs de proftpd dans auth.log<br />en les remettant dans proftpd/proftpd.log. ca a marché jusquà aujourd&#039;hui date du changement d&#039;heure ?? <img src="http://forum.ubuntu-fr.org/img/smilies/sad.png" width="15" height="15" alt="sad" /></p>]]></description>
			<author><![CDATA[dummy@example.com (2F)]]></author>
			<pubDate>Tue, 16 Mar 2010 11:44:36 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3342113#p3342113</guid>
		</item>
		<item>
			<title><![CDATA[proftpd log mal pour fail2ban [résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3340824#p3340824</link>
			<description><![CDATA[<p>Bonjour,<br />j&#039;ai rien trouvé de probant...<br />j&#039;ai proftpd et fail2ban, le probleme c&#039;est que proftpd à l&#039;air de faire les logs en francais et surtout avec 4 lettres pour le mois contraierement à 3 qui semble être la règle. Du coup fail2ban me mets date/time invalid et ne veut pas agir.<br />quelques détails :<br />un exemple de log de proftpd:</p><div class="codebox"><pre><code>Mar 15 00:39:01 toulouse CRON[8894]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 15 00:39:01 toulouse CRON[8894]: pam_unix(cron:session): session closed for user root
mars 15 00:39:01 toulouse proftpd[8893] toulouse (::ffff:60.217.229.228[::ffff:60.217.229.228]): USER administrator: no such user found from ::ffff:60.217.229.228 [::ffff:60.217.229.228] to ::ffff:192.168.0.12:21
mars 15 00:39:02 toulouse proftpd[8893] toulouse (::ffff:60.217.229.228[::ffff:60.217.229.228]): USER administrator: no such user found from ::ffff:60.217.229.228 [::ffff:60.217.229.228] to ::ffff:192.168.0.12:21
mars 15 00:39:02 toulouse proftpd[8893] toulouse (::ffff:60.217.229.228[::ffff:60.217.229.228]): Maximum login attempts (3) exceeded, connection refused
mars 15 00:39:02 toulouse proftpd[8893] toulouse (::ffff:60.217.229.228[::ffff:60.217.229.228]): FTP session closed.</code></pre></div><p>on voit dans les deux premières lignes &quot;Mar&quot; et en dessous proftpd qui log le mois avec &quot;mars&quot;<br />le regex de fail2ban :</p><div class="codebox"><pre><code>failregex = \(\S+\[&lt;HOST&gt;\]\)[: -]+ USER \S+: no such user found from \S+ \[\S+\] to \S+:\S+ *$
            \(\S+\[&lt;HOST&gt;\]\)[: -]+ USER \S+ \(Login failed\): Incorrect password\. *$
            \(\S+\[&lt;HOST&gt;\]\)[: -]+ SECURITY VIOLATION: \S+ login attempted\. *$
            \(\S+\[&lt;HOST&gt;\]\)[: -]+ Maximum login attempts \(\d+\) exceeded *$</code></pre></div><p>et l&#039;erreur reporté que je comprends bien mais je n&#039;arrive pas à changer le format des logs de proftpd, et je suis pas un pro du regex :</p><div class="codebox"><pre><code>Found a match for &#039;m toulouse proftpd[20924] toulouse (::ffff:121.12.114.6[::ffff:121.12.114.6]): USER Administrator: no such user found from ::ffff:121.12.114.6 [::ffff:121.12.114.6] to ::ffff:192.168.0.12:21
&#039; but no valid date/time found for &#039;ars 15 18:29:27&#039;. Please contact the author in order to get support for this format</code></pre></div><p>On voit bien, que le mois le fait tilter <img src="http://forum.ubuntu-fr.org/img/smilies/wink.png" width="15" height="15" alt="wink" /><br />D&#039;avance merci</p><p>edit : jai bien vu cette solution http://forum.ubuntu-fr.org/viewtopic.php?pid=3142367 mais aucun changement apres restart du fail2ban ;(</p>]]></description>
			<author><![CDATA[dummy@example.com (2F)]]></author>
			<pubDate>Mon, 15 Mar 2010 18:02:42 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3340824#p3340824</guid>
		</item>
	</channel>
</rss>
