<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.llaumgui.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Le blog de llaumgui - SSH</title>
  <link>http://www.llaumgui.com/</link>
  <description>Linux en général, Fedora en particulier...</description>
  <language>fr</language>
  <pubDate>Fri, 04 Jul 2008 15:07:50 +0200</pubDate>
  <copyright>http://creativecommons.org/licenses/by-nc-nd/2.5/</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Finch, Pidgin en mode texte</title>
    <link>http://www.llaumgui.com/post/Finch-Pidgin-en-mode-texte</link>
    <guid isPermaLink="false">urn:md5:2e270c5f0a5553c3d901814376f3315c</guid>
    <pubDate>Thu, 31 Jan 2008 14:20:00 +0100</pubDate>
    <dc:creator>llaumgui</dc:creator>
        <category>Linux</category>
        <category>Pidgin</category><category>Solutions Linux</category><category>spb-box</category><category>SSH</category>    
    <description>    &lt;p&gt;En direct de &lt;a href=&quot;http://www.solutionslinux.fr&quot; hreflang=&quot;fr&quot; title=&quot;L’événement incontournable dédié aux Solutions Linux/Open Source.&quot;&gt;Solutions Linux&lt;/a&gt; où le net est très bridé... Pour me connecter à MSN &amp;amp; &lt;a href=&quot;http://fr.wikipedia.org/wiki/Jabber&quot; hreflang=&quot;fr&quot; title=&quot;Jabber (prononcer « djabeur ») est un système standard et ouvert de messagerie instantanée et de présence&quot;&gt;Jabber&lt;/a&gt;, je passe par le &lt;a href=&quot;http://fr.wikipedia.org/wiki/Ssh&quot; hreflang=&quot;fr&quot;&gt;SSH&lt;/a&gt; pour me connecter à la &lt;a href=&quot;http://www.llaumgui.com/tag/spb-box&quot;&gt;spb-box&lt;/a&gt; d'où je lance &lt;a href=&quot;http://fr.wikipedia.org/wiki/Finch_%28logiciel%29&quot; hreflang=&quot;fr&quot; title=&quot;Client de messagerie mode texte basé sur Pidgin&quot;&gt;finch&lt;/a&gt;...&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.llaumgui.com/public/images/linux/finch.png&quot;&gt;&lt;img style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://www.llaumgui.com/public/images/linux/.finch_m.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Geek un jour...&lt;/p&gt;</description>
    
    
    
          <comments>http://www.llaumgui.com/post/Finch-Pidgin-en-mode-texte#comment-form</comments>
      <wfw:comment>http://www.llaumgui.com/post/Finch-Pidgin-en-mode-texte#comment-form</wfw:comment>
      <wfw:commentRss>http://www.llaumgui.com/feed/rss2/comments/391</wfw:commentRss>
      </item>
    
  <item>
    <title>fail2ban et l'erreur &quot;Please check the format and your locale settings.&quot;</title>
    <link>http://www.llaumgui.com/post/fail2ban-et-lerreur-Please-check-the-format-and-your-locale-settings</link>
    <guid isPermaLink="false">urn:md5:bbf269c351e08d82a6bbeb50d22e6a94</guid>
    <pubDate>Wed, 25 Apr 2007 22:44:00 +0200</pubDate>
    <dc:creator>llaumgui</dc:creator>
        <category>Linux</category>
        <category>Borsalino</category><category>fail2ban</category><category>SSH</category><category>sécurité</category>    
    <description>    &lt;p&gt;J'avais déjà parlé de &lt;a href=&quot;http://www.fail2ban.org/&quot; hreflang=&quot;en&quot; title=&quot;Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address.&quot;&gt;fail2ban&lt;/a&gt; dans &lt;a href=&quot;http://www.llaumgui.com/post/Proteger-les-acces-SSH-avec-fail2ban&quot; hreflang=&quot;fr&quot; title=&quot;Protéger les accès SSH avec fail2ban&quot;&gt;un précédent billet&lt;/a&gt;, hors depuis quelque temps, je ne reçoit plus de mail d'alerte de la part de ce scripts... Arrêterait-on de forcer les accès &lt;a href=&quot;http://fr.wikipedia.org/wiki/SSH&quot; hreflang=&quot;fr&quot; title=&quot;Secure shell sur Wikipédia&quot;&gt;SSH&lt;/a&gt; de &lt;a href=&quot;http://www.llaumgui.com/tag/Borsalino&quot; hreflang=&quot;fr&quot; title=&quot;Borsalino, le serveur de fedora-fr&quot;&gt;Borsalino&lt;/a&gt; ?&lt;br /&gt;
C'est donc en contrôlant les logs (&lt;em&gt;/etc/log/fail2ban.log&lt;/em&gt;), que je tombe sur près de 45.000 entrées.&lt;/p&gt;

&lt;code class=&quot;bash&quot;&gt;root@borsalino ~&amp;gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;wc&lt;/span&gt; -l /var/log/fail2ban.log&lt;br /&gt;
&lt;span style=&quot;color: #000000;&quot;&gt;45&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;751&lt;/span&gt; /var/log/fail2ban.log&lt;/code&gt;


&lt;p&gt;Un petit &lt;a href=&quot;http://fr.wikipedia.org/wiki/Cat_%28Unix%29&quot; hreflang=&quot;fr&quot; title=&quot;Cat (Unix) sur Wikipédia&quot;&gt;cat&lt;/a&gt; et je me rends compte d'une ligne récurante :&lt;/p&gt;

&lt;code class=&quot;bash&quot;&gt;ERROR: &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;time&lt;/span&gt; data did not match format: &lt;span style=&quot;color: #007800;&quot;&gt;data=&lt;/span&gt;Mar &lt;span style=&quot;color: #000000;&quot;&gt;21&lt;/span&gt; &lt;span style=&quot;color: #000000;&quot;&gt;10&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;00&lt;/span&gt;:&lt;span style=&quot;color: #000000;&quot;&gt;50&lt;/span&gt; &lt;span style=&quot;color: #007800;&quot;&gt;fmt=&lt;/span&gt;%b %d %H:%M:%S&lt;br /&gt;
ERROR: Please check the format and your locale settings.&lt;/code&gt;


&lt;p&gt;Après recherche sur le &lt;a href=&quot;http://www.fail2ban.org/wiki/&quot; hreflang=&quot;en&quot; title=&quot;Wikide fail2ban&quot;&gt;wiki&lt;/a&gt; de fail2ban, et la lecture de la &lt;a href=&quot;http://www.fail2ban.org/wiki/index.php/FAQ_english&quot; hreflang=&quot;en&quot; title=&quot;FAQ de fail2ban&quot;&gt;faq&lt;/a&gt;, il s'avère que ce message vient d'un bug (&lt;a href=&quot;http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1457620&amp;amp;group_id=121032&amp;amp;atid=689044&quot; hreflang=&quot;en&quot; title=&quot;v0.6.1 trouble with locale-setting&quot;&gt;#1457620&lt;/a&gt;) introduit dans la version 0.6.1, fixé (0.6.2) et du à l'expression régulière en charge de l'analyse des logs.&lt;/p&gt;


&lt;p&gt;En effet mon système étant en français (&lt;em&gt;fr_FR&lt;/em&gt;), fail2ban s'attend à trouver des logs (&lt;em&gt;/var/log/secure&lt;/em&gt;) avec des dates françaises, ce qui n'est pas le cas... Pour cela, comme indiqué dans la faq, il suffit de renseigner la ligne &lt;em&gt;locale&lt;/em&gt; dans le fichier de configuration (/etc/fail2ban.conf) :&lt;/p&gt;

&lt;code class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Option: &amp;nbsp;locale&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Notes.: &amp;nbsp;global &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;cannot be redefined per section&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt; locale to use for&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;timestamp pattern matching by changing LC_TIME for&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fail2ban process. Empty entry sets locale to default one&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;usually specified by LC_ALL environment variable&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Values: &amp;nbsp;LOCALE &amp;nbsp;Default:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;
locale = en_US&lt;/code&gt;</description>
    
    
    
          <comments>http://www.llaumgui.com/post/fail2ban-et-lerreur-Please-check-the-format-and-your-locale-settings#comment-form</comments>
      <wfw:comment>http://www.llaumgui.com/post/fail2ban-et-lerreur-Please-check-the-format-and-your-locale-settings#comment-form</wfw:comment>
      <wfw:commentRss>http://www.llaumgui.com/feed/rss2/comments/190</wfw:commentRss>
      </item>
    
  <item>
    <title>Protéger les accès SSH avec fail2ban</title>
    <link>http://www.llaumgui.com/post/Proteger-les-acces-SSH-avec-fail2ban</link>
    <guid isPermaLink="false">urn:md5:9fa4010e8f7693e36750c46a939c56e1</guid>
    <pubDate>Mon, 13 Nov 2006 19:45:00 +0100</pubDate>
    <dc:creator>llaumgui</dc:creator>
        <category>Linux</category>
        <category>apache</category><category>Borsalino</category><category>fail2ban</category><category>Fedora</category><category>serveur</category><category>SSH</category><category>sécurité</category><category>yum</category>    
    <description>&lt;p&gt;Après &lt;a href=&quot;http://www.llaumgui.com/post/Premiere-attaque-sur-Borsalino&quot; hreflang=&quot;fr&quot;&gt;l'attaque de ce week-end&lt;/a&gt; et après une lecture des logs d'accès ssh, je me suis décidé à mettre en place une gestion automatique des bannissements d'IPs.&lt;/p&gt;


&lt;p&gt;L'idée est simple : bannir les IPs qui tentent de passer le compte root en &amp;quot;&lt;a href=&quot;http://fr.wikipedia.org/wiki/Attaque_par_force_brute&quot; hreflang=&quot;fr&quot;&gt;Brut de force&lt;/a&gt;&amp;quot;.&lt;br /&gt;
Il est évident que l'accès root n'est pas autorisé en ssh (&lt;em&gt;PermitRootLogin no&lt;/em&gt;) tout comme les mots de passe (&lt;em&gt;PasswordAuthentication no&lt;/em&gt;), et que de telles attaques ne peuvent pas aboutir, mais c'est pour le principe ;-).&lt;/p&gt;    &lt;code class=&quot;bash&quot;&gt;root@borsalino ~&amp;gt; &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;cat&lt;/span&gt; /var/log/secure&lt;span style=&quot;color: #000000;&quot;&gt;.1&lt;/span&gt; | &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;grep&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Failed password for root&amp;quot;&lt;/span&gt; --count&lt;br /&gt;
&lt;span style=&quot;color: #000000;&quot;&gt;1812&lt;/span&gt;&lt;/code&gt;


&lt;p&gt;Sur les conseils de &lt;a href=&quot;http://blog.titax.fr/&quot; hreflang=&quot;fr&quot;&gt;Titax&lt;/a&gt;, je me suis penché sur &lt;a href=&quot;http://fail2ban.sourceforge.net&quot; hreflang=&quot;fr&quot;&gt;fail2ban&lt;/a&gt;, mais à la différence de &lt;a href=&quot;http://blog.titax.fr/post/fedora-core-4-et-fail2ban.html&quot; hreflang=&quot;fr&quot;&gt;la méthode proposée par Thierry&lt;/a&gt;, j'ai préféré utiliser le dépôts &lt;a href=&quot;http://doc.fedora-fr.org/D%C3%A9p%C3%B4t_dries&quot; hreflang=&quot;fr&quot;&gt;dries&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Si vous ne l'avais pas installé, vous en trouverez la config &lt;a href=&quot;http://www.fedoratracker.org/tracker.py?mode=listRepoConfig&amp;amp;repo_id=9&amp;amp;repo_version=5&quot; hreflang=&quot;fr&quot;&gt;ici&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Pour installer fail2ban :&lt;/p&gt;
&lt;code class=&quot;bash&quot;&gt;root@borsalino ~&amp;gt; yum --&lt;span style=&quot;color: #007800;&quot;&gt;enablerepo=&lt;/span&gt;dries &lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;install&lt;/span&gt; fail2ban&lt;/code&gt;


&lt;p&gt;Une fois le service installé, il faut le configurer, ça ce passe dans /etc/fail2ban.conf, le fichier et très bien documenté vous pourrez y régler le nombre de tentative, la durée du bannissement, les services concernés (ssh mais possibilité de le mettre en place pour apache), et l'envoi de mail lors d'un bannissement.&lt;/p&gt;


&lt;p&gt;Ensuite, pour activer le service :&lt;/p&gt;
&lt;code class=&quot;bash&quot;&gt;root@borsalino ~&amp;gt; /sbin/chkconfig --add fail2ban&lt;br /&gt;
root@borsalino ~&amp;gt; /sbin/service fail2ban start&lt;/code&gt;</description>
    
    
    
          <comments>http://www.llaumgui.com/post/Proteger-les-acces-SSH-avec-fail2ban#comment-form</comments>
      <wfw:comment>http://www.llaumgui.com/post/Proteger-les-acces-SSH-avec-fail2ban#comment-form</wfw:comment>
      <wfw:commentRss>http://www.llaumgui.com/feed/rss2/comments/113</wfw:commentRss>
      </item>
    
  <item>
    <title>Lancement d'applications graphiques via SSH</title>
    <link>http://www.llaumgui.com/post/lancement-d-applications-graphiques-via-ssh</link>
    <guid isPermaLink="false">urn:md5:62ee768daeb4efcc39f3725f28762c79</guid>
    <pubDate>Wed, 21 Dec 2005 21:38:00 +0000</pubDate>
    <dc:creator>llaumgui</dc:creator>
        <category>Linux</category>
        <category>SSH</category><category>Xorg</category>    
    <description>&lt;p&gt;Pour contrôler une machine à distance, la &lt;a href=&quot;http://fr.wikipedia.org/wiki/VNC&quot; hreflang=&quot;fr&quot;&gt;VNC&lt;/a&gt; c'est bien, mais gourmand en bande passante et moyennement sécurisé. L'alternative lorsqu'on sort de son réseau domestique est alors d'utiliser &lt;a href=&quot;http://fr.wikipedia.org/wiki/Secure_shell&quot; hreflang=&quot;fr&quot;&gt;SSH&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;Contrairement aux idées reçues, SSH permet plus que le texte et autorise aussi l'affichage sur une &lt;strong&gt;machine A&lt;/strong&gt; d'une application tournant sur une &lt;strong&gt;machine B&lt;/strong&gt;. Pour notre exemple, nous simulerons la mise à jour de mon serveur (&lt;em&gt;192.168.1.1&lt;/em&gt;) à partir de ma station (1&lt;em&gt;92.168.1.2&lt;/em&gt;) tous deux sous Linux &lt;a href=&quot;http://www.fedoraproject.org&quot; hreflang=&quot;en&quot;&gt;Fedora Core&lt;/a&gt; 4.&lt;/p&gt;
&lt;code class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;ssh&lt;/span&gt; -c blowfish -X -f -C root@&lt;span style=&quot;color: #000000;&quot;&gt;192.168&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;.1&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;.1&lt;/span&gt; yumex&lt;/code&gt;
&lt;p&gt;Et hop, la fenêtre du serveur se lance à partir de la station :-).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A noter que la station n'est pas obligée de posséder le paquets yumEx d'installé, c'est bien sûr le yumEx du serveur qui s'exécute !&lt;br /&gt;
A noter encore, que la station ne tourne pas forcement sous Linux. Il suffit juste d'avoir un client SSH (&lt;a href=&quot;http://www.chiark.greenend.org.uk/%7Esgtatham/putty/&quot; hreflang=&quot;en&quot;&gt;Putty&lt;/a&gt;) et un serveur X11 et. Il en existe 2 principaux pour Windows :&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mnis.fr/fr/products/xwin/&quot; hreflang=&quot;fr&quot;&gt;x-Win32&lt;/a&gt; (Payant).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.cygwin.com/&quot; hreflang=&quot;en&quot;&gt;CygWin&lt;/a&gt; (Gratuit).&lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
          <comments>http://www.llaumgui.com/post/lancement-d-applications-graphiques-via-ssh#comment-form</comments>
      <wfw:comment>http://www.llaumgui.com/post/lancement-d-applications-graphiques-via-ssh#comment-form</wfw:comment>
      <wfw:commentRss>http://www.llaumgui.com/feed/rss2/comments/57</wfw:commentRss>
      </item>
    
</channel>
</rss>