<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Tito's Geeking Logs</title>
	
	<link>http://blog.webtito.be</link>
	<description>Hacks, projets et découvertes d'un jeune ingénieur geek</description>
	<lastBuildDate>Fri, 18 May 2012 02:55:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TitosGeekingLogs" /><feedburner:info uri="titosgeekinglogs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Petit script de synchronisation sélective</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/jF7u8W3vqOQ/</link>
		<comments>http://blog.webtito.be/2012/05/18/petit-script-de-synchronisation-selective/#comments</comments>
		<pubDate>Fri, 18 May 2012 02:55:55 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Logiciel]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[synchronisation]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=308</guid>
		<description><![CDATA[Parfois je veux rsync certains dossiers, certains fichiers, certaines séries Voici le petit script de rsync qui me simplifie cette tâche, pour archives. #!/bin/bash trap ctrl_c INT function ctrl_c&#40;&#41; &#123; &#160; &#160; &#160; &#160; echo -e &#34;\n\033[1;31mWe may have to ...]]></description>
			<content:encoded><![CDATA[<p>Parfois je veux rsync certains dossiers, certains fichiers, certaines séries <img src='http://blog.webtito.be/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Voici le petit script de rsync qui me simplifie cette tâche, pour archives.<br />
<span id="more-308"></span></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">trap</span> ctrl_c INT<br />
<span style="color: #000000; font-weight: bold;">function</span> ctrl_c<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>\033[1;31mWe may have to abort this entire plan. It's getting much too dangerous.\033[0m&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">42</span>;<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> <span style="color: #c20cb9; font-weight: bold;">sync</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;\033[1;33m#### Synhronisation de $1\033[0m&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; rsync <span style="color: #660033;">-aPhvz</span> foo.be:<span style="color: #ff0000;">&quot;/home/tito/<span style="color: #780078;">`printf &quot;%q&quot; &quot;$1&quot;`</span>&quot;</span> .<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">sync</span> <span style="color: #ff0000;">&quot;Photos&quot;</span><br />
<span style="color: #c20cb9; font-weight: bold;">sync</span> <span style="color: #ff0000;">&quot;Backups&quot;</span></div></div>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/jF7u8W3vqOQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/05/18/petit-script-de-synchronisation-selective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/05/18/petit-script-de-synchronisation-selective/</feedburner:origLink></item>
		<item>
		<title>J’ai enfin de la VSYNC !</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/Im3_HAbJZAQ/</link>
		<comments>http://blog.webtito.be/2012/05/11/jai-enfin-de-la-vsync/#comments</comments>
		<pubDate>Fri, 11 May 2012 01:53:38 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Logiciel]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[tearing]]></category>
		<category><![CDATA[vidéo]]></category>
		<category><![CDATA[vlc]]></category>
		<category><![CDATA[vsync]]></category>
		<category><![CDATA[x11]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=299</guid>
		<description><![CDATA[J&#8217;ai souvent eu des problèmes de synchronisation verticale sous Linux : dès qu&#8217;il y a un peu de travelling ou de mouvements rapides dans les films/séries que je regarde, je vois des lignes de tearing apparaître. Très énervant, surtout quand ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.webtito.be/wp-content/uploads/2012/05/v_sync.jpg" alt="" title="v_sync" width="150" height="113" class="alignleft size-full wp-image-302" />J&#8217;ai souvent eu des problèmes de synchronisation verticale sous Linux : dès qu&#8217;il y a un peu de travelling ou de mouvements rapides dans les films/séries que je regarde, je vois des lignes de tearing apparaître. Très énervant, surtout quand on sait que ce genre de problèmes sont inexistants sous Windaube.<br />
<span id="more-299"></span></p>
<h3>Pire qu&#8217;avant</h3>
<p>La carte Intel HD3000 est encore récente. Inclue dans la plateforme Sandy Bridge, elle équipe tous les laptops récents et pourtant elle a mauvaise réputation sous Linux : son driver supporte très mal le Vsync.</p>
<p><a href="http://blog.webtito.be/wp-content/uploads/2012/05/Tearing.jpg" class="gallery_colorbox"><img src="http://blog.webtito.be/wp-content/uploads/2012/05/Tearing-300x225.jpg"  alt="" title="Tearing" width="300" height="225" class="alignright size-medium wp-image-303" /></a>Sur mon nouveau laptop, j&#8217;ai décidé de passer à Linux Mint parce que j&#8217;en avais marre de la maintenance et complexité de Gentoo. Par contre, déçu par Gnome Shell je suis en train de tester Cinnamon, un fork de Gnome3 pour qu&#8217;il ressemble plus à Gnome2.</p>
<p>Mais sous Cinnamon, basé je crois sur compiz et donc reposant sur le compositing, j&#8217;ai de très graves problèmes de Vsync ! Dans certains films je peux voir <strong>trois bandes de tearing</strong> de temps en temps, vraiment pas agréable.</p>
<h3>Une simple variable d&#8217;environement</h3>
<p>Qui l&#8217;eut cru? De toutes les techniques que j&#8217;ai testées (mises à jour de driver, modifier Xorg, des paramètres OpenGL, &#8230;) c&#8217;est une simple variable d&#8217;environnement qui m&#8217;a donné des résultats !</p>
<p>J&#8217;ai simplement ajouté dans <tt>/etc/environment</tt> :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">CLUTTER_PAINT=disable-clipped-redraws:disable-culling</div></div>
<p>J&#8217;ai ensuite relancé X (ce qui recharge l&#8217;environnement adéquat) et voilà, à moi les vidéos sans tearing ! Je n&#8217;ai pas non plus remarqué de déchirements dans les effets et déplacements de mon WM.</p>
<h3>Autre piste</h3>
<p>Comme je le disais cette variable d&#8217;environnement me suffit mais vous pouvez aussi tenter d&#8217;ajouter ces paramètres dans votre Xinitrc et lancer votre lecteur vidéo avec son module de sortie OpenGL :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">export GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_TO_VBLANK=1<br />
export GL_SYNC_DISPLAY_DEVICE=&quot;DFP-1&quot;<br />
export __GL_SYNC_DISPLAY_DEVICE=&quot;DFP-1&quot;</div></div>
<p>Tenez-moi au courant si ça apporte des résultats. De plus, si vous utilisez une carte graphique NVidia, il est recommandé d&#8217;avoir ces lignes :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">export VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=&quot;DFP-1&quot;<br />
export __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=&quot;DFP-1&quot;</div></div>
<h3>Conclusion</h3>
<p>Je suis heureux de pouvoir regarder mes vidéos correctement et ce grâce à une simple variable d&#8217;environnement. Je me demande pourquoi elle n&#8217;est pas activée par défaut dans la plupart des distributions&#8230; Mes performances à GLXgears n&#8217;ont pas changé.</p>
<p><a href="http://askubuntu.com/questions/73909/screen-tearing-in-11-10-with-intel-graphics">Source de ma solution</a></p>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/Im3_HAbJZAQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/05/11/jai-enfin-de-la-vsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/05/11/jai-enfin-de-la-vsync/</feedburner:origLink></item>
		<item>
		<title>Ma nouvelle pince à dénuder : mécanique complexe pour utilisation simple</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/RaHZIdmDY5A/</link>
		<comments>http://blog.webtito.be/2012/04/06/ma-nouvelle-pince-a-denuder-mecanique-complexe-pour-utilisation-simple/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 03:12:12 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Électronique]]></category>
		<category><![CDATA[Matériel]]></category>
		<category><![CDATA[câble]]></category>
		<category><![CDATA[dénuder]]></category>
		<category><![CDATA[fil]]></category>
		<category><![CDATA[pince]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=283</guid>
		<description><![CDATA[Pendant que je travaillais sur le projet Blue Eclipse (j&#8217;y reviendrai) avec mes amis du mort-né KAP Elec, j&#8217;ai été assez frustré de perdre des dizaines si pas des centaines de précieuses minutes à dénuder des fils avec une pince ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.webtito.be/wp-content/uploads/2012/04/Pince-Full.png" class="gallery_colorbox"><img src="http://blog.webtito.be/wp-content/uploads/2012/04/Pince-Full-188x300.png"  alt="" title="Pince-Full" width="188" height="300" class="alignleft size-medium wp-image-284" /></a>Pendant que je travaillais sur le projet Blue Eclipse (j&#8217;y reviendrai) avec mes amis du mort-né KAP Elec, j&#8217;ai été assez frustré de perdre des dizaines si pas des centaines de précieuses minutes à dénuder des fils avec une pince à découper ou un couteau.</p>
<p>Quand je suis tombé sur cette pince dans un <em>Mall</em> américain je suis tombé amoureux&#8230;<br />
<span id="more-283"></span></p>
<h3>Présentation</h3>
<p>Cette pince est vendue en tant que &laquo;&nbsp;Pince à dénuder auto-ajustable&nbsp;&raquo;. À l&#8217;utilisation c&#8217;est juste magique : on place le fil, on serre et hop, c&#8217;est dénudé !</p>
<p>Pas besoin de régler le diamètre du fil, la pince s&#8217;adapte automatiquement et ne découpe que le plastique. C&#8217;est vraiment magique <img src='http://blog.webtito.be/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  J&#8217;ai essayé sur mon tout fin fil d&#8217;électronique, du AWG-22 (0,64 mm) ça marche vraiment comme par magie. Ça marche bien entendu tout aussi bien sur du gros câble électrique standard, la pince étant spécifiée pour AWG-10 à 24 (11.7 à 0.51 mm).</p>
<p>Il y a aussi quelques bonus : une petite calle permet de dénuder toujours la même taille pour un travail zuper zoli. Il y a aussi évidemment une zone permettant simplement de couper, et une autre zone pour fixer des terminaisons aux fils.</p>
<h3>Vidéo du constructeur</h3>
<p>Parce que je suis un mec génial je vous ai dégoté la pub sur YouTube :<br />
<iframe width="570" height="450" src="http://www.youtube.com/embed/ffY8ZiIokvc" frameborder="0" allowfullscreen></iframe></p>
<p>Dans mon immense bonté je vous ai aussi fait un plan rapproché :<br />
<iframe width="570" height="290" src="http://www.youtube.com/embed/1lr0Kv1iMB0" frameborder="0" allowfullscreen></iframe></p>
<h3>Conclusion</h3>
<p>Je suis très content de mon achat à 20$. On verra si elle tient la distance mais je suis presque sûr que ce sera le cas pour cette pince dont tous les composants essentiels sont en acier et garantie à vie par une marque réputée.<br />
<a href="http://blog.webtito.be/wp-content/uploads/2012/04/Photo-5-04-12-22-05-12.jpg" class="gallery_colorbox"><img src="http://blog.webtito.be/wp-content/uploads/2012/04/Photo-5-04-12-22-05-12-180x180.jpg"  alt="" title="Photo 5-04-12 22 05 12" width="180" height="180" class="aligncenter size-thumbnail wp-image-285" /></a> <a href="http://blog.webtito.be/wp-content/uploads/2012/04/Photo-5-04-12-22-05-29.jpg" class="gallery_colorbox"><img src="http://blog.webtito.be/wp-content/uploads/2012/04/Photo-5-04-12-22-05-29-180x180.jpg"  alt="" title="Photo 5-04-12 22 05 29" width="180" height="180" class="aligncenter size-thumbnail wp-image-286" /></a> <a href="http://blog.webtito.be/wp-content/uploads/2012/04/Photo-5-04-12-22-06-03.jpg" class="gallery_colorbox"><img src="http://blog.webtito.be/wp-content/uploads/2012/04/Photo-5-04-12-22-06-03-180x180.jpg"  alt="" title="Photo 5-04-12 22 06 03" width="180" height="180" class="aligncenter size-thumbnail wp-image-287" /></a></p>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/RaHZIdmDY5A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/04/06/ma-nouvelle-pince-a-denuder-mecanique-complexe-pour-utilisation-simple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/04/06/ma-nouvelle-pince-a-denuder-mecanique-complexe-pour-utilisation-simple/</feedburner:origLink></item>
		<item>
		<title>Petit test de Persistence of Vision avec Arduino</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/DTvlTJq8Qes/</link>
		<comments>http://blog.webtito.be/2012/03/18/petit-test-de-persistence-of-vision-avec-arduino/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 19:21:17 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Électronique]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[perstistance of vision]]></category>
		<category><![CDATA[pov]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=274</guid>
		<description><![CDATA[J&#8217;ai été contacté par le CI pour faire un projet de persistance de vision pour la Revue des Ingénieurs ! Ça m&#8217;a tout de suite motivé à faire un petit test : mon Arduino UNO, son protoshield et 5 LEDs. ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.webtito.be/wp-content/uploads/2012/03/Arduino-Potosheild.jpg" class="gallery_colorbox"><img src="http://blog.webtito.be/wp-content/uploads/2012/03/Arduino-Potosheild-300x214.jpg"  alt="" title="Arduino-Potosheild" width="300" height="214" class="alignleft size-medium wp-image-278" /></a>J&#8217;ai été contacté par le CI pour faire un projet de persistance de vision pour la Revue des Ingénieurs ! Ça m&#8217;a tout de suite motivé à faire un petit test : mon Arduino UNO, son protoshield et 5 LEDs.<br />
<span id="more-274"></span></p>
<h3>Principe de la persistance de vision</h3>
<p>Vous connaissez sans doute le principe de la persistance de vision : en faisant clignotter rapidement des LEDs qui se déplacent on peut imprimer des images dans l&#8217;oeil qui ne sait pas distinguer de si courts clignottements.</p>
<p>Grâce à mon Arduino j&#8217;ai donc fait un petit script qui fait clignotter les 5 LEDs selon un schéma me permettant d&#8217;afficher des images ou des textes.</p>
<h3>Résultat</h3>
<p><img src="http://blog.webtito.be/wp-content/uploads/2012/03/PoV-Tito-560x373.jpg" alt="" title="PoV-Tito" width="560" height="373" class="aligncenter size-large wp-image-276" /></p>
<h3>Code Arduino</h3>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;height:380px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Pin numbers of the leds</span><br />
<span style="color: #993333;">int</span> ledPins<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #0000dd;">2</span><span style="color: #339933;">,</span><span style="color: #0000dd;">4</span><span style="color: #339933;">,</span><span style="color: #0000dd;">6</span><span style="color: #339933;">,</span><span style="color: #0000dd;">8</span><span style="color: #339933;">,</span><span style="color: #0000dd;">10</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> ledNum <span style="color: #339933;">=</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span>ledPins<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #993333;">int</span> drawing<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> colNum <span style="color: #339933;">=</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span>drawing<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span>ledPins<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> led<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> led<span style="color: #339933;">&lt;</span>ledNum<span style="color: #339933;">;</span> led<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; pinMode<span style="color: #009900;">&#40;</span>ledPins<span style="color: #009900;">&#91;</span>led<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// Loop thru each column</span><br />
&nbsp; <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> col<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> col<span style="color: #339933;">&lt;</span>colNum<span style="color: #339933;">;</span> col<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Loop thru each led</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> led<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> led<span style="color: #339933;">&lt;</span>ledNum<span style="color: #339933;">;</span> led<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; digitalWrite<span style="color: #009900;">&#40;</span>ledPins<span style="color: #009900;">&#91;</span>led<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> drawing<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#40;</span>led<span style="color: #339933;">*</span>colNum<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>col<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Wait a bit before next column</span><br />
&nbsp; &nbsp; delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <br />
&nbsp; <span style="color: #666666; font-style: italic;">// Wait a bit before restart</span><br />
&nbsp; delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/DTvlTJq8Qes" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/03/18/petit-test-de-persistence-of-vision-avec-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/03/18/petit-test-de-persistence-of-vision-avec-arduino/</feedburner:origLink></item>
		<item>
		<title>Nouveau projet : LegionFS, le file system distribué et décentralisé</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/sGOAnlgeZ-I/</link>
		<comments>http://blog.webtito.be/2012/01/24/legionfs-filesystem-distribue-decentralise/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 18:48:29 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Logiciel]]></category>
		<category><![CDATA[Projet]]></category>
		<category><![CDATA[distributed]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[LegionFS]]></category>
		<category><![CDATA[p2p]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=259</guid>
		<description><![CDATA[Vu l&#8217;actualité récente, je me suis demandé quelle solution technique permettrait de créer une alternative à MegaUpload. Selon moi le soucis majeur est de tout décentraliser, à commencer par le stockage des fichiers. Je me suis donc mis à la ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.webtito.be/wp-content/uploads/2012/01/Decentralized-180x180.png" alt="" title="Decentralized" width="180" height="180" class="alignleft size-thumbnail wp-image-260" />Vu l&#8217;actualité récente, je me suis demandé quelle solution technique permettrait de créer une alternative à MegaUpload. Selon moi le soucis majeur est de tout décentraliser, à commencer par le stockage des fichiers. Je me suis donc mis à la recherche d&#8217;un file system selon 3 critères&#8230;<br />
<span id="more-259"></span><br />
<h3>Critères</h3>
<ul>
<li><strong>Décentralisé</strong> : pour résister aux attaques et autres aléas techiniques, chaque node a autant/aussi peu d&#8217;importance que les autres. Pas d&#8217;index ou de master node donc ;</li>
<li><strong>Répliqué</strong> : dans la même optique de résistance aux downtimes, chaque fichier doit être copié sur plusieurs des nodes ;</li>
<li><strong>Adaptatif</strong> : les fichiers plus demandés doivent être plus accessibles.</li>
</ul>
<p>Après quelques heures de recherche (très intéressante d&#8217;ailleurs), j&#8217;en suis arrivé à la conclusion qu&#8217;aucun projet cummulant toutes ces caractéristiques n&#8217;existait. Alors pourquoi pas le créer?</p>
<h3>LegionFS</h3>
<p>J&#8217;ai donc entamé un débat très intéressant qui, je pense, pourrait rapidement mener à un logiciel fonctionnel !</p>
<p>L&#8217;idée est un logiciel p2p interfacé en FUSE et reprenant toutes les caractéristiques que j&#8217;ai citées plus haut. Un peu plus de réflexion m&#8217;a mené à écrire des <a href="https://github.com/Ethylix/LegionFS/wiki/Technical-Goals">spécifications plus précises</a>, par exemple en termes de sécurité.</p>
<h3>Contributeurs bienvenus</h3>
<p>Je vous invite donc à regarder ce qu&#8217;il en est sur le <a href="https://github.com/Ethylix/LegionFS">GitHub</a> du projet et son <a href="https://github.com/Ethylix/LegionFS/wiki">wiki</a>.</p>
<p>Aucun des développeurs actuellement impliqué n&#8217;a encore travaillé avec des systèmes peer to peer donc on cherche des contributeurs intéressés par un projet qui pourrait enfin mettre un terme à la centralisation du web.</p>
<p>Je pense que ce projet de file system a un énorme potentiel au jour où les services en cloud se développent et la difficulté de stocker de grandes quantités de données fiablement inquiète. Ce projet peut potentiellement révolutionner ce web centralisé.</p>
<p>Join us : <a href="irc://#LegionFS@irc.geeknode.org">irc://#LegionFS@irc.geeknode.org</a> ! We are LegionFS. Expect us.</p>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/sGOAnlgeZ-I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/01/24/legionfs-filesystem-distribue-decentralise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/01/24/legionfs-filesystem-distribue-decentralise/</feedburner:origLink></item>
		<item>
		<title>[Série Sécurisation] Firewall avec iptables</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/l6N8Dj3CxXc/</link>
		<comments>http://blog.webtito.be/2012/01/16/firewall/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 14:47:03 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Sécurité]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[sécurité]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[udp]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=210</guid>
		<description><![CDATA[Pour poursuivre dans mes bonnes résolutions 2012 visant la sécurisation de mon PC, j&#8217;ai pensé qu&#8217;un firewall efficace était une étape indispensable. En effet, puisque je route tout mon trafic dans un tunnel VPN possédant une IP publique, les ports ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.webtito.be/wp-content/uploads/2012/01/firewall-180x180.gif" alt="" title="firewall" width="180" height="180" class="alignleft size-thumbnail wp-image-233" />Pour poursuivre dans mes bonnes résolutions 2012 visant la sécurisation de mon PC, j&#8217;ai pensé qu&#8217;un firewall efficace était une étape indispensable. En effet, puisque je route tout mon trafic dans un tunnel VPN possédant une IP publique, les ports de mon PC sont grand ouverts sur le net.</p>
<p>J&#8217;ai beaucoup cherché un Firewall applicatif qui m&#8217;aurait permis d&#8217;autoriser les applications au cas par cas mais malheureusement il n&#8217;y a pas de solution digne de ce nom sous Linux. J&#8217;ai donc opté pour du bas niveau : de bonnes vieilles règles <strong><tt>iptables</tt></strong> !<br />
<span id="more-210"></span></p>
<h3>Le script</h3>
<p>Avec iptables, on établit des règles pour l&#8217;<tt>INPUT</tt> d&#8217;une part et l&#8217;<tt>OUTPUT</tt> d&#8217;autre part :</p>
<ul>
<li><strong><tt>INPUT</tt></strong> désigne les connexions entrantes. Cela désigne donc les connexions que votre machine n&#8217;a pas initiées elle-même mais aussi les retours de paquets UDP. Je lui ai assigné la politique par défaut <strong><tt>DROP</tt></strong> c&#8217;est-à-dire ne rien laisser passer sauf mes exceptions.</li>
<li>
<li><strong><tt>OUTPUT</tt></strong> désigne les connexions sortantes. Cela désigne donc les connexions initiées par votre machine mais aussi les retours de paquets UDP. Je lui ai assigné la politique par défaut <strong><tt>ACCEPT</tt></strong> c&#8217;est-à-dire tout laisser passer sauf mes exceptions.</li>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/fw.sh</div></div>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;height:380px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Flush previous rules for clean firewall</span><br />
iptables <span style="color: #660033;">-P</span> INPUT ACCEPT<br />
iptables <span style="color: #660033;">-P</span> OUTPUT ACCEPT<br />
iptables <span style="color: #660033;">-F</span> INPUT<br />
iptables <span style="color: #660033;">-F</span> OUTPUT<br />
<br />
<span style="color: #666666; font-style: italic;"># Don't fuck with already established or related connections (even UDP will pass if it was locally initiated)</span><br />
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> ESTABLISHED,RELATED <span style="color: #660033;">-j</span> ACCEPT<br />
<br />
<span style="color: #666666; font-style: italic;"># MY RULES BEGIN</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Input with default policy drop : exception = ACCEPT</span><br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-s</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--dport</span> <span style="color: #000000;">22</span> <span style="color: #660033;">-j</span> ACCEPT <span style="color: #666666; font-style: italic;"># SSH from LAN</span><br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> udp <span style="color: #660033;">--dport</span> <span style="color: #000000;">5353</span> <span style="color: #660033;">-d</span> 224.0.0.251 <span style="color: #660033;">-j</span> ACCEPT &nbsp;<span style="color: #666666; font-style: italic;"># Avahi/ZeroConf</span><br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">6881</span>:<span style="color: #000000;">6999</span> <span style="color: #660033;">-j</span> ACCEPT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Bittorrent</span><br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">50210</span> <span style="color: #660033;">-j</span> ACCEPT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Tomahawk</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Output with default policy accept : exception = DROP</span><br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-p</span> udp <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--sport</span> <span style="color: #000000;">17500</span> <span style="color: #660033;">-j</span> DROP &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Block Dropbox broadcasts except on LAN</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Microsoft filesharing shit (Samba/CIFS) only accepted on 192.168.0.0/16.</span><br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> udp <span style="color: #660033;">-d</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--sport</span> <span style="color: #000000;">137</span> <span style="color: #660033;">-j</span> ACCEPT<br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> udp <span style="color: #660033;">-d</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--sport</span> <span style="color: #000000;">138</span> <span style="color: #660033;">-j</span> ACCEPT<br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-p</span> udp <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--sport</span> <span style="color: #000000;">137</span> <span style="color: #660033;">-j</span> DROP<br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-p</span> udp <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--sport</span> <span style="color: #000000;">138</span> <span style="color: #660033;">-j</span> DROP<br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-p</span> tcp <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--sport</span> <span style="color: #000000;">139</span> <span style="color: #660033;">-j</span> DROP<br />
&nbsp; &nbsp; iptables <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-p</span> tcp <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span> <span style="color: #660033;">--sport</span> <span style="color: #000000;">445</span> <span style="color: #660033;">-j</span> DROP<br />
<br />
<span style="color: #666666; font-style: italic;"># MY RULES END</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Allow all ICMP</span><br />
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-j</span> ACCEPT<br />
iptables <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-j</span> ACCEPT<br />
<br />
<span style="color: #666666; font-style: italic;"># Trusted interfaces</span><br />
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> lo <span style="color: #660033;">-j</span> ACCEPT<br />
iptables <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-o</span> lo <span style="color: #660033;">-j</span> ACCEPT<br />
<br />
<span style="color: #666666; font-style: italic;"># Set default rule (policy)</span><br />
iptables <span style="color: #660033;">-P</span> INPUT DROP<br />
iptables <span style="color: #660033;">-P</span> OUTPUT ACCEPT<br />
<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Firewall up!&quot;</span></div></div>
<p>Dans ce script vous pourrez clairement distinguer la zone à adapter selon vos besoins (partie &laquo;&nbsp;<tt>MY RULES</tt>&laquo;&nbsp;). Les règles sont assez explicites et ne nécessitent pas d&#8217;autres précisions si ce n&#8217;est la consultation de la manpage d&#8217;<tt>iptables</tt>.</p>
<h3>Surveiller les règles</h3>
<p>Une petite commande vous permettra de surveiller où passe/est bloqué votre trafic :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># iptables -Z &amp;&amp; watch iptables -L -v</div></div>
<p>Cela affichera une règle par ligne, avec la première colonne spécifiant le nombre de paquets concernés par la règle.</p>
<h3>Persistance au reboot</h3>
<p>Après avoir exécuté le script et testé que tout fonctionne bien, le plus simple sous Gentoo est d&#8217;exploiter l&#8217;init script dédié à <tt>iptables</tt> :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># /etc/init.d/iptables start<br />
# /etc/fw.sh<br />
# /etc/init.d/iptables save<br />
# rc-update add iptables</div></div>
<p>Ainsi vos règles seront réétablies au reboot de votre machine. N&#8217;oubliez pas de refaire un <tt>/etc/init.d/iptables save</tt> à chaque fois que vous modifiez vos règles de firewall.</p>
<h3>Mode paranoïaque : <tt>OUTPUT</tt> en <tt>DROP</tt></h3>
<p>Personnellement je trouve que sur une machine personnelle, bloquer la sortie est un peu poussé et souvent chiant. Mais pour des applications plus importantes comme un serveur il vous faudra sans doute envisager de changer la politique de l&#8217;OUTPUT et autoriser les ports au cas par cas.</p>
<p>Mais comme je le disais, je trouve ça chiant sur une machine personnelle et je ne le documenterai pas.</p>
<h3>Je suis ouvert aux suggestions</h3>
<p>J&#8217;ai écrit ces règles de firewall hier et les teste donc depuis moins de 24 heures. Si vous pensez à une règle que j&#8217;aurais oubliée, merci de me le faire savoir en commentaire <img src='http://blog.webtito.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/l6N8Dj3CxXc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/01/16/firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/01/16/firewall/</feedburner:origLink></item>
		<item>
		<title>Routes permanentes {avec,malgré} NetworkManager</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/4Qr1tEgpwsU/</link>
		<comments>http://blog.webtito.be/2012/01/16/routes-permanentes-networkmanager/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 01:54:49 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Logiciel]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[networkmanager]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[réseau]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=222</guid>
		<description><![CDATA[Pour accéder à Internet je route tout mon traffic dans un tunnel VPN. Malheureusement à mon kot j&#8217;ai deux access points WiFi et passer de l&#8217;un à l&#8217;autre fait disparaître certaines routes nécessaires au bon fonctionnement de ce tunnel. Je ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.webtito.be/wp-content/uploads/2012/01/NetworkManager-180x180.png" alt="" title="NetworkManager" width="180" height="180" class="alignleft size-thumbnail wp-image-224" />Pour accéder à Internet je route tout mon traffic dans un tunnel VPN. Malheureusement à mon kot j&#8217;ai deux access points WiFi et passer de l&#8217;un à l&#8217;autre fait disparaître certaines routes nécessaires au bon fonctionnement de ce tunnel.</p>
<p>Je me suis rendu compte que ces routes pourraient être présentes en permanence sur mon ordinateur et les ai donc scriptées dans NetworkManager.<br />
<span id="more-222"></span></p>
<h3>/etc/NetworkManager/dispatch.d/</h3>
<p>Tous les scripts que vous mettrez dans le dossier <strong><tt>/etc/NetworkManager/dispatch.d/</tt></strong> seront exécutés à chaque fois qu&#8217;une interface se connecte.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/NetworkManager/dispatch.d/02-EthylixRoutes.sh</div></div>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #007800;">GATEWAY</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ip route</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'/default/ { print $3 }'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <br />
<span style="color: #c20cb9; font-weight: bold;">ip route</span> add 42.42.144.113 via <span style="color: #007800;">$GATEWAY</span><br />
<span style="color: #c20cb9; font-weight: bold;">ip route</span> add 42.42.153.16 via <span style="color: #007800;">$GATEWAY</span></div></div>
<p>À noter que si vous avez besoin de l&#8217;interface qui vient d&#8217;être up, elle est récupérable en premier argument (variable <tt>$1</tt>).<br />
N&#8217;oubliez pas de <tt>chmod +x</tt> le script.</p>
<h3>DNS Google</h3>
<p>J&#8217;en ai profité pour forcer l&#8217;utilisation des DNS Google. Je suis conscient que cela peut poser problème dans certains environnements étranges (comme par exemple un hotspot) mais ça vaut le coup :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/NetworkManager/dispatch.d/03-DNS.sh</div></div>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;nameserver 8.8.8.8<br />
nameserver 8.8.4.4<br />
nameserver 2001:4860:4860::8888<br />
nameserver 2001:4860:4860::8844&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>resolv.conf</div></div>
<h3>Conclusion</h3>
<p>Je vous laisserai savoir à l&#8217;usage l&#8217;efficacité de ces routes mais pour l&#8217;instant ça m&#8217;évite de relancer OpenVPN au moindre changement d&#8217;AP WiFi !</p>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/4Qr1tEgpwsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/01/16/routes-permanentes-networkmanager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/01/16/routes-permanentes-networkmanager/</feedburner:origLink></item>
		<item>
		<title>Petit script de PowerSave</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/rWgXPz8QWHQ/</link>
		<comments>http://blog.webtito.be/2012/01/15/petit-script-de-powersave/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 21:10:49 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[acpi]]></category>
		<category><![CDATA[batterie]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[powersave]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=212</guid>
		<description><![CDATA[J&#8217;en avais un peu marre de démarrer powertop pour activer des règles de powersave à chaque fois que je suis sur batterie. En plus, l&#8217;utilitaire laptop_mode n&#8217;a pas l&#8217;air de vouloir fonctionner avec mon kernel 3.1.5. J&#8217;ai opté pour une ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.webtito.be/wp-content/uploads/2012/01/battery-180x180.png" alt="" title="battery" width="180" height="180" class="alignleft size-thumbnail wp-image-218" />J&#8217;en avais un peu marre de démarrer powertop pour activer des règles de powersave à chaque fois que je suis sur batterie. En plus, l&#8217;utilitaire laptop_mode n&#8217;a pas l&#8217;air de vouloir fonctionner avec mon kernel 3.1.5.</p>
<p>J&#8217;ai opté pour une solution très simple, indépendante de divers outils et légère : un script bash en crontab.<br />
<span id="more-212"></span></p>
<h3>Le script</h3>
<p>Après avoir vérifié qu&#8217;on n&#8217;est pas branché sur secteur, le script va activer trois optimisations : l&#8217;économie d&#8217;énergie du PCI, de l&#8217;USB et des disques.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/powersave.sh</div></div>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>acpi<span style="color: #000000; font-weight: bold;">/</span>ac_adapter<span style="color: #000000; font-weight: bold;">/</span>AC<span style="color: #000000; font-weight: bold;">/</span>state <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> off-line <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> == <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>bus<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>pci,i2c<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/*/</span>power<span style="color: #000000; font-weight: bold;">/</span>control<span style="color: #7a0874; font-weight: bold;">&#41;</span>;<span style="color: #000000; font-weight: bold;">do</span> <span style="color: #7a0874; font-weight: bold;">echo</span> auto <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$i</span>; <span style="color: #000000; font-weight: bold;">done</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>bus<span style="color: #000000; font-weight: bold;">/</span>usb<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/*/</span>power<span style="color: #000000; font-weight: bold;">/</span>level<span style="color: #7a0874; font-weight: bold;">&#41;</span>;<span style="color: #000000; font-weight: bold;">do</span> <span style="color: #7a0874; font-weight: bold;">echo</span> auto <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$i</span>; <span style="color: #000000; font-weight: bold;">done</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>class<span style="color: #000000; font-weight: bold;">/</span>scsi_host<span style="color: #000000; font-weight: bold;">/</span>host<span style="color: #000000; font-weight: bold;">*/</span>link_power_management_policy<span style="color: #7a0874; font-weight: bold;">&#41;</span>;<span style="color: #000000; font-weight: bold;">do</span> <span style="color: #7a0874; font-weight: bold;">echo</span> min_power <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$i</span>; <span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #000000; font-weight: bold;">fi</span></div></div>
<p>Remarquez que j&#8217;ai ignoré d&#8217;autres commandes sur sysctl (comme <tt>vm.dirty_writeback_centisecs</tt> ou <tt>kernel.nmi_watchdog</tt> car ACPI s&#8217;en charge correctement.</p>
<h3>Crontab</h3>
<p>Le script étant assez léger je n&#8217;hésite pas à le lancer toutes les minutes grâce à la ligne crontab suivante (<tt>crontab -e</tt>) :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">* * * * * /etc/powersave.sh</div></div>
<p>Voilà, c&#8217;est basique mais ça marche et étend encore un peu plus mon autonomie (je descends à 12W pour le surf en wifi, luminosité à 80%).</p>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/rWgXPz8QWHQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/01/15/petit-script-de-powersave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/01/15/petit-script-de-powersave/</feedburner:origLink></item>
		<item>
		<title>[Série Sécurisation] Clés SSH avec passphrase</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/_yMSRrSVNOI/</link>
		<comments>http://blog.webtito.be/2012/01/15/cles-ssh-avec-passphrase/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 23:07:19 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Logiciel]]></category>
		<category><![CDATA[Sécurité]]></category>
		<category><![CDATA[passphrase]]></category>
		<category><![CDATA[sécurité]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=203</guid>
		<description><![CDATA[Pour la nouvelle année j&#8217;ai pris la bonne résolution de sécuriser un peu plus mon ordinateur. Être sous Linux, même si c&#8217;est un préalable, n&#8217;est pas suffisant pour avoir un poste bien sécurisé. J&#8217;ai commencé par quelque chose de simple ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.webtito.be/wp-content/uploads/2012/01/serveur-180x180.png" alt="" title="serveur" width="180" height="180" class="alignleft size-thumbnail wp-image-206 noborder" />Pour la nouvelle année j&#8217;ai pris la bonne résolution de sécuriser un peu plus mon ordinateur. Être sous Linux, même si c&#8217;est un préalable, n&#8217;est pas suffisant pour avoir un poste bien sécurisé.</p>
<p>J&#8217;ai commencé par quelque chose de simple : sécuriser mes clés SSH avec une passphrase.<br />
<span id="more-203"></span></p>
<h3>Nouvelles clés</h3>
<p>Puisque j&#8217;ai toujours utilisé des clés sans passphrases (je sais, c&#8217;est pas bien) j&#8217;ai décidé de créer entièrement des nouvelles clés et de me débarrasser des anciennes. J&#8217;ai tout de même sauvegardé mes anciennes clés :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ mv ~/.ssh ~/.ssh.bak</div></div>
<h3>Génération des clés</h3>
<p>Ensuite j&#8217;ai généré ma paire de clés RSA 4096bits pour plus de sûreté.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ssh-keygen -t rsa -b 4096</div></div>
<p>C&#8217;est à cette étape qu&#8217;il faudra entrer la passphrase. Essayez d&#8217;utiliser une passphrase assez longue avec des caractères spéciaux pour vous prémunir des attaques bruteforce ou par dictionnaire.</p>
<h3>Connexion aux serveurs</h3>
<p>Ensuite, copiez toute le contenu de <tt>~/.ssh/id_rsa.pub</tt> dans le fichier <tt>~/.ssh/authorized_keys</tt> de vos différents serveurs SSH.</p>
<p>Relancez maintenant <tt>ssh-agent</tt> et essayez de vous connecter à votre serveur :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ssh-agent -k<br />
$ ssh user@server.tld</div></div>
<p>À noter que si vous utilisez Gnome il est aussi nécessaire de relancer gnome-keyring-daemon :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ gnome-keyring-daemon -r</div></div>
<p>Si maintenant vous arrivez à vous connecter à votre serveur, profitez-en pour supprimer l&#8217;ancienne clé publique dans <tt>~/.ssh/authorized_keys</tt> <img src='http://blog.webtito.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h3>Le petit bonus d&#8217;être sous Gnome</h3>
<p><img src="http://blog.webtito.be/wp-content/uploads/2012/01/Gnome-Keyring-300x169.png" alt="" title="Gnome-Keyring" width="300" height="169" class="size-medium wp-image-205 alignleft" />Si vous faites confiance à Gnome-Keyring*, il va remplacer SSH-agent pour se souvenir de la passphrase.</p>
<p>Vous pouvez décider de la durée du déverouillage. Personnellement j&#8217;ai décidé de déverouiller si mon compte utilisateur est déverouillé, ce qui n&#8217;est pas le top pour la sécurité mais qui est suffisant pour moi.</p>
<p>*Regardez, ils m&#8217;ont empêché de prendre un screenshot pendant une étape de sécurité! On dirait l&#8217;interdiction de prendre en photo les agents de la TSA&#8230;</p>
<h3>Changer de passphrase</h3>
<p>Si vous souhaitez juste remplacer votre passphrase (je vous conseille de le faire quelques fois par an, tout comme n&#8217;importe quel mot de passe), la commande est simple :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ssh-keygen -p</div></div>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/_yMSRrSVNOI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/01/15/cles-ssh-avec-passphrase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/01/15/cles-ssh-avec-passphrase/</feedburner:origLink></item>
		<item>
		<title>Transfert ou miroir d’un FTP</title>
		<link>http://feedproxy.google.com/~r/TitosGeekingLogs/~3/sNE1USxJJFs/</link>
		<comments>http://blog.webtito.be/2012/01/13/transfert-ou-miroir-dun-ftp/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 22:03:23 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Logiciel]]></category>
		<category><![CDATA[astuce]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[lftp]]></category>
		<category><![CDATA[transfert]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.webtito.be/?p=195</guid>
		<description><![CDATA[Dans le cadre du transfert d&#8217;un site web d&#8217;un hébergeur à un autre, j&#8217;ai dû faire un miroir d&#8217;un site, d&#8217;abord du FTP distant vers ma machine puis de ma machine vers le nouvel hébergeur. Voici les deux commandes LFTP ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.webtito.be/wp-content/uploads/2012/01/ftp-180x180.png" alt="" title="ftp" width="180" height="180" class="alignleft size-thumbnail wp-image-196 noborder" />Dans le cadre du transfert d&#8217;un site web d&#8217;un hébergeur à un autre, j&#8217;ai dû faire un miroir d&#8217;un site, d&#8217;abord du FTP distant vers ma machine puis de ma machine vers le nouvel hébergeur.</p>
<p>Voici les deux commandes LFTP qui permettent de faire ça, pour mémoire.<br />
<span id="more-195"></span></p>
<h3>Distant -> Local</h3>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ lftp ftp://user:pass@oldsite.tld -e &quot;mirror --only-newer / ./MonSuperSite&quot;</div></div>
<p>Copiera tout ce qui est trouvé sur le FTP (/) vers le répertoire local ./MonSuperSite. Éventuellement penser à mettre des paramètres plus restrictifs.</p>
<h3>Local -> Distant</h3>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ lftp ftp://user:pass@newsite.tld -e &quot;mirror --reverse --only-newer ./MonSuperSite/web ./www&quot;</div></div>
<p>Copiera tout le répertoire web local (./MonSuperSite/web) vers le répertoire FTP ./www.</p>
<img src="http://feeds.feedburner.com/~r/TitosGeekingLogs/~4/sNE1USxJJFs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.webtito.be/2012/01/13/transfert-ou-miroir-dun-ftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.webtito.be/2012/01/13/transfert-ou-miroir-dun-ftp/</feedburner:origLink></item>
	</channel>
</rss>

