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

<channel>
	<title> &#187; servidor</title>
	<atom:link href="http://www.laestacionerrante.com/archives/tag/servidor/feed" rel="self" type="application/rss+xml" />
	<link>http://www.laestacionerrante.com</link>
	<description></description>
	<lastBuildDate>Fri, 18 Jun 2010 11:36:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://www.laestacionerrante.com</link>
  <url>http://www.laestacionerrante.com/wp-content/images/favicon/favicon.ico</url>
  <title></title>
</image>
		<item>
		<title>UUID: Una Buena Solución Para Evitar Problemas de Montaje</title>
		<link>http://www.laestacionerrante.com/archives/683</link>
		<comments>http://www.laestacionerrante.com/archives/683#comments</comments>
		<pubDate>Fri, 01 Jan 2010 15:04:10 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=683</guid>
		<description><![CDATA[A veces, incluir un nuevo disco duro en nuestro servidor puede ser cuanto menos una odisea. Me refiero al hecho de que en alguna ocasión el sistema renombra los /dev/sdxx de nuevo, con un orden distinto al que había antes. Esto, como es lógico supone un problema de montaje. La solución es bastante sencilla. Basta [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="text-align: justify;">A veces, incluir un nuevo disco duro en nuestro servidor puede ser cuanto menos una odisea. Me refiero al hecho de que en alguna ocasión el sistema renombra los <em>/dev/sdxx</em> de nuevo, con un orden distinto al que había antes. Esto, como es lógico supone un problema de montaje. La solución es bastante sencilla. Basta con reconfigurar el archivo <em>fstab</em>, cambiando los <em>/dev/sdxx</em> de cada disco duro por su UUID.</p>
<p style="text-align: justify;">Para averiguar el UUID de cada disco duro:</p>
<p style="text-align: justify;"><em><span style="color: #800000;"># blkid</span></em></p>
<p style="text-align: justify;">Arrojará algo como esto:</p>
<p><em><span style="color: #808080;">/dev/sda1: UUID=&#8221;7ae64ce1-cd96-459d-ab78-5ad34b475660&#8243; TYPE=&#8221;ext3&#8243;<br />
/dev/sda5: TYPE=&#8221;swap&#8221;<br />
/dev/sda6: UUID=&#8221;cf8ce289-0418-456a-952b-707750728f25&#8243; TYPE=&#8221;ext3&#8243;</span></em></p>
<p>Como vemos la partición <em>swap</em> no ha sido mostrada. Para que se nos muestre la partición <em>swap</em>:</p>
<p><em><span style="color: #800000;"># swapoff -a</span></em></p>
<p><em><span style="color: #800000;"># mkswap /dev/sda5</span></em></p>
<p><span style="color: #808080;"><em>Configurando espacio de intercambio versión 1, tamaño = 3043315 kB<br />
no label, UUID=50ebe50e-a41f-42db-bb7b-4ee5d4ef021e</em></span></p>
<p><em><span style="color: #800000;"># swapon -a</span></em></p>
<p>(donde /dev/sda5 es la partición <em>swap</em> en el ejemplo)</p>
<p>Ahora cada vez que usemos el comando <em><span style="color: #800000;">blkid</span></em> nos mostrará también el UUID de la partición <em>swap</em>.</p>
<p><em><span style="color: #800000;"># blkid</span></em></p>
<p><span style="color: #808080;"><em>/dev/sda1: UUID=&#8221;7ae64ce1-cd96-459d-ab78-5ad34b475660&#8243; TYPE=&#8221;ext3&#8243;<br />
/dev/sda5: TYPE=&#8221;swap&#8221; UUID=&#8221;50ebe50e-a41f-42db-bb7b-4ee5d4ef021e&#8221;<br />
/dev/sda6: UUID=&#8221;cf8ce289-0418-456a-952b-707750728f25&#8243; TYPE=&#8221;ext3&#8243;</em></span></p>
<p><span style="color: #800000;"><span style="color: #000000;">Luego debemos modificar el alchivo fstab sustituyendo el nombre de las particiones /dev/sdxx por el del UUID de forma que queda algo como lo siguiente:</span></span></p>
<p><em><span style="color: #800000;"># nano /etc/fstab</span></em></p>
<p><span style="color: #808080;"><em># /etc/fstab: static file system information.<br />
#<br />
# &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;<br />
proc            /proc           proc    defaults        0       0<br />
UUID=<em>7ae64ce1-cd96-459d-ab78-5ad34b475660</em> /               ext3    errors=remount-ro 0       1<br />
UUID=<em>cf8ce289-0418-456a-952b-707750728f25</em> /home           ext3    defaults        0       2<br />
UUID=<em>50ebe50e-a41f-42db-bb7b-4ee5d4ef021e</em> none            swap    sw              0       0<br />
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0<br />
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0</em></span></p>
<p><span style="color: #800000;"><span style="color: #000000;">Ahora ya no importa si conectamos un nuevo disco duro al servidor.<br />
</span></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/683/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cambio de Placa Base en el Servidor</title>
		<link>http://www.laestacionerrante.com/archives/671</link>
		<comments>http://www.laestacionerrante.com/archives/671#comments</comments>
		<pubDate>Tue, 29 Dec 2009 09:09:04 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=671</guid>
		<description><![CDATA[Hace poco tuve un problema con el servidor: kernel panic. Después de googlear un poco, averigué que todo apuntaba a un fallo de memoria. La odisea para intentar depurar el error fue muy engorrosa, y aunque me olía que uno de los módulos podía estar dañado, no acabé de confiar y decidí cambiar la placa [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="text-align: justify;">Hace poco tuve un problema con el servidor: kernel panic. Después de googlear un poco, averigué que todo apuntaba a un fallo de memoria. La odisea para intentar depurar el error fue muy engorrosa, y aunque me olía que uno de los módulos podía estar dañado, no acabé de confiar y decidí cambiar la placa base (Asus P5QC por una Aus P5K-E). En realidad era del otro pc que tengo en casa. Mantuve el procesador (un poco más veloz que el del servidor aunque también Core 2 Duo) y mantuve la memoria instalada (2G+2G). ¿Como lo hice? pues &#8220;a las bravas&#8221; que dirían por México: cambié todo diréctamente y arranqué el servidor. Inició perfecto sin fallo aparente, aunque un diagnóstico posterior sacó a relucir un error en la conexión a internet (fallo de la tarjeta de red). De hecho fue lo único que no reconoció, lo demás (puertos usb, pci, controlador sata, etc) lo reconoció sin problemas. Sin embargo un análisis posterior arrojó la conclusión de que en realidad sí reconoció la tarjeta de red, pero la renombró como eth2 en lugar de eth0.</p>
<p style="text-align: justify;">Basandome en las indicaciones de <a href="http://diegoacosta.net/index.php/2009/09/reconfiguracion-de-nombre-de-tarjeta-de-red-en-debian/" target="_blank">diegoacosta</a> busqué en el directorio <strong>/etc/udev/rules.d/</strong> el fichero correspondiente a la configuración de red de mi servidor (/etc/udev/rules.d/70-persistent-net.rules) que contenía la siguiente información:</p>
<p style="text-align: left;"><span style="color: #888888;"><em># PCI device 0&#215;1969:0&#215;1026 (ATL1E)<br />
SUBSYSTEM==&#8221;net&#8221;, ACTION==&#8221;add&#8221;, DRIVERS==&#8221;?*&#8221;, ATTR{address}==&#8221;00:22:&#8230;&#8230;&#8230;&#8221;, ATTR{type}==&#8221;1&#8243;, KERNEL==&#8221;eth*&#8221;, NAME=&#8221;eth0&#8243;</em></span></p>
<p style="text-align: left;"><span style="color: #888888;"><em># Firewire device  (nodemgr)<br />
SUBSYSTEM==&#8221;net&#8221;, ACTION==&#8221;add&#8221;, DRIVERS==&#8221;?*&#8221;, ATTR{address}==&#8221;00:1e:</em><em>&#8230;&#8230;&#8230;</em><em>&#8220;, ATTR{type}==&#8221;24&#8243;, KERNEL==&#8221;eth*&#8221;, NAME=&#8221;eth1&#8243;</em></span></p>
<p style="text-align: left;"><span style="color: #888888;"><em># PCI device 0&#215;11ab:0&#215;4364 (sky2)<br />
SUBSYSTEM==&#8221;net&#8221;, ACTION==&#8221;add&#8221;, DRIVERS==&#8221;?*&#8221;, ATTR{address}==&#8221;00:1d:</em><em>&#8230;&#8230;&#8230;</em><em>&#8220;, ATTR{dev_id}==&#8221;0&#215;0&#8243;, ATTR{type}==&#8221;1&#8243;, KERNEL==&#8221;eth*&#8221;, NAME=&#8221;eth2&#8243;</em></span></p>
<p style="text-align: left;"><span style="color: #888888;"><em># USB device 0&#215;0bda:0&#215;8187 (rtl8187)<br />
SUBSYSTEM==&#8221;net&#8221;, ACTION==&#8221;add&#8221;, DRIVERS==&#8221;?*&#8221;, ATTR{address}==&#8221;00:15:</em><em>&#8230;&#8230;&#8230;</em><em>&#8220;, ATTR{dev_id}==&#8221;0&#215;0&#8243;, ATTR{type}==&#8221;1&#8243;, KERNEL==&#8221;wlan*&#8221;, NAME=&#8221;wlan0&#8243;</em></span></p>
<p>En este caso, la interfaz nueva es la que tiene la mac <em>00:1d:</em><span style="color: #888888;"><em>&#8230;&#8230;&#8230;</em></span>, es suficiente con borrar la línea correspondiente a la mac antigua y cambiar eth2 por eth0:</p>
<p style="text-align: left;"><span style="color: #888888;"><em># PCI device 0&#215;11ab:0&#215;4364 (sky2)<br />
SUBSYSTEM==&#8221;net&#8221;, ACTION==&#8221;add&#8221;, DRIVERS==&#8221;?*&#8221;, ATTR{address}==&#8221;00:1d:</em></span><span style="color: #888888;"><em>&#8230;&#8230;&#8230;</em></span><span style="color: #888888;"><em>&#8220;, ATTR{dev_id}==&#8221;0&#215;0&#8243;, ATTR{type}==&#8221;1&#8243;, KERNEL==&#8221;eth*&#8221;, NAME=&#8221;eth0&#8243;</em></span></p>
<p style="text-align: left;"><span style="color: #888888;"><em># USB device 0&#215;0bda:0&#215;8187 (rtl8187)<br />
SUBSYSTEM==&#8221;net&#8221;, ACTION==&#8221;add&#8221;, DRIVERS==&#8221;?*&#8221;, ATTR{address}==&#8221;00:15:</em><em>&#8230;&#8230;&#8230;</em></span><span style="color: #888888;"><em><span style="color: #888888;">&#8220;, </span>ATTR{dev_id}==&#8221;0&#215;0&#8243;, ATTR{type}==&#8221;1&#8243;, KERNEL==&#8221;wlan*&#8221;, NAME=&#8221;wlan0&#8243;</em></span></p>
<p style="text-align: left;">Luego de hacer el cambio, simplemente se reinicia el ordenador y listo.</p>]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/671/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Montaje de un Servidor Ciego con Debian Lenny (16.-Instalación de TorrentFlux-b4rt)</title>
		<link>http://www.laestacionerrante.com/archives/593</link>
		<comments>http://www.laestacionerrante.com/archives/593#comments</comments>
		<pubDate>Sun, 23 Aug 2009 16:40:34 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=593</guid>
		<description><![CDATA[Nos conectamos por SSH al servidor. Antes de nada instalamos otras utilidades necesarias:
#apt-get install bzip2
#apt-get install unzip
#apt-get install uudeview
#apt-get install cksfv (en los repositorios de debian lenny no está, tendremos que activar momentáneamente los repositorios de testing)

Una vez allí lo primero es situarnos en la carpeta home del usuario root, donde descargaremos el archivo comprimido [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;">Nos conectamos por SSH al servidor. Antes de nada instalamos otras utilidades necesarias:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#apt-get install bzip2</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#apt-get install unzip</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#apt-get install uudeview</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#apt-get install cksfv </span></span></em></span></span><span style="font-size: x-small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">(en los repositorios de debian lenny no está, tendremos que activar momentáneamente los repositorios de testing)</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;">Una vez allí lo primero es situarnos en la carpeta </span></span><span style="font-size: small;"><em><span style="text-decoration: none;">home</span></em></span><span style="font-size: small;"><span style="text-decoration: none;"> del usuario </span></span><span style="font-size: small;"><em><span style="text-decoration: none;">root</span></em></span><span style="font-size: small;"><span style="text-decoration: none;">, donde descargaremos el archivo comprimido del programa, y con el que trabajaremos a partir de ahora:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#cd /root<br />
#wget </span></span></em></span></span><span style="color: #800000;"><em><a href="http://download2.berlios.de/tf-b4rt/torrentflux-b4rt_1.0-beta2.tar.bz2">http://download2.berlios.de/tf-b4rt/torrentflux-b4rt_1.0-beta2.tar.bz2</a></em></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;">Tras descargar el archivo, debería tardar poco, tenemos que descomprimirlo de la siguiente manera:</p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#bunzip2 torrentflux-b4rt_1.0-beta2.tar.bz2</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#tar xvf torrentflux-b4rt_1.0-beta2.tar</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">Ahora vamos a crear la carpeta de </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">torrentflux</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;"> y por eso tendremos que copiar allí todo lo que haya en la carpeta </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">html</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">:</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#mkdir /home/usuarioweb/www/torrentflux<br />
#cp-r html / * /home/usuarioweb/www/torrentflux<br />
</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">Le cambiamos el propietario a la carpeta asignándole <em>www-data</em> que es utilizado por el usuario de <em>Apache</em> (el servidor web) pueda acceder a los archivos utilizados por<em> TorrentFlux</em>.</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#chown-R www-data:www-data /home/usuarioweb/www/torrentflux </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;">Ahora hay que abrir un navegador dirigirlo allí: http://la Ip del servidor o Pc/torrentflux<br />
y tendrías que ver algo como esto:</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 0pt none;" src="http://www.kubuntu-es.org/files/kubuntu-es.org/u3122/instant__nea1_0.png" border="0" alt="" width="425" height="153" align="bottom" /></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">Pasaremos por varios </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">Continue</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;"> en donde elegiremos la base de datos (en nuestro caso MySQL) y comprobará el PHP5, hasta que llegamos al siguiente punto importante, donde elegiremos la ruta donde guardará los archivos, aunque esa ruta será relativa pues en esa carpeta creará una carpeta por cada usuario que use y descargue algo con torrentflux-b4rt, pero lo que si </span></span></span></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">es importante es que esa ruta tenga los permisos correctos</span></span></span></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">, es decir que </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">www-data</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;"> el usuario de </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">Apache2</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;"> pueda escribir en ella. Lo guardaremos en “</span></span></span></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">/media/Archivos</span></span></span></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">“, para no tener problemas de permisos le he pasado el comando chmod con la opción 777, como veis a continuación, luego he indicado la ruta en el script de instalación del programa como veis en la captura:</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">#chmod 777 /media/Archivos/</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: center;"><img class="aligncenter" style="border: 0pt none;" src="http://farm3.static.flickr.com/2391/1536894877_5e69083689.jpg" border="0" alt="" width="425" height="247" align="bottom" /></p>
<p style="text-align: justify;">Pasado este punto, comprobará, de nuevo tras varios <em>Continue</em>, que tenemos todos los ejecutables que necesita para aprovechar todas las funciones, correctamente instalados, como veis en la captura a mi solo me falta uno, VLC, que solo se usa para hacer <em>Streaming</em> a través de la red directamente desde el propio programa, pero yo no necesito esa opción y me parece excesivo instalar <em>VLC</em> así que no lo instalo. Pero si os parece una función necesaria solo tenéis que instalarlo antes de este paso y lo detectará automáticamente. Podéis verlo en la captura:</p>
<p style="text-align: center;"><a href="http://farm3.static.flickr.com/2335/1537760030_27c1b83d7b_o.png" target="_blank"><span style="color: #000080;"><img class="aligncenter" style="border: 1px solid black;" src="http://farm3.static.flickr.com/2335/1537760030_667a6c44b8.jpg" border="1" alt="" width="425" height="212" align="bottom" /></span></a></p>
<p style="text-align: justify;">Una vez superado este punto hemos llegado al punto final del <em>script</em> de instalación, donde como podéis ver en la captura, nos comenta un detalle importante, cuando nos salga por primera vez la ventana de login, el usuario y la contraseña que introduzcamos serán las que el programa guardará como las del usuario SuperAdmin, así que fijaros bien que escribís que luego necesitaréis esa clave y user.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 0pt none;" src="http://farm3.static.flickr.com/2322/1537760690_e6eae33cc1.jpg" border="0" alt="" width="425" height="247" align="bottom" /></p>
<p style="text-align: justify;">Tras este paso veremos la ventana de Login, como veis en la captura, el usuario y la contraseña que introduzcáis ahora serán las que se guardarán como las del usuario SuperAdmin, así que aseguraos bien que ponéis y recordadlo claro.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 0pt none;" src="http://farm3.static.flickr.com/2198/1536849306_228bfa589b_o.png" border="0" alt="" width="425" height="208" align="bottom" /></p>
<p style="text-align: justify;">
<p style="text-align: justify;">Una vez puestos <em>Username</em> y <em>Password</em>, veremos la pantalla de configuración de <em>Torrentflux-b4rt</em>, y podremos configurar todos los aspectos del programa. Aquí os dejo una del programa en acción para que veáis como es funcionando:</p>
<p style="text-align: center;"><a href="http://farm3.static.flickr.com/2196/1535981215_e7d8b2211c_o.png" target="_blank"><span style="color: #000080;"><img class="aligncenter" style="border: 1px solid black;" src="http://farm3.static.flickr.com/2196/1535981215_d7ad75a30f.jpg" border="1" alt="" width="425" height="215" align="bottom" /></span></a></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">Un consejo: es muy recomendable configurar bien los límites de subida y bajada de acuerdo a nuestra conexión. De lo contrario consumirá todo el ancho de banda de nuestro servidor pudiéndose dar el caso de que no se puedan ofrecer otros servicios tan básicos durante la ejecución de torrentflux tales como la compartición de archivos.</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span style="background: transparent none repeat scroll 0% 0%;">Hasta aquí. Seguramente habrán muchas más utilidades para un servidor, pero con estas a mí me basta. De todos modos siempre es bueno conocer otras cosas que en cualquier momento futuro puedan llegar a ser útiles.</span></span></span></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/593/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Montaje de un Servidor Ciego con Debian Lenny (15.-Servidor DNS con Bind9)</title>
		<link>http://www.laestacionerrante.com/archives/588</link>
		<comments>http://www.laestacionerrante.com/archives/588#comments</comments>
		<pubDate>Sun, 23 Aug 2009 11:10:22 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=588</guid>
		<description><![CDATA[Vamos a agregar un servicio de DNS al servidor para que resuelva todos los nombres y direcciones IP que necesite desde la red de área local. Lo que ganamos con esto es simplemente tiempo. No es lo mismo acceder a un servidor DNS de nuestro proveedor de servicios de Internet ( ISP ) por nuestro [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Vamos a agregar un servicio de </span></span><em><span style="text-decoration: none;"><span>DNS</span></span></em><span style="text-decoration: none;"><span> al servidor para que resuelva todos los nombres y direcciones IP que necesite desde la red de área local. Lo que ganamos con esto es simplemente tiempo. No es lo mismo acceder a un servidor </span></span><em><span style="text-decoration: none;"><span>DNS</span></span></em><span style="text-decoration: none;"><span> de nuestro proveedor de servicios de Internet ( ISP ) por nuestro </span></span><em><span style="text-decoration: none;"><span>router</span></span></em><span style="text-decoration: none;"><span> que acceder a una maquina que está conectada a nuestra red interna donde la velocidad de conexión es mucho mayor que la que nos pueda ofrecer cualquier ADSL</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Para instalarlo accedemos a una Terminal, nos identificamos como súper usuario </span></span><em><span style="text-decoration: none;"><span>root</span></span></em><span style="text-decoration: none;"><span> con el comando su y procedemos a su instalación con:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install bind9</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Ahora vamos a editar antes de nada el fichero </span></span><em><span style="text-decoration: none;"><span>resolv.conf</span></span></em></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/resolv.conf</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Veremos algo así:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>nameserver 89.29.160.2 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>nameserver 192.168.0.1 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Lo modificamos dejándolo así:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>search </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">ejemplo.no-ip.info</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> #dirección del servidor<br />
nameserver 127.0.0.1 #lo dejamos así<br />
nameserver </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">192.168.0.1</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> #ip del router o puerta de enlace</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Una vez modificado vamos ha hacer una copia de seguridad del archivo de configuración de bind9 </span></span><em><span style="text-decoration: none;"><span>named.conf.options</span></span></em></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#cp /etc/bind/named.conf.options /etc/bind/named.conf.optionsOLD</span></span></em></span></span></p>
<p>Ahora lo editamos con:</p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/bind/named.conf.options</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Veremos algo así:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>options { </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>directory &#8220;/var/cache/bind&#8221;; </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// If there is a firewall between you and nameservers you want </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// to talk to, you may need to fix the firewall to allow multiple </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// ports to talk.  See http://www.kb.cert.org/vuls/id/800113 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// If your ISP provided one or more IP addresses for stable </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// nameservers, you probably want to use them as forwarders. </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// Uncomment the following block, and insert the addresses replacing </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// the all-0&#8217;s placeholder. </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// forwarders { </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>//      0.0.0.0; </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// }; </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>auth-nxdomain no;    # conform to RFC1035 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>listen-on-v6 { any; }; </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="font-style: normal;" align="justify"><span style="text-decoration: none;"><span>modificamos las lineas …</span></span></span></p>
<p><em><span>// forwarders {<br />
// 0.0.0.0;<br />
// };</span></em></p>
<p>y añadimos la linea …</p>
<p><em><span>query-source address * port 53;</span></em></p>
<p>introducimos nuestra<span> </span><em><span>IP</span></em><em><span> </span></em><em><span>localhost</span></em> y descomentamos las lineas quedándonos así :</p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>options { </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>directory &#8220;/var/cache/bind&#8221;; </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// If there is a firewall between you and nameservers you want </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// to talk to, you may need to fix the firewall to allow multiple </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// ports to talk.  See http://www.kb.cert.org/vuls/id/800113 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">query-source address * port 53;</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> </span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// If your ISP provided one or more IP addresses for stable </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// nameservers, you probably want to use them as forwarders. </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// Uncomment the following block, and insert the addresses replacing </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>// the all-0&#8217;s placeholder. </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">forwarders { </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"><span style="background: #ffff00 none repeat scroll 0% 0%;"> <span style="font-size: x-small;"><em><span>127.0.0.1; </span></em></span></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"><span style="background: #ffff00 none repeat scroll 0% 0%;"> <span style="font-size: x-small;"><em><span>192.168.0.1; </span></em></span></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"><span style="background: #ffff00 none repeat scroll 0% 0%;"> <span style="font-size: x-small;"><em><span>};</span></em></span></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> </span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>auth-nxdomain no;    # conform to RFC1035 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>listen-on-v6 { any; }; </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Ahora podríamos reiniciar solo los servicios de la RED y del DNS pero yo prefiero reiniciar para ver si todo arranca perfectamente y no tiene problemas con otros programas que tengamos instalados:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#reboot</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Una vez reiniciada la maquina vamos a ver que tal funciona. Como podremos ver a continuación el acceso a nombres en Internet va a ser súper rápido una vez accedamos a el por primera vez ya que todos los nombres que resolvamos conforme vallamos navegando se irán guardando en una tabla cache localmente en nuestro servidor.</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Vamos a usar para esto el comando </span></span><em><span style="text-decoration: none;"><span>dig</span></span></em><span style="text-decoration: none;"><span>, probaremos con el dominio </span></span><em><span style="text-decoration: none;"><span>google.com</span></span></em></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#dig www.google.com</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; Query time: 26 msec </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; SERVER: 127.0.0.1#53(127.0.0.1) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; WHEN: Sat May  9 18:14:57 2009 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; MSG SIZE  rcvd: 244</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Si nos fijamos a tardado unos </span></span><em><span style="text-decoration: none;"><span>26 milisegundos</span></span></em><span style="text-decoration: none;"><span>, pero si repetimos veremos que es muchísimo mas rápido que la primera vez:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#dig www.google.com</span></span></em></span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; Query time: 2 msec </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; SERVER: 127.0.0.1#53(127.0.0.1) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; WHEN: Sat May  9 18:16:54 2009 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>;; MSG SIZE  rcvd: 244</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="font-style: normal;" align="justify"><span style="text-decoration: none;"><span>2 milisegundos es lo que ha tardado la segunda vez. Como veis es una manera mas de agilizar nuestra navegación en Internet ya que siempre sera mas rápido nuestro cable de red local conectado a </span></span><em><span style="text-decoration: none;"><span>10/100 Mbps </span></span></em><span style="text-decoration: none;"><span>que no el ancho de banda que nos pueda ofrecer nuestro </span></span><em><span style="text-decoration: none;"><span>Router</span></span></em><span style="text-decoration: none;"><span>.</span></span></span></p>
<p align="justify">Si necesitamos ofrecer servicio de <em><span>DNS</span></em> a todos los ordenadores que quisieran usar nuestro servidor desde Internet tan solo tendríamos que abrir el <em><span>puerto 53</span></em> y <em><span>redireccionarlo</span></em> hacia la <em><span>IP</span></em> de nuestro servidor aunque esto es una cosa que no recomiendo ya que si se sirven de este servicio muchos ordenadores a la vez podríamos tener problemas. No hablo de nuestro servidor ya que el haría su trabajo sin problemas pero nuestro ancho de banda de la <em><span>ADSL</span></em><em> </em>es tan pequeño que incluso podríamos tener problemas a la hora de acceder a Internet.</p>
<p align="justify">Localmente es una solución ideal para entornos donde se conectan varios ordenadores a Internet desde una misma área local agilizando la traducción de nombres a ips.</p>
<p align="justify">Ahora ya tenemos nuestro propio <em><span>servidor DNS</span></em> listo para la trabajar. Seguidamente vamos a configurar todos nuestros ordenadores para que puedan hacer uso de él.</p>
<p align="justify">En la mayoría de los sistemas <em><span>Linux</span></em> incluyendo, podemos configurarlo en el fichero <em><span>resolv.conf</span></em> agregando la <em><span>IP</span></em><em><span> </span></em>de nuestro servidor en la linea <em><span>nameserver</span></em> y nuestro dominio en la linea search. Como ejemplo, en un ordenador de nuestra red privada:</p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/resolv.conf</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p align="justify">Dejándolo tal que así:</p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>search </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">ejemplo.no-ip.info</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> #dirección del servidor<br />
nameserver </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">192.168.0.XXX </span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#ip del servidor<br />
nameserver </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: transparent none repeat scroll 0% 0%;">192.168.0.1</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> #ip del router o puerta de enlace</span></span></em></span></span></p>
<p style="font-style: normal;" align="justify">]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/588/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Montaje de un Servidor Ciego con Debian Lenny (14.-Seguridad con Fail2ban)</title>
		<link>http://www.laestacionerrante.com/archives/578</link>
		<comments>http://www.laestacionerrante.com/archives/578#comments</comments>
		<pubDate>Sun, 23 Aug 2009 11:03:21 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=578</guid>
		<description><![CDATA[La aplicación que vamos a usar para protegernos se llama Fail2Ban y se va a encargar de hacer de guardián las 24 horas del día bloqueando a todo aquel que tenga un numero de intentos fallidos de login en alguno de nuestros servicios. Vamos con su instalación. Ejecutamos una Terminal y nos logeamos como súper [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p align="justify"><span>La aplicación que vamos a usar para protegernos se llama </span><em><span style="text-decoration: none;"><span>Fail2Ban</span></span></em><span> y se va a encargar de hacer de guardián las 24 horas del día bloqueando a todo aquel que tenga un numero de intentos fallidos de login en alguno de nuestros servicios. Vamos con su instalación.</span> Ejecutamos una Terminal y nos logeamos como súper usuario <em><span>root</span></em> con el comando <em><span>su</span></em>, a continuación lo instalamos con</p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install fail2ban</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Ahora vamos a renombrar el fichero de configuración </span></span><em><span style="text-decoration: none;"><span>jail.conf</span></span></em><span style="text-decoration: none;"><span> por </span></span><em><span style="text-decoration: none;"><span>jail.confOLD</span></span></em><span style="text-decoration: none;"><span> ya que este mismo nos puede servir como referencia</span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.confOLD</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p align="justify">Como podemos ver en el interior de el archivo <em><span>jail.confOLD</span></em>, ya hay varias opciones editadas por defecto y solo están a la espera de ser editadas para ser activadas. A continuación os voy a exponer cual es mi configuración para que os sirva como ejemplo.</p>
<p>Creamos un nuevo <em>jail.conf</em> para asignarle nuestras propias regla</p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/fail2ban/jail.conf</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p>Especificando un poco sobre el fichero de configuración:</p>
<p style="margin-left: 2.41cm;"><em>ignoreip</em><em> : IPs de nuestra área local que queremos que se haga la vista gorda en caso de equivocación.<br />
</em><em>bantime</em><em> : Tiempo que el usuario que fallo el logeo se quedara sin poder acceder al servicio especificado en segundos.<br />
</em><em>maxretry</em><em> : Numero de intentos de logeo.<br />
</em><em>backend</em><em> : Permite de un modo o otro la escritura de ficheros log.<br />
</em><em>destemail</em><em> : Dirección de correo donde nos enviara las alertas.<br />
</em><em>action</em><em> : Forma en que </em><em><em>iptables</em></em><em> aplica sus reglas.<br />
</em><em>mail-whois-lines</em><em> : Se especifica que queremos que nos envié al correo en caso de intrusión.</em></p>
<p style="margin-left: -0.03cm; font-style: normal;">Esas lineas explican la configuración básica de el fichero, a continuación vamos a ver un ejemplo de las celdas que creamos para cada servicio:</p>
<p style="margin-left: 2.41cm;"><em>[</em><em>ssh</em><em>] : Tomare ssh como ejemplo pero esta es una linea que da igual lo que pongamos, ya que no afecta a la configuración.<br />
</em><em>enable</em><em> : Podemos introducir true para activarlo y false para desactivarlo.<br />
</em><em>port</em><em> : Nombre del servicio relacionado con el puerto.<br />
</em><em>filter</em><em> : Nombre del archivo .conf ubicado en el subdirectorio /etc/fail2ban/filter.d, este va relacionado con algún filtro ya creado.<br />
</em><em>logpath</em><em> : Ruta donde se ubica el fichero log donde se almacena toda la información de el servicio en cuestión.<br />
</em><em>maxretry</em><em> : Numero de intentos fallidos, aquí podemos especificar un carácter diferente para cada celda que creemos.<br />
</em><em>findtime</em><em> : Si alguien prueba x intentos en este periodo de tiempo especificado en segundos se le considera ataque.</em></p>
<p align="justify">Yo voy a proteger a los servicios <em><span>SSH</span></em><em><span>, </span></em><em><span>FTP</span></em>, y al <em><span>WWW</span></em> que son los que ofrecen mi servidor hacia internet. A cada uno le voy a dar un retardo de 300 segundos que vienen a ser unos 5 minutos para que durante ese tiempo el usuario que quiera conectarse no le sea una molestia esta medida de seguridad. 5 minutos es suficiente para evitar el uso malintencionado de un ataque por fuerza bruta o también llamado diccionario de nombres.</p>
<p align="justify">Si nos fijamos en mi fichero de configuración veréis un ejemplo de como lo tengo yo montado</p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Fail2Ban configuration file. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># This file was composed for Debian systems from the original one </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#  provided now under /usr/share/doc/fail2ban/examples/jail.conf </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#  for additional examples. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># To avoid merges during upgrades DO NOT MODIFY THIS FILE </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># and rather provide your changes in /etc/fail2ban/jail.local </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Author: Yaroslav O. Halchenko &lt;&#x64;&#x65;&#x62;&#x69;&#x61;&#x6e;&#x40;&#x6f;&#x6e;&#x65;&#x72;&#x75;&#x73;&#x73;&#x69;&#x61;&#x6e;&#x2e;&#x63;om&gt; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># $Revision: 281 $ </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># The DEFAULT allows a global definition of the options. They can be override </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># in each jail afterwards. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[DEFAULT] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># &#8220;ignoreip&#8221; can be an IP address, a CIDR mask or a DNS host </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>ignoreip = 127.0.0.1 </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">192.168.0.0/24 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>bantime  = </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">300 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry =</span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"> 3</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> </span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># &#8220;backend&#8221; specifies the backend used to get files modification. Available </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># options are &#8220;gamin&#8221;, &#8220;polling&#8221; and &#8220;auto&#8221;. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># yoh: For some reason Debian shipped python-gamin didn&#8217;t work as expected </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#      This issue left ToDo, so polling is default backend for now </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>backend = polling </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Destination email address used solely for the interpolations in </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># jail.{conf,local} configuration files. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>destemail = root@localhost </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># ACTIONS </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Default banning action (e.g. iptables, iptables-new, </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># iptables-multiport, shorewall, etc) It is used to define </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># action_* variables. Can be overriden globally or per </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># section within jail.local file </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>banaction = iptables-multiport </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># email action. Since 0.8.1 upstream fail2ban uses sendmail </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># MTA for the mailing. Change mta configuration parameter to mail </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># if you want to revert to conventional &#8216;mail&#8217;. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>mta = sendmail</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Default protocol </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>protocol = tcp </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Action shortcuts. To be used to define action parameter </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># The simplest action to take: ban only </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># ban &amp; send an e-mail with whois report to the destemail. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s] </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># ban &amp; send an e-mail with whois report and relevant log lines </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># to the destemail. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>%(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s] </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Choose default action.  To change, just override value of &#8216;action&#8217; with the </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># interpolation to the chosen action shortcut (e.g.  action_mw, action_mwl, etc) in jail.local </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># globally (section [DEFAULT]) or per specific section </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>action = %(action_)s</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># JAILS </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Next jails corresponds to the standard configuration in Fail2ban 0.6 which </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># was shipped in Debian. Enable any defined here jail by including </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># [SECTION_NAME] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># enabled = true </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># in /etc/fail2ban/jail.local. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Optionally you may override any other parameter (e.g. banaction, </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># action, port, logpath, etc) in that section within jail.local </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[ssh] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled = true </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port    = </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">XXX</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter  = sshd </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/auth.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">3 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Generic filter for pam. Has to be used with action which bans all ports </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># such as iptables-allports, shorewall </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[pam-generic] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># pam-generic filter can be customized to monitor specific subset of &#8216;tty&#8217;s </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter  = pam-generic </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># port actually must be irrelevant but lets leave it all for some possible uses </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port = all </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>banaction = iptables-allports </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = anyport </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/auth.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = 6 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[xinetd-fail] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled   = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter    = xinetd-fail </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port      = all </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>banaction = iptables-multiport-log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath   = /var/log/daemon.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry  = 2 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[ssh-ddos] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port    = ssh </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter  = sshd-ddos </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/auth.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = 6 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># HTTP servers </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[apache] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port    = http,https </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter  = apache-auth </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath = /var/log/apache*/*error.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">3 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># default action is now multiport, so apache-multiport jail was left </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># for compatibility with previous (&lt;0.7.6-2) releases</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[apache-multiport] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled   = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port      = http,https </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter    = apache-auth </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath   = /var/log/apache*/*error.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry  = 6 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[apache-noscript] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port    = http,https </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter  = apache-noscript </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath = /var/log/apache*/*error.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">3 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[apache-overflows] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port    = http,https </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter  = apache-overflows </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath = /var/log/apache*/*error.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = 2 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># FTP servers </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[vsftpd] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = ftp,ftp-data,ftps,ftps-data </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = vsftpd </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/vsftpd.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># or overwrite it in jails.local to be </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># logpath = /var/log/auth.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># if you want to rely on PAM failed login attempts </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># vsftpd&#8217;s failregex should match both of those formats </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = 6 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[proftpd] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = ftp,ftp-data,ftps,ftps-data , </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">XXX</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = proftpd </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/proftpd/proftpd.log</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">3 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[wuftpd] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = ftp,ftp-data,ftps,ftps-data </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = wuftpd </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/auth.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>maxretry = 6 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Mail servers </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[postfix] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = smtp,ssmtp </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = postfix </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/mail.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[couriersmtp] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = smtp,ssmtp </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = couriersmtp </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/mail.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Mail servers authenticators: might be used for smtp,ftp,imap servers, so </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># all relevant ports get banned </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[courierauth] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = courierlogin </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/mail.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[sasl] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = sasl </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/mail.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># DNS Servers </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># These jails block attacks against named (bind9). By default, logging is off </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># with bind9 installation. You will need something like this: </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># logging { </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#     channel security_file { </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#         file &#8220;/var/log/named/security.log&#8221; versions 3 size 30m; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#         severity dynamic; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#         print-time yes; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#     }; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#     category security { </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#         security_file; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#     }; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># } </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># in your named.conf to provide proper logging </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Word of Caution: </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Given filter can lead to DoS attack against your DNS server </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># since there is no way to assure that UDP packets come from the </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># real source IP </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[named-refused-udp] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = domain,953 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>protocol = udp </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = named-refused </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/named/security.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>[named-refused-tcp] </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="text-decoration: none;"> </span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>enabled  = false </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>port     = domain,953 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>protocol = tcp </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>filter   = named-refused </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>logpath  = /var/log/named/security.log </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">findtime = 600</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p align="justify"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Como podéis ver en la configuración anterior se especifican reglas para cada servicio especificando el puerto, filtro, ruta donde se ubica el fichero </span></span></span></span><span style="color: #000000;"><em><span style="text-decoration: none;"><span>log</span></span></em></span><span style="font-style: normal;"><span style="text-decoration: none;"><span> que genera el servicio y el máximo de intentos de logeo. </span></span></span></span>Una vez editado este fichero de configuración salimos y guardamos. A continuación ejecutamos nuestro guardián con:</p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#fail2ban-client start</span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Si todo va bien veremos algo así:</span></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>2009-05-13 19:15:49,367 fail2ban.server : INFO   Starting Fail2ban v0.8.3 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>2009-05-13 19:15:49,368 fail2ban.server : INFO   Starting in daemon mode </span></span></em></span></span></p>
<p style="margin-bottom: 0cm;" align="left">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="text-decoration: none;"><span>Si lo configuramos correctamente solo veremos esta linea, si no veremos alguna linea tipo </span></span><em><span style="text-decoration: none;"><span>Warning. ( ATENCIÓN</span></span></em><span style="text-decoration: none;"><span> : Ella siempre nos especifica el problema que tenemos en el fichero </span></span><em><span style="text-decoration: none;"><span>fail.conf</span></span></em><span style="text-decoration: none;"><span>).</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">
<p style="margin-bottom: 0cm; font-style: normal;" align="justify"><span style="font-size: small;"><span style="text-decoration: none;"><span>Si queréis ver que tal andamos de bloqueos podéis ver el fichero </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>fail2ban.log</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> que se ubica en la ruta </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>/var/log</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> donde se guardan todos los bloqueos, ips, fecha y hora de quien nos está atacando</span></span></span></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/578/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Un Poco de Seguridad en las Transmisiones FTP: ProFTPD con TLS</title>
		<link>http://www.laestacionerrante.com/archives/566</link>
		<comments>http://www.laestacionerrante.com/archives/566#comments</comments>
		<pubDate>Tue, 11 Aug 2009 18:52:41 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=566</guid>
		<description><![CDATA[Suponiendo que tenemos instalado en nuestro servidor ProFTPD y OpenSSL, podemos configurar el servicio FTP para que trabaje con un poco más de seguridad. Las transmisiones a través de FTP son de por sí inseguras por que viajan en texto plano. Con TLS conseguiremos cifrar la información. Para activarlo debemos modificar el archivo de configuración [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p>Suponiendo que tenemos instalado en nuestro servidor ProFTPD y OpenSSL, podemos configurar el servicio FTP para que trabaje con un poco más de seguridad. Las transmisiones a través de FTP son de por sí inseguras por que viajan en texto plano. Con TLS conseguiremos cifrar la información. Para activarlo debemos modificar el archivo de configuración de ProFTPD:</p>
<p><em><span style="color: #800000;">#cd /etc/proftpd/</span></em></p>
<p><em><span style="color: #800000;">#nano proftpd.conf</span></em></p>
<p>Y añadir lo siguiente:</p>
<pre><span style="color: #003366;"># Includes DSO modules</span></pre>
<pre><span style="color: #003366;">Include /etc/proftpd/modules.conf</span></pre>
<p>Y&#8230;.</p>
<pre><span style="color: #003366;"># This is used for FTPS connections</span></pre>
<pre><span style="color: #003366;">Include /etc/proftpd/tls.conf</span></pre>
<p>Para poder trabajar con TLS debemos crear un certificado SSL. Para ello crearemos antes una carpeta para guardarlos:</p>
<p><em><span style="color: #800000;"># mkdir /etc/proftpd/ssl</span></em></p>
<p>Entonces generaremos el certificado:</p>
<p><em><span style="color: #800000;"># openssl req -new -x509 -days 365 -nodes -out /etc/proftpd/ssl/proftpd.cert.pem -keyout /etc/proftpd/ssl/proftpd.key.pem</span></em></p>
<p>Ahora abriremos el archivo de configuración de TLS:</p>
<p><em><span style="color: #800000;"># nano /etc/proftpd/tls.conf</span></em></p>
<p>Y añadimos lo siguiente:</p>
<pre><span style="color: #003366;">&lt;IfModule mod_tls.c&gt;
TLSEngine                  on
TLSLog                     /var/log/proftpd/tls.log
TLSProtocol                SSLv23
TLSOptions                 NoCertRequest
TLSRSACertificateFile      /etc/proftpd/ssl/proftpd.cert.pem
TLSRSACertificateKeyFile   /etc/proftpd/ssl/proftpd.key.pem
TLSVerifyClient            off
TLSRequired                on
&lt;/IfModule&gt;</span></pre>
<p>Ahora tan solo debemos reiniciar ProFTPD:</p>
<p><em><span style="color: #800000;"># /etc/init.d/proftpd restart</span></em></p>
<p>Cabe señalar que la opción <em><span style="color: #003366;">TLSRequired</span></em> especifica la exclusividad de usar en el cliente FTP con TLS. Si la tenemos activada, como es el caso no podremos conectarnos al servidor por medio del FTP clásico.</p>
<p>No todos los clientes FTP disponen de conexión vía TLS. Sin embargo Filezilla sí. Para instalarlo:</p>
<p><em><span style="color: #800000;"># apt-get install filezilla</span></em></p>]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/566/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitorización de un SAI en Debian Lenny</title>
		<link>http://www.laestacionerrante.com/archives/537</link>
		<comments>http://www.laestacionerrante.com/archives/537#comments</comments>
		<pubDate>Mon, 10 Aug 2009 07:49:00 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=537</guid>
		<description><![CDATA[Fusilado de: http://www.eniac2000.com/?p=608
En líneas generales, un SAI (sistema de alimentación ininterrumpida) es un dispositivo que permite mantener la alimentación de dispositivos electrónicos (en este caso, un PC) cuando hay un corte en la corriente eléctrica, durante un período variable en función de las baterías con las que vaya equipado el SAI, pero que suele rondar [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="text-align: justify;">Fusilado de: <em><a href="http://www.eniac2000.com/?p=608" target="_blank">http://www.eniac2000.com/?p=608</a></em></p>
<p style="text-align: justify;">En líneas generales, un SAI (sistema de alimentación ininterrumpida) es un dispositivo que permite mantener la alimentación de dispositivos electrónicos (en este caso, un PC) cuando hay un corte en la corriente eléctrica, durante un período variable en función de las baterías con las que vaya equipado el SAI, pero que suele rondar el cuarto de hora-media hora, más que suficiente para que vuelva la luz o alguien vuelva a poner los plomos en su sitio. Además el SAI actua como estabilizador de corriente, protegiendo al PC de las variaciones en el suministro (lo que se suele conocer como <em>“la chispa adecuada”</em> -adecuada para achicharrarte el equipo-).</p>
<p style="text-align: justify;">Eso ya de por sí estaría bien, pero puestos a llevar la situación al extremo, podría suceder que el apagón tuviera una duración mayor del tiempo que el SAI es capaz de suministrar energía, o que no hubiera nadie para volver a dar los plomos. El corte indeseado de corriente se produciría igualmente, pero con una cierta demora. Sin embargo, los SAIs vienen equipados con un puerto de comunicación (generalmente serie o USB) que permite al ordenador saber cuándo la batería del SAI está llegando a un nivel crítico, y apagarse de manera automática. Pues bien, Linux está preparado para llevar a cabo este proceso, en concreto haciendo uso de NUT (<a href="http://www.networkupstools.org/">Network UPS Tools</a>).</p>
<p style="text-align: justify;">Para configurar la monitorización de un SAI en Debian el procedimiento a seguir sería el siguiente:</p>
<p style="text-align: justify;"><span style="text-decoration: underline;"><em><strong>Instalación de NUT</strong></em></span></p>
<p style="text-align: justify;">En Debian es tan simple como instalar NUT mediante apt-get:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em># apt-get install nut</em></span></p>
<p style="text-align: justify;"><span style="text-decoration: underline;"><em><strong>Instalación de paquetes auxiliares</strong></em></span></p>
<p style="text-align: justify;">Puede ser necesario realizar una instalación de paquetes auxilares. Estos paquetes son los siguientes:</p>
<ul style="text-align: justify;">
<li>nut-usb: Necesario si el SAI sólo tiene conexión USB (el Yukai dispone de puerto serie y USB; yo he elegido utilizar el puerto serie para tener un puerto USB más disponible)</li>
<li>nut-snmp: Necesario si se necesita un driver <a href="http://es.wikipedia.org/wiki/Simple_Network_Management_Protocol">SNMP</a> para monitorizar el SAI en red local</li>
<li>nut-cgi: Este paquete ofrece una interfaz web, programada en CGI, para monitorizar el SAI desde un navegador web</li>
<li>knutclient: Este paquete proporciona una aplicación cliente de KDE para monitorizar el SAI</li>
</ul>
<p style="text-align: justify;"><span style="text-decoration: underline;"><em><strong>Configuración de NUT</strong></em></span></p>
<p style="text-align: justify;">Una vez realizado el proceso de instalación mediante apt-get, es preciso realizar la configuración de NUT para que reconozca nuestro SAI. En primer lugar, es preciso editar el archivo <em>/etc/default/nut</em> para hacer que los demonios de NUT se inicien de manera automática. El contenido del archivo debe ser el siguiente:</p>
<p style="text-align: justify;"><em><span style="color: #800000;"># start upsd<br />
START_UPSD=yes</span></em></p>
<p style="text-align: justify;"><em><span style="color: #800000;"># start upsmon<br />
START_UPSMON=yes</span></em></p>
<p style="text-align: justify;"><em>U</em>na vez hecho esto, es preciso añadir el usuario <em>nut</em> al grupo <em>dialout </em>y<em> tty</em>, propietario de los puertos serie:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em># adduser nut dialout</em></span></p>
<p><span style="color: #800000;"><em># adduser nut tty<br />
</em></span></p>
<p style="text-align: justify;">A continuación hay que configurar el controlador de nut. Los archivos de configuración del controlador deben encontrarse en el directorio <em>/etc/nut</em>. Sin embargo, la instalación de apt-get crea el directorio, pero no incluye por defecto ningún archivo en el directorio, siendo preciso copiarlos desde el directorio <em>/usr/share/doc/nut/examples/</em>:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em># cp /usr/share/doc/nut/examples/*.conf.sample /etc/nut<br />
# cp /usr/share/doc/nut/examples/*.users.sample /etc/nut</em></span></p>
<p style="text-align: justify;">(Luego habrá que renombrarlos quitándole la terminación <em><span style="color: #800000;">*.sample</span></em>.)</p>
<p style="text-align: justify;">En primer lugar ha de editarse el archivo <em>/etc/nut/ups.conf</em>. Su contenido ha de ser el siguiente:</p>
<p style="text-align: justify;"><em><span style="color: #800000;">[</span></em><em><span style="color: #800000;">misai]<br />
driver = megatec_usb<br />
port = auto</span></em></p>
<p style="text-align: justify;"><em>L</em>a primera línea designa el nombre que vamos a dar a nuestro SAI. La segunda indica a NUT el <a href="http://www.networkupstools.org/compat/">driver</a> a usar para comunicarse con nuestro SAI, y la tercera indica qué puerto de comunicación a usar (en este caso, el primer puerto serie -COM1-).</p>
<p style="text-align: justify;">En segundo lugar ha de configurarse el archivo <em>/etc/nut/upsd.conf</em>, que indica las máquinas con permisos para acceder al demonio upsd. Un ejemplo de configuración sería el siguiente:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em>ACL localhost 127.0.0.1/32<br />
ACL local_network 192.168.0.0/24<br />
ACL all 0.0.0.0/0</em></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><em>ACCEPT monitor localhost<br />
ACCEPT local_network<br />
REJECT all all</em></span></p>
<p style="text-align: justify;">Con esta configuración se está indicando que se permita el acceso al demonio al equipo local, así como a aquellos equipos que pertenezcan a la red local (siendo las direcciones de la red 192.168.0.xxx), y que rechace al resto de equipos.</p>
<p style="text-align: justify;">En tercer lugar se ha de indicar en el archivo <em>/etc/nut/upsd.users</em> qué usuarios tienen permisos para acceder al sistema de control de NUT, así como los permisos que tiene cada usuario. Un ejemplo de contenido sería el siguiente:</p>
<p style="text-align: justify;"><em><span style="color: #800000;">[admin]<br />
password    = passwordadmin<br />
allowfrom   = localhost local_network<br />
actions     = SET<br />
instcmds    = ALL</span></em></p>
<p style="text-align: justify;"><em><span style="color: #800000;">[control]<br />
password = passwordcontrol<br />
allowfrom = localhost local_network<br />
upsmon master</span></em></p>
<p style="text-align: justify;"><em><span style="color: #800000;">[clientes]<br />
password = passwordclientes<br />
allowfrom = local_network<br />
upsmon slave</span></em></p>
<p style="text-align: justify;">El código entre corchetes indica el nombre del usuario creado; la línea password especifica la contraseña del usuario, la línea allowfrom indica desde dónde (definido en el archivo <em>/etc/nut/upsd.conf</em>) se puede conectar ese usuario. La línea actions define las acciones que ese usuario puede realizar, la línea instcmds define los comandos que pueden ser usados por el usuario, por último, la línea upsmon master define que ese usuario será el controlador del servidor, y upsmon slave será el controlador remoto.</p>
<p style="text-align: justify;">Por último, se ha de configurar el archivo <em>/etc/nut/upsmon.conf</em>, que controla el acceso al monitor NUT del SAI. Un ejemplo de archivo sería el siguiente:</p>
<p style="text-align: justify;"><em><span style="color: #800000;">MONITOR misai@localhost 1 control passwordcontrol master<br />
RUN_AS_USER nut<br />
MINSUPPLIES 1<br />
SHUTDOWNCMD &#8220;/sbin/shutdown -h +0&#8243;<br />
POLLFREQ 5<br />
POLLFREQALERT 5<br />
HOSTSYNC 15<br />
DEADTIME 15<br />
POWERDOWNFLAG /etc/killpower</span></em></p>
<p style="text-align: justify;"><em><span style="color: #800000;">NOTIFYMSG ONLINE &#8220;UPS: Normal state&#8221;<br />
NOTIFYMSG ONBATT &#8220;UPS: Cable communication error&#8221;<br />
NOTIFYMSG LOWBATT &#8220;UPS: Battery low&#8221;<br />
NOTIFYMSG FSD &#8220;UPS: Starting shutdown&#8221;<br />
NOTIFYMSG COMMOK &#8220;UPS: Communication restored&#8221;<br />
NOTIFYMSG COMMBAD &#8220;UPS: Communication lose&#8221;<br />
NOTIFYMSG SHUTDOWN &#8220;UPS: Shutting down&#8221;<br />
NOTIFYMSG REPLBATT &#8220;UPS: Replace battery&#8221;<br />
NOTIFYFLAG ONLINE SYSLOG<br />
NOTIFYFLAG ONBATT SYSLOG+WALL<br />
NOTIFYFLAG LOWBATT SYSLOG+WALL<br />
NOTIFYFLAG FSD SYSLOG+WALL<br />
NOTIFYFLAG COMMOK SYSLOG<br />
NOTIFYFLAG COMMBAD SYSLOG<br />
NOTIFYFLAG SHUTDOWN SYSLOG<br />
NOTIFYFLAG REPLBATT SYSLOG</span></em></p>
<p style="text-align: justify;"><em><span style="color: #800000;">RBWARNTIME 43200<br />
NOCOMMWARNTIME 300<br />
FINALDELAY 5</span></em></p>
<p style="text-align: justify;">Nótese que en en este archivo la línea MONITOR especifica que queremos monitorizar el SAI llamado <em>misai,</em> conectado a la máquina localhost (localmente), que tiene 1 batería, el usuario es <em>control,</em> nuestro password es <em>passwordcontrol</em> y estamos en modo master. Por otro lado, el archivo permite configurar el comando de apagado, los mensajes de aviso del estado del SAI.</p>
<p style="text-align: justify;"><span style="color: #800000;"><em><span># chown root:nut /etc/nut/*<br />
</span></em></span></p>
<p><span style="color: #800000;"><em><span># chmod o-r /etc/nut/*</span></em></span></p>
<p style="text-align: justify;">Por último, se ha de iniciar el servidor mediante el siguiente comando:</p>
<p style="text-align: justify;"><em><span style="color: #800000;"># /etc/init.d/nut restart</span></em></p>
<p style="text-align: justify;">Se puede monitorizar el SAI desde línea de comandos:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em># upsc misai@localhost</em></span></p>
<p style="text-align: justify;">Monitorización remota mediante servicio web</p>
<p style="text-align: justify;">Una posibilidad bastante interesante que soporta NUT es la monitorización del SAI mediante servicio web. Para ello provee de un script CGI que permite acceder al estado del SAI haciendo uso de un navegador.</p>
<p style="text-align: justify;">En primer lugar, ha de instalarse el paquete <em>nut-cgi</em> mediante apt-get:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em># apt-get install nut-cgi</em></span></p>
<p style="text-align: justify;">Este comando instala el paquete, así como los scripts cgi en el directorio por defecto de instalación de ficheros cgi-bin de nuestro servidor web (con apache, <em>/usr/lib/cgi-bin</em>).</p>
<p style="text-align: justify;">En segundo lugar es preciso crear los archivos de configuración de <em>nut-cgi</em>. Como en el caso anterior, la instalación por defecto no copia estos archivos en el directorio de nut, por lo que es preciso copiarlos desde <em>/usr/share/doc/nut-cgi/examples/</em>:</p>
<p style="text-align: justify;"><em><span style="color: #800000;"># cp /usr/share/doc/nut-cgi/examples/*.* /etc/nut </span></em></p>
<p>(Luego habrá que renombrarlos quitándole la terminación <em><span style="color: #800000;">*.sample</span></em>.)</p>
<p style="text-align: justify;">Una vez hecho esto, se ha de editar el archivo <em>hosts.conf</em> para indicar a qué SAIs se quiere permitir el acceso desde el servicio web. Un ejemplo de contenido sería el siguiente:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em>MONITOR misai@localhost &#8220;Belkin Active Battery Backup&#8221;</em></span></p>
<p style="text-align: justify;">Por último, se ha de editar el archivo <em>/etc/nut/upsset.conf</em> para indicar desde qué equipos puede accederse al script cgi. Un ejemplo de contenido sería el siguiente:</p>
<p style="text-align: justify;"><em><span style="color: #800000;">&lt;Files upsset.cgi&gt;<br />
deny from all<br />
allow from 192.168.0.0<br />
&lt;/Files&gt;</span></em></p>
<p style="text-align: justify;"><em>D</em>e esta manera, estamos indicando que sólo puede accederse desde los equipos pertenecientes a la red local.</p>
<p style="text-align: justify;">Para acceder al scritp, hemos de entrar en la siguiente dirección desde nuestro navegador favorito:</p>
<p style="text-align: justify;"><span style="color: #800000;"><em>h</em><em>ttp://IP/cgi-bin/nut/upsstats.cgi</em></span></p>
<p style="text-align: justify;">Las pantallas de monitorización serían como las siguientes:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitacora.eniac2000.com/wp-content/nutcgi01.png" alt="Pantalla inicial de nut-cgi" width="480" height="96" /><br />
<strong><em>Pantalla inicial de nut-cgi</em></strong></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitacora.eniac2000.com/wp-content/nutcgi02.png" alt="MonitorizaciÃ³n del SAI" width="480" height="284" /><br />
<strong><em>Monitorización del SAI</em></strong></p>]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/537/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Montaje de un Servidor Ciego con Debian Lenny (13.-Servidor de Archivos NFS)</title>
		<link>http://www.laestacionerrante.com/archives/524</link>
		<comments>http://www.laestacionerrante.com/archives/524#comments</comments>
		<pubDate>Sun, 09 Aug 2009 11:06:56 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=524</guid>
		<description><![CDATA[Antes de nada aprenderemos a formatear y particionar un nuevo disco duro desde la consola en Debian. Esto nos será muy útil para poder añadirle discos duros a nuestro servidor cuando lo necesitemos, ya que no disponemos de monitor ni entorno gráfico para hacerlo como de costumbre.
Conectamos el disco duro a la placa base y [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Antes de nada aprenderemos a formatear y particionar un nuevo disco duro desde la consola en Debian. Esto nos será muy útil para poder añadirle discos duros a nuestro servidor cuando lo necesitemos, ya que no disponemos de monitor ni entorno gráfico para hacerlo como de costumbre.</span></span></p>
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Conectamos el disco duro a la placa base y le suministramos alimentación (en mi caso voy a probar con un disco muy antiguo de </span></span><em><span style="text-decoration: none;"><span>8 Gb</span></span></em><span style="text-decoration: none;"><span> que resucité de un pc antiguo). Una vez hecho esto, iniciamos el servidor y desde un terminal nos logeamos como </span></span><em><span style="text-decoration: none;"><span>root</span></span></em><span style="text-decoration: none;"><span> y tecleamos:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#fdisk -l</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Veremos algo parecido a esto:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Disco /dev/hda: 80.0 GB, 80026361856 bytes </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>255 heads, 63 sectors/track, 9729 cylinders </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Units = cilindros of 16065 * 512 = 8225280 bytes </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Disk identifier: 0xe29f786e </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Disposit. Inicio    Comienzo      Fin      Bloques  Id  Sistema </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda1   *           1        9399    75497436   83  Linux </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda2            9400        9729     2650725    5  Extendida </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda5            9400        9729     2650693+  82  Linux swap / Solaris </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">Disco /dev/hdc: 8455 MB, 8455200768 bytes </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>255 heads, 63 sectors/track, 1027 cylinders </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Units = cilindros of 16065 * 512 = 8225280 bytes </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Disk identifier: 0&#215;753fd0ae </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Disposit. Inicio    Comienzo      Fin      Bloques  Id  Sistema </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Como podéis ver en la imagen el disco duro de 80 Gb es el que tiene ya las particiones echas, las tres ultimas lineas ofrecen información sobre el disco duro de </span></span><em><span style="text-decoration: none;"><span>8 Gb</span></span></em><span style="text-decoration: none;"><span>.</span></span></p>
<p style="text-align: justify;">Seguidamente vamos a editar el segundo disco llamando al dispositivo en cuestión. En mi caso <em><span>hdc:</span></em></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#fdisk /dev/hdc</span></span></em></span></span></p>
<p style="font-style: normal; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Veremos algo como:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>El número de cilindros para este disco está establecido en 1027. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>No hay nada malo en ello, pero es mayor que 1024, y en algunos casos </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>podría causar problemas con: </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>1) software que funciona en el inicio (p.ej. versiones antiguas de LILO) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>2) software de arranque o particionamiento de otros sistemas operativos </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>(p.ej. FDISK de DOS, FDISK de OS/2) </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Orden (m para obtener ayuda):</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Como podéis ver nos muestra un aviso así que no tenemos que hacerle demasiado caso ya que solo me sale en discos duros grandes y de momento no me a dado problemas.</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">Pulsamos la tecla <span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;">n</span></em></span></span> para crear una nueva partición.</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Acción de la orden </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>e   Partición extendida </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>p   Partición primaria (1-4)</span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="text-decoration: none;"><span>Primero nos deja optar por si vamos a querer que nuestra partición sea primaria o extendida. En mi caso voy a usar este disco con una sola partición así que voy a elegir primaria pulsando la tecla </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;">p</span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Número de partición (1-4): </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="text-decoration: none;"><span>Para el numero de partición introducimos el </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;">1</span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Primer cilindro (1-1027, valor predeterminado 1):</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="text-decoration: none;"><span>Pulsamos la tecla </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;">Enter</span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> </span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Se está utilizando el valor predeterminado 1 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Último cilindro o +tamaño o +tamañoM o +tamañoK (1-1027, valor predeterminado 1027):</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="text-decoration: none;"><span>Pulsamos la tecla </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;">Enter</span></em></span></span><span style="text-decoration: none;"><span> y listo</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Orden (m para obtener ayuda):</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="text-decoration: none;"><span>Ahora guardamos los cambios y salimos del programa </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;">fdisk</span></em></span></span><span style="text-decoration: none;"><span> con la tecla </span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;">w</span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Llamando a ioctl() para volver a leer la tabla de particiones. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Se están sincronizando los discos.</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Una vez echo esto lo que aremos a continuación es darle formato para que sea compatible con nuestro Linux formateando la partición en </span></span><em><span style="text-decoration: none;"><span>ext3</span></span></em><span style="text-decoration: none;"><span> con el siguiente comando:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#mkfs.ext3 /dev/hdc1</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;">Veremos algo así:</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>mke2fs 1.41.3 (12-Oct-2008) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Etiqueta del sistema de ficheros= </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Tipo de SO: Linux </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Tamaño del bloque=4096 (bitácora=2) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Tamaño del fragmento=4096 (bitácora=2) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>516096 nodos-i, 2062336 bloques </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>103116 bloques (5.00%) reservados para el superusuario </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Primer bloque de datos=0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Número máximo de bloques del sistema de ficheros=2113929216 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>63 bloque de grupos </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>32768 bloques por grupo, 32768 fragmentos por grupo </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>8192 nodos-i por grupo </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Respaldo del superbloque guardado en los bloques: </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Escribiendo las tablas de nodos-i: hecho </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Creating journal (32768 blocks): hecho </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Escribiendo superbloques y la información contable del sistema de ficheros: hecho</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;">Una vez completado el formateo veremos un mensaje informándonos sobre cuando se ejecutara una revisión del disco en busca de errores.</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Este sistema de ficheros se revisará automáticamente cada 28 montajes o </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>180 días, lo que suceda primero.  Utilice tune2fs -c o -i para cambiarlo.</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;"><span style="text-decoration: none;"><span>Ahora vamos a montar esta partición, en mi caso la voy a usar como almacén y necesitamos crear un directorio para montar dicha partición. Creamos</span></span> el directorio donde queremos que se monte nuestra nueva partición:</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#mkdir /mnt/almacen</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Ahora vamos a introducir los datos de esta partición en el fichero </span></span><em><span style="text-decoration: none;"><span>fstab</span></span></em><span style="text-decoration: none;"><span> para que al arrancar el ordenador se monte automáticamente como una partición mas del sistema.</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/fstab</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Veremos algo así:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># /etc/fstab: static file system information. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>proc                           /proc             proc       defaults              0               0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda1                  /                    ext3      errors=remount-ro 0            1 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda5                 none              swap            sw                  0              0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Lo que vamos a introducir son los datos de nuestra partición especificando en que directorio queremos que nos la monte. En mi caso voy a usarla de almacén y la voy a montar dentro de la carpeta de montaje </span></span><em><span style="text-decoration: none;"><span>mnt</span></span></em><span style="text-decoration: none;"><span> con el nombre </span></span><em><span style="text-decoration: none;"><span>almacen</span></span></em><span style="text-decoration: none;"><span> como podéis ver a continuación:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># /etc/fstab: static file system information. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>proc                           /proc             proc       defaults              0               0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda1                  /                    ext3      errors=remount-ro 0            1 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda5                 none              swap            sw                  0              0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">/dev/hdc1            /mnt/almacen    ext3        noatime               0               1</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;"><span style="text-decoration: none;"><span>Ahora hacemos una prueba y cargamos todo el contenido del fichero</span></span><span style="color: #000000;"><em><span style="text-decoration: none;"><span> fstab</span></span></em></span><span style="text-decoration: none;"><span> con el comando:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#mount -a</span></span></em></span></span></p>
<p style="font-style: normal; text-align: justify;">
<p style="text-align: justify;"><span style="text-decoration: none;"><span>Desde ya tendríamos que tener la partición montada y lista para ser usada en </span></span><span style="color: #000000;"><em><span style="text-decoration: none;"><span>/mnt/almacen</span></span></em></span><span style="text-decoration: none;"><span>, vamos a ver si esta montada ejecutando el comando</span></span><span style="text-decoration: none;">:</span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#mount</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Veremos que está montada correctamente:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/hda1 on / type ext3 (rw,errors=remount-ro) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>proc on /proc type proc (rw,noexec,nosuid,nodev) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>procbususb on /proc/bus/usb type usbfs (rw) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>udev on /dev type tmpfs (rw,mode=0755) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">/dev/hdc1 on /mnt/almacen type ext3 (rw,noatime)</span></span></span></em></span></span></p>
<p style="font-style: normal; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Y una vez visto esto, vamos a ver cómo configurar un servidor NFS en Linux para poder compartir una partición en nuestra red local y montarlo como si de una unidad mas se tratase en un cliente remoto.</span></span></p>
<p style="text-align: justify;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Para comenzar vamos a abrir una terminal, nos identificaremos con nuestro súper usuario </span></span></span><em><span style="text-decoration: none;"><span>root</span></span></em><span style="font-style: normal;"><span style="text-decoration: none;"><span> e instalaremos los paquetes necesarios para la configuración de servidor de archivos </span></span></span><span style="font-style: normal;"><span style="text-decoration: none;"><span>NFS</span></span></span><span style="font-style: normal;"><span style="text-decoration: none;"><span>. </span></span></span><em><span style="font-style: normal;"><span style="text-decoration: none;"><span>Mas adelante configuraremos los clientes:</span></span></span></em></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install portmap</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #808080;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install nfs-common</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install nfs-kernel-server </span></span></em></span></span></p>
<p style="text-align: justify;">En la instalación de este ultimo veremos una pantalla como esta</p>
<p style="text-align: justify;"><a href="http://www.laestacionerrante.com/wp-content/uploads/2009/08/nfs.jpg"><img class="aligncenter size-medium wp-image-527" title="nfs" src="http://www.laestacionerrante.com/wp-content/uploads/2009/08/nfs-300x181.jpg" alt="nfs" width="300" height="181" /></a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Seleccionamos la opción </span></span><em><span style="text-decoration: none;"><span>Keep your currently-installed version</span></span></em><span style="text-decoration: none;"> </span><span style="text-decoration: none;"><span>y continuamos ejecutando el comando:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>#rpcinfo -p </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Nos mostrará un resultado como este:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>programa vers proto   puerto </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100000    2   tcp    111  portmapper </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100000    2   udp    111  portmapper </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100024    1   udp  39787  status </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100024    1   tcp  42048  status </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100003    2   udp   2049  nfs </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100003    3   udp   2049  nfs </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100003    4   udp   2049  nfs </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100021    1   udp  36153  nlockmgr </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100021    3   udp  36153  nlockmgr </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100021    4   udp  36153  nlockmgr </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100003    2   tcp   2049  nfs </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100003    3   tcp   2049  nfs </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100003    4   tcp   2049  nfs </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100021    1   tcp  51935  nlockmgr </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100021    3   tcp  51935  nlockmgr </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100021    4   tcp  51935  nlockmgr </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100005    1   udp  40975  mountd </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100005    1   tcp  47076  mountd </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100005    2   udp  40975  mountd </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100005    2   tcp  47076  mountd </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100005    3   udp  40975  mountd </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>100005    3   tcp  47076  mountd </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Tenéis que tener los mismos servicios que yo, así que si no ves alguno de ellos revisa la instalación de los programas anteriores.</span></span></p>
<p style="text-align: justify;">Ahora necesitamos saber la ruta donde se encuentra la partición o directorio que queremos compartir con las maquinas conectadas a nuestra red. En mi caso voy a compartir un disco duro completo que usare como almacén de datos (el de 8 Gb), esté lo tengo montado en la ruta <em><span>/mnt/almacen</span></em> del servidor.</p>
<p style="text-align: justify;">Para configurar la compartición de forma que todos los archivos que se creen en el servidor sean de un mismo propietario y grupo, sea cual sea el terminal desde el que se acceda, vamos a crear un propietario nuevo llamado <em>nfs</em>. Lo crearemos sin directorio <em>home</em> puesto que no vamos a darle uso como un usuario normal sino tan solo como propietario de los archivos compartidos de la red local.</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#adduser &#8211;no-create-home nfs</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;">Y modificamos los números <em>UID</em> y <em>GID</em> asignados por defecto en los archivos <em>passwd</em> y <em>group, </em><span style="font-style: normal;">cambiándolos </span>por <em>1111</em> y <em>1111</em>, respectivamente. Esto lo hacemos para evitar que los números <em>UID</em> y <em>GID</em> del usuario <em>nfs</em> creado en el servidor coincida con los números <em>UID</em> y <em>GID</em> de otro usuario creado en otro teminal de la red y por tanto, los archivos creados desde allí aparezcan con el propietario del terminal (aunque sólo aparecerían en el propio terminal ya que si los viésemos desde el servidor aparecerían como propietario <em>nfs</em>).</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/passwd</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/group,</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;">Una vez hecho esto necesitamos editar el archivo <em><span>exports</span></em> para indicarle que particiones o directorios queremos compartir.</p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/exports</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Añadiremos lo siguiente:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># /etc/exports: the access control list for filesystems which may be exported </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#               to NFS clients.  See unfsd(8). </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">/mnt/almacen    192.168.0.*(rw,sync,all_squash,anonuid=1111,anongid=1111)</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>donde </span></span><em><span style="text-decoration: none;"><span>/mnt/almacen</span></span></em><span style="text-decoration: none;"><span> es la ruta de montaje, </span></span><em><span style="text-decoration: none;"><span>192.168.0.*</span></span></em><span style="text-decoration: none;"><span>es la ip broadcast acabada en asterisco, y </span></span><em><span style="text-decoration: none;"><span>(rw,sync,all_squash,anonuid=1111,anongid_1111)</span></span></em><span style="text-decoration: none;"><span> son las carácetrísticas que podemos darle al disco:</span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><em><span style="text-decoration: underline;"><span>rw</span></span></em><em><span style="text-decoration: none;"><span>: permiten exportar el recurso para escritura y lectura.</span></span></em></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><em><span style="text-decoration: underline;"><span>sync</span></span></em><em><span style="text-decoration: none;"><span>:ndica que se realicen las operaciones de escritura en el disco instantáneamente. Permite una mayor tolerancia ante una falla del sistema que pudiera provocar inconsistencias en el file system, pero empeora el desenvolvimiento. Por defecto es </span></span></em><tt><em><span style="text-decoration: none;"><span>async</span></span></em></tt><em><span style="text-decoration: none;"><span> (la opuesta de </span></span></em><tt><em><span style="text-decoration: none;"><span>sync</span></span></em></tt><em><span style="text-decoration: none;"><span>).</span></span></em></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><em><span style="text-decoration: underline;"><span>all_squash</span></span></em><em><span style="text-decoration: none;"><span>:habilita el squashing para todos los usuarios, o sea todos los identificadores en el cliente se mapean al identificador del usuario nobody en el servidor.</span></span></em></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><em><span style="text-decoration: underline;"><span>anonuid y anongid</span></span></em><em><span style="text-decoration: none;"><span>:indican que al hacer squash no se traduzcan los identificadores de grupo y usuario a los de nobody sino a los del usuario y grupo indicados mediante estas opciones.</span></span></em></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Si quisiéramos podríamos compartir X directorio con maquinas especificas y con permisos diferentes dependiendo de nuestras necesidades. Yo como quiero compartir esta unidad con toda mi red he optado por dar permisos de lectura y escritura para toda la red y no para una maquina especifica.</span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Damos permisos para que todos puedan leer y escribir en la unidad:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#chmod -R 777 /mnt/almacen</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Seguidamente reiniciamos el servidor </span></span><em><span style="text-decoration: none;"><span>NFS</span></span></em><span style="text-decoration: none;"><span> para que coja los cambios que acabamos de hacer con:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#/etc/init.d/nfs-kernel-server restart</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Ahora vamos a configurar el ordenador cliente. Existen dos formas:</span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: underline;"><span>1.-Mediante el archivo </span></span><em><span style="text-decoration: underline;"><span>fstab</span></span></em></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Para ello instalamos:</span></span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install nfs-common</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Luego creamos la carpeta donde se montará el disco:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#mkdir /mnt/servidor_almacen</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Para que cuando arranque el solito nos conecte a nuestra unidad de red automáticamente vamos a configurar el fichero de montaje de unidades </span></span><em><span style="text-decoration: none;"><span>fstab</span></span></em><span style="text-decoration: none;"><span> y agregaremos nuestro nuevo dispositivo:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/fstab</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Añadimos:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># /etc/fstab: static file system information. </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt; </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>proc            /proc           proc    defaults        0       0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/sda1       /               ext3    errors=remount-ro 0       1 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/sda6       /home           ext3    defaults        0       2 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/sdb1       /media/datos01  ext3    defaults        0       2 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/sda5       none            swap    sw              0       0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">192.168.0.XXX:/mnt/almacen /mnt/servidor_almacen nfs rw,hard,intr,user,defaults 0 0 </span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Si nos fijamos en el ejemplo he agregado en la ultima linea la dirección ip de mi servidor, el directorio de montaje y la ruta donde quiero que se monte la unidad compartida.</span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: underline;"><span>2.-Mediante </span></span><em><span style="text-decoration: underline;"><span>autofs</span></span></em></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Para ello tendremos que instalar:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install nfs-common</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install autofs</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Esta otra forma de montaje en mi opinión es mejor. Lo que vamos a hacer es no montar desde el arranque el disco compartido, si no que sólo lo montaremos cuando accedamos a él. Mientras permanecerá sin montar. ¿Qué ventajas tiene esto? Bueno, para empezar que si no tenemos en un determinado momento el servidor encendido no pasará nada. En cambio con </span></span><em><span style="text-decoration: none;"><span>fstab</span></span></em><span style="text-decoration: none;"><span> intentará montar el disco (aunque con la opción </span></span><em><span style="text-decoration: none;"><span>soff</span></span></em><span style="text-decoration: none;"><span> en lugar de </span></span><em><span style="text-decoration: none;"><span>hard</span></span></em><span style="text-decoration: none;"><span> evitamos en cierto modo esto). Otra ventaja es que cuando son muchos clientes ahorramos recursos.</span></span></p>
<p style="font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="text-decoration: none;"><span>Autofs consulta el mapa maestro del archivo de configuración </span></span><span style="color: #000000;"><em><span style="text-decoration: none;"><span>/etc/auto.master</span></span></em></span><span style="text-decoration: none;"><span> para ver qué puntos de montaje se han definido. Luego arranca un proceso automount con los parámetros adecuados para cada punto de montaje. Cada línea del mapa maestro define un punto de montaje y un archivo de mapa separado que define el sistema de archivos que se tiene que montar en este punto de montaje. Vamos a añadir un punto de montaje al archivo auto.master</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/auto.master</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Agregamos la línea dejándolo tal que así.</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $ </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Sample auto.master file </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># This is an automounter map and it has the following format </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># key [ -mount-options-separated-by-comma ] location </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># For details of the format look at autofs(5). </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#/misc  /etc/auto.misc &#8211;timeout=60 </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#/smb   /etc/auto.smb </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#/misc  /etc/auto.misc </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#/net   /etc/auto.net </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">/servidor   /etc/auto.servidor &#8211;timeout=60</span></span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>La estructura es </span></span><em><span style="text-decoration: none;"><span>&lt;Punto de Montaje&gt; &lt;Ruta archivo auto.montaje&gt;</span></span></em><span style="text-decoration: none;"><span> y una tercera opción </span></span><em><span style="text-decoration: none;"><span>&lt;&#8211;timeout=xx&gt;</span></span></em><span style="text-decoration: none;"><span> para indicar tiempo de desmontaje desde que entramos por última vez.</span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Ahora vamos a crear el archivo </span></span><em><span style="text-decoration: none;"><span>auto.servidor</span></span></em><span style="text-decoration: none;"><span> y en él especificaremos la carpeta de montaje, las opciones para definir el montaje y la ruta con la ip del servidor del disco a montar. Pondremos algo tal que así:</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>almacen -rw,soft,intr,rsize=8192,wsize=8192 192.168.0.XXX:/mnt/almacen</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Como podemos ver </span></span><em><span style="text-decoration: none;"><span>&lt;almacen&gt;</span></span></em><span style="text-decoration: none;"><span> será el nombre de la carpeta donde se nos montará el disco. Luego vemos las opciones precedidas de un &#8211; </span></span><em><span style="text-decoration: none;"><span>&lt;–opciones&gt;</span></span></em><span style="text-decoration: none;"><span> y por último </span></span><em><span style="text-decoration: none;"><span>&lt;ipdelservidor:rutacompartir&gt;</span></span></em><span style="text-decoration: none;"><span>.</span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Ahora, podemos crear un accedo directo en cualquier parte para que se nos muestre la carpeta.</span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#ln -s /servidor/almacen /mnt/servidor_almacen</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>También compartiremos por ejemplo el directorio que antes creamos para el servicio FTP. Para ello, abrimos como root el archivo exports</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/exports</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Yagregamos la línea:</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>ftp -rw,soft,intr,rsize=8192,wsize=8192 192.168.0.XXX:/home/ftp</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Ahora le cramos un acceso directo:</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#ln -s /servidor/ftp /mnt/servidor_ftp</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>De este modo podremos gestionar los archivos del servidor FTP a través de un gestor de archivos desde cualquier terminal de la red.</span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: underline;">CURIOSIDADES</span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><a href="http://miguelcarmona.name/blog/windows-como-cliente-nfs" target="_blank"><span style="font-size: small;"><em><span style="text-decoration: none;"><span>http://miguelcarmona.name/blog/windows-como-cliente-nfs</span></span></em></span></a></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Si tenemos algún </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>PC</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span> con </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>windows</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>, existe una forma sencilla de acceder a nuestro servidor linux sin tener que instalar y configurar </span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Samba</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span> (que sería más idóneo que </span></span></span></span><span style="color: #000000;"><span style="font-size: small;"><em><span style="text-decoration: none;"><span>NFS</span></span></em></span></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span> para estos casos).</span></span></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Descargamos el software Servicios de Windows para UNIX 3.5 desde</span></span></span></span><span style="color: #000000;"><span style="font-size: small;"><span style="font-style: normal;"><span> </span></span></span></span><span style="color: #000000;"><span style="font-size: small;"><em><span><a href="http://www.microsoft.com/downloads/details.aspx?familyid=896C9688-601B-44F1-81A4-02878FF11778&amp;displaylang=en" target="_blank">http://www.microsoft.com/downloads/details.aspx?</a><a href="http://www.microsoft.com/downloads/details.aspx?familyid=896C9688-601B-44F1-81A4-02878FF11778&amp;displaylang=en" target="_blank">familyid=896C9688-601B-44F1-81A4-02878FF11778&amp;displaylang=en</a></span></em></span></span></p>
<p style="text-align: justify;">Si tenemos Windows Xp Home, el software no funcionará para esta versión. En esta dirección <a href="http://oreilly.com/pub/h/2883" target="_blank">http://oreilly.com/pub/h/2883</a> explican como corregirlo.</p>
<p style="text-align: justify;">Extraemos los archivos (en una ruta que recordemos, por ejemplo c:\UNIX_services).</p>
<p style="text-align: justify;">Lanzamos el asistente de instalación, aceptamos la licencia y 	elejimos &#8220;Custom Instalation&#8221;</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://miguelcarmona.name/media/image/post-blog/images/windows-como-cliente-nfs/windows_services_nfs_1.jpg" border="0" alt="" width="488" height="353" align="middle" /></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Desactivamos todas las entradas excepto &#8220;</span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Client for NFS</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>&#8221; y &#8220;</span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Authentication tools for NFS</span></span></em></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>&#8220;</span></span></span></span></p>
<p style="text-align: justify;">
<p style="text-align: center;"><img class="aligncenter" style="border: 0pt none;" src="http://miguelcarmona.name/media/image/post-blog/images/windows-como-cliente-nfs/windows_services_nfs_2.jpg" border="0" alt="" width="485" height="350" align="bottom" /></p>
<p style="text-align: justify;">Continuamos, finalizamos y reiniciamos el equipo</p>
<p style="text-align: justify;">En cualquier explorador de <em>windows</em>, elejimos <em>Herramientas -&gt; Conectar a unidad de red</em>. Elejimos letra de unidad y en carpeta, introducimos los datos de acceso con la siguiente estructura:</p>
<p style="text-align: justify;">servidor:/ruta_al/recurso_compartido/</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 0pt none;" src="http://miguelcarmona.name/media/image/post-blog/images/windows-como-cliente-nfs/windows_services_nfs_5.jpg" border="0" alt="" width="443" height="336" align="bottom" /></p>
<p style="text-align: justify;">Finalizamos y nos saldrá una confirmación con el usuario por el cual se está conectando al servidor nfs. Podemos también <em>Examinar </em>y seleccionar los recursos compartidos.</p>
<p style="margin-bottom: 0cm;" align="justify">]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/524/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Montaje de un Servidor Ciego con Debian Lenny (12.-Encendido Remoto con Wake On Lan)</title>
		<link>http://www.laestacionerrante.com/archives/516</link>
		<comments>http://www.laestacionerrante.com/archives/516#comments</comments>
		<pubDate>Sun, 09 Aug 2009 10:21:03 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=516</guid>
		<description><![CDATA[fuente: http://usuariodebian.blogspot.com
Aprovechando que los ordenadores actuales no están totalmente apagados sino en reposo, es decir con alimentación constante mientras lo tenemos apagado, podemos encenderlos remotamente.
Wake On LAN (WOL) es un estándar de redes que permite encender un equipo de forma remota, mediante el envío de un paquete mágico (Magic Packet). Magic Packet es, como indica [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="font-style: normal; text-align: justify;"><span style="color: #000080;"><span style="font-size: small;"><em><span style="text-decoration: none;"><span>f</span></span></em></span></span><span style="color: #000080;"><span style="font-size: small;"><em><span style="text-decoration: none;"><span>uente: <a href="http://usuariodebian.blogspot.com" target="_blank">http://usuariodebian.blogspot.com</a></span></span></em></span></span></p>
<p style="font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Aprovechando que los ordenadores actuales no están totalmente apagados sino en reposo, es decir con alimentación constante mientras lo tenemos apagado, podemos encenderlos remotamente.</span></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Wake On LAN (WOL)</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> es un estándar de redes que permite encender un equipo de forma remota, mediante el envío de un paquete mágico (</span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Magic Packet</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>). </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Magic Packet</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> es, como indica la propia palabra, un paquete especial que recibe la tarjeta de red.</span></span></span></p>
<p style="text-align: justify;">Las utilidades que se le pueden dar son muy variadas, desde encender un servidor web/ftp, acceder a los archivos que guardas en tu ordenador, o en el ordenador del trabajo y hasta por pura vagancia para no tener que levantarse e ir a la habitación de al lado.</p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: underline;"><span>Requisitos necesarios:</span></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span> </span></span></span></p>
<p style="text-align: justify;">1.-Disponer de una fuente de alimentación ATX, actualmente todos los equipos incorporan fuentes ATX, pero todavía nos podemos encontrar con algunos equipos antiguos que usan fuentes AT, las cuales son incompatibles con Wake On LAN (WOL). Las antiguas fuentes AT se activan mediante un interruptor que proviene de la misma fuente a través de un cable, mientras que las ATX la enciende y la apaga la placa base. Esto hace imposible un encendido por software con fuente AT ya que cuando apagamos el ordenador no existe corriente alguna en la placa base.</p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;">Como distinguir entre un conector AT y otro ATX</p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>2.- Disponer de una placa base con soporte </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>wake on lan (wol)</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>, y activarla la opción correspondiente en la BIOS.<br />
</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>3.- Tener una tarjeta de red con soporte </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>wake on lan (wol)</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>, la tarjeta de red debe tener un cable de tres pines que es necesario conectar a la placa base</span></span></span></p>
<p style="text-align: center;"><span style="font-size: small;"><span style="text-decoration: underline;"><span><br />
</span></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span><a href="http://2.bp.blogspot.com/_OZHbJ8c71OM/SMTMJrdt5iI/AAAAAAAACCw/QGPopcCgzCQ/s1600-h/RJ45.png"><img class="aligncenter" style="border: 0pt none; margin-top: 5px; margin-bottom: 5px;" src="http://2.bp.blogspot.com/_OZHbJ8c71OM/SMTMJrdt5iI/AAAAAAAACCw/QGPopcCgzCQ/s400/RJ45.png" border="0" alt="" vspace="5" width="400" height="281" /></a></span></span></span></p>
<p style="margin-bottom: 0.5cm; text-align: justify;">A si es como quedaría la tarjeta de red en la placa base vista desde arriba.</p>
<p style="margin-bottom: 0.5cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: center;"><a name="BLOGGER_PHOTO_ID_5141005585973689682"></a> <a href="http://4.bp.blogspot.com/_OZHbJ8c71OM/R1iFV5xCvVI/AAAAAAAAApw/GTx5ZhosEQ4/s1600-h/placa2.jpg"><img class="aligncenter" style="border: 0pt none; margin-top: 5px; margin-bottom: 5px;" src="http://4.bp.blogspot.com/_OZHbJ8c71OM/R1iFV5xCvVI/AAAAAAAAApw/GTx5ZhosEQ4/s400/placa2.jpg" border="0" alt="" vspace="5" width="400" height="266" align="bottom" /></a></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: center;">Activar en la BIOS el soporte para Wake On LAN. Dependiendo de la BIOS que utilice tu ordenador se habilitara con una opción u otra diferente.<br />
<a href="http://3.bp.blogspot.com/_OZHbJ8c71OM/R1iHgpxCvWI/AAAAAAAAAp4/3AbVXEgbggI/s1600-h/bios1.jpg"><img class="aligncenter" style="border: 0pt none; margin-top: 5px; margin-bottom: 5px;" src="http://3.bp.blogspot.com/_OZHbJ8c71OM/R1iHgpxCvWI/AAAAAAAAAp4/3AbVXEgbggI/s400/bios1.jpg" border="0" alt="" vspace="5" width="301" height="252" align="bottom" /></a><br />
<a href="http://2.bp.blogspot.com/_OZHbJ8c71OM/R1iHoZxCvXI/AAAAAAAAAqA/O_Qa2Qb72Pk/s1600-h/bios2.jpg"><img src="http://2.bp.blogspot.com/_OZHbJ8c71OM/R1iHoZxCvXI/AAAAAAAAAqA/O_Qa2Qb72Pk/s400/bios2.jpg" border="0" alt="" vspace="5" width="400" height="335" align="bottom" /></a></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Si la tarjeta de red viene integrada en la placa base no hará falta conectar ningún tipo de cable adicional, lo único necesario en este caso en configurar la BIOS.</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<blockquote style="font-style: normal; text-align: justify;"><p><span style="font-size: small;"><span style="text-decoration: none;"><span>Para finalizar la explicación, conviene saber que hay dos estándares de administración de energía, APM y ACPI. El segundo es mas reciente y se diseñó para sustituir al estándar APM incluyendo nuevas características. Algunos equipos soportan ambos, pero no se pueden tener activados simultáneamente. </span></span></span></p></blockquote>
<blockquote style="text-align: justify;"><p>Si no se tiene activado ninguno será imposible encender por software nuestro equipo, ya que al apagarlo lo hacemos del todo. Lo más conveniente es activar el estándar ACPI si es posible, ya que incluye más opciones de configuración, tal y como muestro aquí:</p></blockquote>
<ul style="text-align: justify;">
<li>
<p style="margin-bottom: 0cm;">S0 Encendido y completamente 	operativo.</p>
</li>
<li>
<p style="margin-bottom: 0cm;">S1 El sistema esta en modo baja 	energía (sleep mode). El reloj de la CPU parado, pero la RAM esta 	encendida y operativa</p>
</li>
<li>
<p style="margin-bottom: 0cm;">S2 Similar al anterior, solo que 	la CPU está totalmente apagada.</p>
</li>
<li>
<p style="margin-bottom: 0cm;">S3 La RAM se encuentra en standby, 	con la mayoría de los otros componentes apagados.</p>
</li>
<li>
<p style="margin-bottom: 0cm;">S4 Modo hibernación.</p>
</li>
<li>S5 Completamente apagado.</li>
</ul>
<blockquote style="text-align: justify;"><p>La elección que debemos hacer es la S3, o en su defecto la S1 (Muchas placas solo permiten estos dos modos</p></blockquote>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: underline;"><span>Instalación en el ordenador que estará apagado, o sea el servidor</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Instalamos los paquetes necesarios. Para ello nos logeamos como </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>root</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install ethtool etherwake wakeonlan</span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>En primer lugar usaremos el comando </span></span></span><span style="color: #800000;"><span style="font-size: small;"><em><span style="text-decoration: none;"><span>ethtool</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span>, con este programa podremos ver y modificar las características y configuración de la tarjeta de red. Lo usamos en el ordenador que queremos &#8220;encender remotamente&#8221;, este comando nos informa si nuestra tarjeta de red tiene soporte Wake On LAN (WOL)</span></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#ethtool eth0</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span> </span></span></span></p>
<p style="text-align: justify;">Se nos mostrará algo así:</p>
<p style="text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Settings for eth0: </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Supported ports: [ TP MII ] </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Supported link modes:   10baseT/Half 10baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> 100baseT/Half 100baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Supports auto-negotiation: Yes </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Advertised link modes:  10baseT/Half 10baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> 100baseT/Half 100baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Advertised auto-negotiation: Yes </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Speed: 100Mb/s </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Duplex: Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Port: MII </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> PHYAD: 32 </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Transceiver: internal </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Auto-negotiation: on </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">Supports Wake-on: pumbg </span></span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">Wake-on: d</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Current message level: 0&#215;00000007 (7) </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Link detected: yes </span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Como vemos, esta tarjeta soporta </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Wake On LAN (WOL)</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>, eso nos dice la linea siguiente:</span></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
</span></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Supports Wake-on: pumbg<br />
</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
También nos dice que esta desactivado, en la siguiente linea:</span></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
</span></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Wake-on:d</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span> </span></span></span></p>
<p style="text-align: justify;">d= disable<span style="font-size: small;"><span style="text-decoration: none;"><span> (desactivado)<br />
</span></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Para activarlo no tenemos nada más que hacer:</span></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#ethtool -s eth0 wol g<br />
</span></span></em></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Si volvemos a teclear en consola </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>ethtool eth0</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> tendremos que ver:</span></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>Settings for eth0: </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Supported ports: [ TP MII ] </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Supported link modes:   10baseT/Half 10baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> 100baseT/Half 100baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Supports auto-negotiation: Yes </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Advertised link modes:  10baseT/Half 10baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> 100baseT/Half 100baseT/Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Advertised auto-negotiation: Yes </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Speed: 100Mb/s </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Duplex: Full </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Port: MII </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> PHYAD: 32 </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Transceiver: internal </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Auto-negotiation: on </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: transparent none repeat scroll 0% 0%;">Supports Wake-on: pumbg </span></span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">Wake-on: g</span></span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Current message level: 0&#215;00000007 (7) </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> Link detected: yes </span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Ahora, para que la tarjeta de red active siempre que se encienda el servidor esta opción por defecto, configuraremos el archivo interfaces colocando la siguiente línea </span></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: transparent none repeat scroll 0% 0%;">up ethtool -s eth0 wol g</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: small;"><em><span style="text-decoration: none;"><span><span style="background: transparent none repeat scroll 0% 0%;"> </span></span></span></em></span></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span><span style="background: transparent none repeat scroll 0% 0%;">justo debajo de la configuración de la tarjeta.</span></span></span></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: transparent none repeat scroll 0% 0%;">#nano /etc/network/interfaces</span></span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span><span style="background: transparent none repeat scroll 0% 0%;">Se nos quedará algo así:</span></span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em># This file describes the network interfaces available on your system </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em># and how to activate them. For more information, see interfaces(5). </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em># The loopback network interface </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>auto lo </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>iface lo inet loopback </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em># The primary network interface </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>auto eth0 </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>iface eth0 inet static</em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="background: #ffff00 none repeat scroll 0% 0%;">up ethtool -s eth0 wol g</span> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>address 192.168.0.XXX # IP del Servidor </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>netmask 255.255.255.0 # Máscara de Subred </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>network 192.168.0.0 # Grupo de Trabajo </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em>broadcast 192.168.0.255 # Bcast </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>gateway 192.168.0.1 # IP del Router </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: underline;"><span>Instalación en el ordenador que estará encendido</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>En este ordenador, el que tiene que enviar el paquete mágico (</span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Magic Packet</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>), instalamos uno de estos dos paquetes:<br />
</span></span></span><span style="color: #ff6600;"><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
</span></span></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install etherwake</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>o<br />
#apt-get install wakeonlan<br />
</span></span></em></span></span><span style="color: #ff6600;"><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
</span></span></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span>pero hemos de diferenciar entre uno y otro, </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>etherwake necesitas de privilegios de root</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>, y wakeonlan cualquier usuario puede hacer uso de el.</span></span></span></p>
<p style="text-align: justify;">el método es bien sencillo</p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># etherwake -i &#8220;interfaz para el envio&#8221; &#8220;MAC address del ordenador remoto&#8221; mac=&#8221;" del=&#8221;" equipo=&#8221;" remoto=&#8221;"</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span> </span></span></span></p>
<p style="text-align: justify;">Ejemplo ficticio:<br />
<span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># etherwake -i eth1 11:22:33:44:55:66</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span> </span></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Si no especificamos &#8220;la interfaz para el envío&#8221; con la opción -i, el paquete mágico (Magic Packet) sera enviado a través de la interfaz por defecto establecida por el programa eth0.</span></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span> </span></span></span></p>
<p style="text-align: justify;">Ejemplos ficticio:</p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
</span></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># etherwake 11:22:33:44:55:66<br />
</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
o bien usando este otro programa:</span></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>$ wakeonlan &#8220;MAC address del ordenador remoto&#8221;</span></span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
</span></span></span><em><span style="font-size: small;"><span style="text-decoration: none;"><br />
</span></span></em><span style="font-size: small;"><span style="text-decoration: none;"><span>Ejemplos ficticio:</span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span><br />
</span></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>$ wakeonlan 11:22:33:44:55:66</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Para conocer la dirección MAC de nuestra tarjeta no tenemos más que teclear:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#ifconfig</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Obtendremos</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>eth0      Link encap:Ethernet  HWaddr</span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;"> xx:xx:xx:xx:xx:xx</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span> </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>inet addr:192.168.0.XXX  Bcast:192.168.0.255  Mask:255.255.255.0 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>inet6 addr: fe80::280:5aff:fe68:fe96/64 Scope:Link </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>RX packets:231 errors:0 dropped:0 overruns:0 frame:0 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>TX packets:182 errors:0 dropped:0 overruns:0 carrier:0 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>collisions:0 txqueuelen:1000 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>RX bytes:24947 (24.3 KiB)  TX bytes:19077 (18.6 KiB) </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>Interrupt:17 Base address:0xa800 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>lo        Link encap:Local Loopback </span></span></em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>inet addr:127.0.0.1  Mask:255.0.0.0 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>inet6 addr: ::1/128 Scope:Host </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>UP LOOPBACK RUNNING  MTU:16436  Metric:1 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>RX packets:8 errors:0 dropped:0 overruns:0 frame:0 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>collisions:0 txqueuelen:0 </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span>RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B) </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>donde </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>xx:xx:xx:xx:xx:xx</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> es la MAC.</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Con esto nos conectaremos desde nuestra red privada. Conectarnos desde internet es harina de otro costal&#8230;</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/516/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Montaje de un Servidor Ciego con Debian Lenny (11.-Estadísticas con Awstats)</title>
		<link>http://www.laestacionerrante.com/archives/508</link>
		<comments>http://www.laestacionerrante.com/archives/508#comments</comments>
		<pubDate>Sun, 09 Aug 2009 10:11:09 +0000</pubDate>
		<dc:creator>el orador sobre el páramo</dc:creator>
				<category><![CDATA[cartas náuticas]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.laestacionerrante.com/?p=508</guid>
		<description><![CDATA[Una vez completemos la instalación y configuración de este software tendremos información al detalle como por ejemplo el tiempo que ha estado un usuario conectado a nuestra web, visitas por mes, semana, día, de donde provienen las visitas, en fin todo lo que necesitamos saber de lo que viene a ver que tenemos en nuestro [...]]]></description>
			<content:encoded><![CDATA[<div class="shortcode-show-avatar"><img alt='' src='http://www.gravatar.com/avatar/8b50cacf7fc36b8b703f2a495f05de63?s=50&amp;d=&amp;r=G' class='avatar avatar-50 photo' height='50' width='50' /></div>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Una vez completemos la instalación y configuración de este software tendremos información al detalle como por ejemplo el tiempo que ha estado un usuario conectado a nuestra web, visitas por mes, semana, día, de donde provienen las visitas, en fin todo lo que necesitamos saber de lo que viene a ver que tenemos en nuestro servidor.</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="text-decoration: none;"><span>Para su instalación vamos a comenzar por arrancar nuestro servidor, nos logeamos como usuario </span></span><em><span style="text-decoration: none;"><span>root</span></span></em><span style="text-decoration: none;"><span> y lo instalamos:</span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#apt-get install awstats</span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="margin-bottom: 0cm; text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Para su instalación en el sistema vamos a ejecutar un script de configuración escrito en Perl situado en la ruta ( </span></span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>/usr/share/doc/awstats/examples</span></span></em></span></span><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span> )</span></span></span></span></span></p>
<p style="margin-bottom: 0cm; text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#cd /usr/share/doc/awstats/examples</span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#perl awstats_configure.pl</span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Para su configuración nos encontraremos con algunas preguntas que tendremos que responder. </span></span></span><span style="color: #800000;"><span style="font-size: small;"><em><span style="text-decoration: none;">Lo que esta en negrita son las respuestas</span></em></span></span><span style="font-size: small;"><span style="text-decoration: none;"><span>:</span></span></span></span></p>
<p style="font-style: normal; text-align: justify;">
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&#8212;&#8211; AWStats awstats_configure 1.0 (build 1.7) (c) Laurent Destailleur &#8212;&#8211; </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">This tool will help you to configure AWStats to analyze statistics for </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">one web server. You can try to use it to let it do all that is possible </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">in AWStats setup, however following the step by step manual setup </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">documentation (docs/index.html) is often a better idea. Above all if: </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">- You are not an administrator user, </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">- You want to analyze downloaded log files without web server, </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">- You want to analyze mail or ftp log files instead of web log files, </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">- You need to analyze load balanced servers log files, </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">- You want to &#8216;understand&#8217; all possible ways to use AWStats&#8230; </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Read the AWStats documentation (docs/index.html). </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&#8212;&#8211;&gt; Running OS detected: Linux, BSD or Unix </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Warning: AWStats standard directory on Linux OS is &#8216;/usr/local/awstats&#8217;. </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">If you want to use standard directory, you should first move all content </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">of AWStats distribution from current directory: </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">/usr/share/doc/awstats/examples </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">to standard directory: </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">/usr/local/awstats </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">And then, run configure.pl from this location. </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Do you want to continue setup from this NON standard directory [yN]</span></span></em> <em><span style="color: #800000;"><span style="font-size: x-small;">Y</span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&#8212;&#8211;&gt; Check for web server install </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Enter full config file path of your Web server. </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Example: /etc/httpd/httpd.conf </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Example: /usr/local/apache2/conf/httpd.conf </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Example: c:\Program files\apache group\apache\conf\httpd.conf </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Config file path (&#8217;none&#8217; to skip web server setup): </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&gt;</span></span></em><em><span style="color: #800000;"><span style="font-size: x-small;">/etc/apache2/apache2.conf</span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&#8212;&#8211;&gt; Check and complete web server config file &#8216;/etc/apache2/apache2.conf&#8217; </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&#8212;&#8211;&gt; Need to create a new config file ? </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Do you want me to build a new AWStats config/profile </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">file (required if first install) [y/N] ? </span></span></em><em><span style="color: #800000;"><span style="font-size: x-small;">N</span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&#8212;&#8211;&gt; Add update process inside a scheduler </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Sorry, configure.pl does not support automatic add to cron yet. </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">You can do it manually by adding the following command to your cron: </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">/usr/share/doc/awstats/examples/wwwroot/cgi-bin/awstats.pl -update -config=myvirtualserver </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Or if you have several config files and prefer having only one command: </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">/usr/share/doc/awstats/examples/tools/awstats_updateall.pl now </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Press </span></span></em><em><span style="color: #800000;"><span style="font-size: x-small;">ENTER</span></span></em><em><span style="color: #000080;"><span style="font-size: x-small;"> to continue&#8230;</span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">No config file was built. You can run this tool later to build as </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">much config/profile files as you want. </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Once you have a config/profile file, for example &#8216;awstats.demo.conf&#8217;, </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">You can manually update your statistics for &#8216;demo&#8217; with command: </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&gt; perl awstats.pl -update -config=demo </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">You can also read your statistics for &#8216;demo&#8217; with URL: </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">&gt; http://localhost/awstats/awstats.pl?config=demo </span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Press </span></span></em><em><span style="color: #800000;"><span style="font-size: x-small;">ENTER</span></span></em><em><span style="color: #000080;"><span style="font-size: x-small;"> to finish&#8230;</span></span></em></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Una vez completada la instalación vamos a configurar el archivo </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>awstats.conf</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> que se encuentra en la ruta </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>/etc/awstats/</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/awstats/awstats.conf</span></span></em></span></span></p>
<p style="text-align: justify;">Una vez dentro buscamos la linea …</p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">LogFile=”/var/log/apache/access.log”</span></span></em></p>
<p style="text-align: justify;">y la substituimos por …</p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">LogFile=”/var/log/apache2/access.log”</span></span></em></p>
<p style="text-align: justify;">Cambiamos la linea …</p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">LogFormat=4</span></span></em></p>
<p style="text-align: justify;">por …</p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">LogFormat=1</span></span></em></p>
<p style="text-align: justify;">Buscamos la linea …</p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">SiteDomain=”&#8221;</span></span></em></p>
<p style="text-align: justify;">Aquí vamos a indicarle cual es nuestro dominio, para esto vamos a usar el nombre que le pusimos a nuestro servidor.</p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">SiteDomain=”ejemmplo.no-ip.info”</span></span></em></p>
<p style="text-align: justify;">Una vez hechas estas modificaciones guardamos y guardamos y salimos.</p>
<p style="text-align: justify;">Ahora vamos ha hacer una copia de este fichero pero con nuestro nombre de dominio, adjuntando <em><span>awstats</span></em> y <em><span>conf</span></em></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#cd /etc/awstats/</span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#cp awstats.conf awstats.</span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">ejemplo</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>.no-ip.info.conf</span></span></em></span></span></p>
<p style="text-align: justify;">Vamos a darle permisos al fichero <em><span>log</span></em> que almacena <em><span>apache2</span></em> para que <em><span>awstats</span></em> pueda leerlo sin problemas</p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#chmod o+r /var/log/apache2/access.log</span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;">Ahora vamos a ejecutar la configuración que antes hicimos con el archivo <em><span>awstats.conf</span></em> pero para nuestro servidor</p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#/usr/lib/cgi-bin/awstats.pl -config=awstats.</span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">ejemplo</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>.no-ip.info.conf</span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="text-align: justify;">Una vez hecho esto se actualizara y tomara la información de los ficheros <em><span>Log</span></em> de nuestro <em><span>apache2</span></em>.</p>
<p style="text-align: justify;">Ahora vamos a crear un enlace simbólico de la carpeta <em><span>cgi-bin</span></em> que <em><span>awstats</span></em> nos a creado en la ruta <em><span>/usr/lib/</span></em> hacia el directorio de nuestro servidor. Nos logemamos como <em>usuarioweb</em> y</p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>$ln -s /usr/lib/cgi-bin /home/</span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">usuarioweb</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>/www/cgi-bin</span></span></em></span></span></p>
<p style="text-align: justify;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span>Podemos restringir su acceso creando un archivo </span></span></span></span></span><span style="color: #000000;"><span style="font-size: small;"><em><span style="text-decoration: none;"><span>.htaccess</span></span></em></span></span><span style="color: #000000;"><span style="font-size: small;"><span style="font-style: normal;"><span style="text-decoration: none;"><span> en el interior de la carpeta </span></span></span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>cgi-bin.</span></span></em></span></span></p>
<p style="font-style: normal; text-align: justify;">
<p style="text-align: justify;">Seguidamente configuraremos el fichero <em><span>apache2.conf</span></em> para que se muestren bien las imágenes en los resultados de las estadísticas. Nos logeamos como <em>root</em> y</p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/apache2/apache2.conf</span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Nos situamos al final del fichero y agregamos las siguiente lineas …</span></span></span></span></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Alias /awstatscss “/usr/share/doc/awstats/examples/css/”</span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">Alias /awstatsicons “/usr/share/awstats/icon/”</span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;">ScriptAlias /awstats/ “/usr/lib/cgi-bin/”</span></span></em></p>
<p style="text-align: justify;">y finalmente agregaremos estas lineas al final del archivo</p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span>Alias /awstats-icon/ /usr/share/awstats/icon/</span></span></span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span>&lt;Directory /usr/share/awstats/icon&gt;</span></span></span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span> Options None</span></span></span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span> AllowOverride None</span></span></span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span> Order allow,deny</span></span></span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span> Allow from all</span></span></span></span></em></p>
<p style="text-align: justify;"><em><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span>&lt;/Directory&gt;</span></span></span></span></em></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Guardamos y cerramos.</span></span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Ahora podemos abrir un navegador y veremos los resultados de todo esto (</span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>modifica la dirección y el archivo de awstats</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span>)</span></span></span></p>
<p style="text-align: justify;"><em><a href="http://ejemplo.no-ip.info/restringido/cgi-bin/awstats.pl?config=awstats.ejemplo.no-ip.info.conf"><span style="color: #000080;"><span style="font-size: x-small;"><span style="text-decoration: none;"><span>http://ejemplo.no-ip.info/cgi-bin/awstats.pl?config=awstats.ejemplo.no-ip.info.conf</span></span></span></span></a></em></p>
<p style="text-align: justify;">Como podéis ver el programa de estadísticas esta listo para mostrarnos todo lo que hacen nuestros usuarios, con que lo hacen y cuando lo hacen. Si queremos que no todo el mundo pueda acceder a él tendremos que proteger la carpeta <em>/home/usuarioweb/www/cgi-bin</em> con un archivo .<em>htaccesss</em>, tal y como se describió en el apartado de <em>apache2</em>.</p>
<p style="font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Ya tan solo nos queda un ultimo paso para automatizar la tarea de actualización de este programa. Para esto vamos a usar el programador de tareas </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Crontab</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> que lleva nuestra </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>Linux Debian</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> de serie.</span></span></span></span></p>
<p style="text-align: justify;">Con lo que veremos a continuación vamos ha hacer que se actualice una vez cada 60 minutos, así no sobrecargamos mucho nuestra maquina y tenemos prácticamente actualizada la información a la hora de verla.</p>
<p style="text-align: justify;">Programamos la tarea</p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>#nano /etc/crontab</span></span></em></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Veremos algo así:</span></span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># /etc/crontab: system-wide crontab </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># Unlike any other crontab you don&#8217;t have to run the `crontab&#8217; </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># command to install the new version when you edit this file </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># and files in /etc/cron.d. These files also have username fields, </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span># that none of the other crontabs do. </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>SHELL=/bin/sh </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="text-decoration: none;"> <span style="font-size: x-small;"><em><span># m h dom mon dow user  command </span></em></span></span><span style="font-size: x-small;"><em> </em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>17 *    * * *   root    cd / &amp;&amp; run-parts &#8211;report /etc/cron.hourly </span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts &#8211;report /etc/cron.daily )</span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts &#8211;report /etc/cron.weekly )</span></span></em></span></span></p>
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts &#8211;report /etc/cron.monthly )</span></span></em></span></span></p>
<p style="font-style: normal; text-align: justify;">
<p style="font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Nos situamos en el final del fichero y pegamos esta linea</span></span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;">
<p style="text-align: justify;"><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>0-59/60 * * * * root /usr/lib/cgi-bin/awstats.pl -config=</span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span><span style="background: #ffff00 none repeat scroll 0% 0%;">ejemplo</span></span></span></em></span></span><span style="color: #800000;"><span style="font-size: x-small;"><em><span style="text-decoration: none;"><span>.no-ip.info -update &gt;/dev/null</span></span></em></span></span></p>
<p style="text-align: justify;">
<p style="margin-bottom: 0cm; font-style: normal; text-align: justify;"><span style="font-size: small;"><span style="text-decoration: none;"><span>Ahora ya tenemos el programa </span></span></span><span style="font-size: small;"><em><span style="text-decoration: none;"><span>AwStats</span></span></em></span><span style="font-size: small;"><span style="text-decoration: none;"><span> funcionando y esperando movimiento en nuestro servidor para ofrecernos las estadísticas al detalle.</span></span></span></span></p>
<p style="margin-bottom: 0cm; font-style: normal;" align="justify">]]></content:encoded>
			<wfw:commentRss>http://www.laestacionerrante.com/archives/508/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
