<?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>CarlosGuerra &#187; Works</title>
	<atom:link href="http://www.carlosguerra.com/wordpress/category/works/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.carlosguerra.com/wordpress</link>
	<description>Autorrecordatorio de memoria</description>
	<lastBuildDate>Sun, 25 Dec 2011 12:40:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Crisis -&gt; Crisis tecnológica = Ingenio?</title>
		<link>http://www.carlosguerra.com/wordpress/works/crisis-tecnologica-ingenio/</link>
		<comments>http://www.carlosguerra.com/wordpress/works/crisis-tecnologica-ingenio/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 19:08:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Works]]></category>

		<guid isPermaLink="false">http://www.carlosguerra.com/wordpress/?p=62</guid>
		<description><![CDATA[Digamos que volvimos de vacaciones de la playa y nos encontramos todos con que estabamos en crisis&#8230; aproximadamente llevaremos unos 3 o 4 meses de crisis, a la par que bajaba el precio de la gasolina y los tipos de la hipoteca, los bancos dejaban de dar cr&#233;ditos y las caras de los NY brokers, [...]]]></description>
			<content:encoded><![CDATA[<p>Digamos que volvimos de vacaciones de la playa y nos encontramos todos con que estabamos en crisis&#8230; aproximadamente llevaremos unos 3 o 4 meses de crisis, a la par que bajaba el precio de la gasolina y los tipos de la hipoteca, los bancos dejaban de dar cr&eacute;ditos y las caras de los NY brokers, aquellos que siempre hab&iacute;an sido la envidia de cualquier aspirante a hacerse rico facilemente, sal&iacute;a en la portada de cualquier peri&oacute;dico totalmente abatido&#8230;</p>
<p>En los &uacute;ltimos d&iacute;as me he ido preguntando si la crisis pasa factura a la tecnolog&iacute;a, todos sabemos que cuestiones como garantizar recursos a servidores, escalabilidad, etc conllevaban a un desembolso econ&oacute;mico por el cual, se duplicaban memorias, se aumentaban mhz, casi siempre de manera exponencial (en base 2, 4, hasta donde llegara el dinero).. <span id="more-62"></span>esto ha ocurrido as&iacute; en un 90% (y puede que me quede corto) de las veces pero&#8230; &iquest;y el otro 10%?&nbsp; El otro 10%, una minor&iacute;a, comprende al grupo que antes de escalar una m&aacute;quina, bien por sentido com&uacute;n o bien por ahorro, prefieren revisar el c&oacute;digo, algoritmos, etc para buscar cualquier malgasto de recursos,&nbsp;subsanarlo&nbsp;y ganar as&iacute; en&nbsp;eficiencia y seguir funcionando con su hardware.</p>
<p>En tiempos como los de ahora, d&oacute;nde los presupuestos econ&oacute;micos no van a entender de conceptos como balanceador de carga, switch, catalysts o incluso de memoria RAM, el porcentaje de revisiones en el c&oacute;digo de aplicaciones, procesos batch, etc va a ser mucho mayor que antes, se van a eliminar consultas SQL mal construidas que hacen gastar recursos innecesarios en los servidores, se van a revisar algoritmos de programas, f&oacute;rmulas de c&aacute;lculo, etc, etc&#8230; pero, &iquest;van a estar las empresas preparadas para efectuar estas revisiones? Teniendo en cuenta que la soluci&oacute;n, hasta ahora, era realmente sencilla y que escalando el hardware se consegu&iacute;a que cualquier ineficiencia del software fuera subsanada.. me temo que no van a estar preparadas y probablemente grandes empresas como fabricantes de ERP, BI, CRM o&nbsp;Antivirus ver&aacute;n como sus clientes les exigen medidas como revisiones de las aplicaciones&nbsp;o versiones m&aacute;s &quot;lite&quot; de los clients, etc.. Es posible que las consultoras tecnol&oacute;gicas puedan ver fil&oacute;n en esto, de hecho.. en que no lo ven?.. sin embargo, deber&iacute;an hilar muy fino el presupuesto que den ya que pueden cogerse los dedos facilmente dando un presupuesto superior a la operaci&oacute;n de ampliar memoria o balancear la carga..</p>
<p>Un buen principio para reducir recursos que consumen altos porcentajes de CPU&nbsp; puede ser comenzar a revisar todos los procesos batches que se lanzan periodicamente o aquellas extracciones de datos que dependan de procesos como llamadas desde aplicaciones, etc.</p>
<p>Otro dato en el que habr&aacute; curiosidad ser&aacute; el conocer si el uso de aplicaciones de&nbsp;software libre ha aumentado desde que se inicio la crisis, por Junio 2009 podr&aacute; compararse y valorarse realemente, si bien muchas aplicaciones de c&oacute;digo abierto son patrocinadas por empresas que dan dinero para que salgan adelante y habr&aacute; que ver c&oacute;mo se mantienen una vez las empresas ya han comenzado a cerrar estos grifos.</p>
<p>&iquest;Nos agudizar&aacute; el ingenio la crisis? Dada la falta de escalabilidad, &iquest;nos pondremos las pilas en revisar procesos y c&oacute;digo? Lo iremos viendo..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carlosguerra.com/wordpress/works/crisis-tecnologica-ingenio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrando el blog a godaddy</title>
		<link>http://www.carlosguerra.com/wordpress/works/migrando-el-blog-a-godaddy/</link>
		<comments>http://www.carlosguerra.com/wordpress/works/migrando-el-blog-a-godaddy/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 17:34:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Works]]></category>

		<guid isPermaLink="false">http://www.carlosguerra.com/wordpress/formation/migrando-el-blog-a-godaddy/</guid>
		<description><![CDATA[Poco a poco este blog&#160;va cumpliendo sus a&#241;os, comenz&#243; sus primeros pasos alojado en phoenix, aquel servidor en Espaweb que ten&#237;amos para este tipo de pruebas, all&#237; funcion&#243; siempre muy bien. Sin embargo, cuando sal&#237; de Espaweb, me instal&#233; un servidor linux en mi conexi&#243;n de Ono de casa, el cual siempre ha ido de [...]]]></description>
			<content:encoded><![CDATA[<p>Poco a poco este blog&nbsp;va cumpliendo sus a&ntilde;os, comenz&oacute; sus primeros pasos alojado en phoenix, aquel servidor en Espaweb que ten&iacute;amos para este tipo de pruebas, all&iacute; funcion&oacute; siempre muy bien. Sin embargo, cuando sal&iacute; de Espaweb, me instal&eacute; un servidor linux en mi conexi&oacute;n de Ono de casa, el cual siempre ha ido de lujo y a unas velocidades nada malas, tras unos a&ntilde;os as&iacute; creo que ha llegado el momento de buscar algo de tranquilidad, pues aunque el servidor nunca se colgara, el mantenerlo actualizado, seguro y adem&aacute;s enchufado todo el d&iacute;a no era nada recomendable. Por ello, he migrado el blog a godaddy, una empresa de USA con unos precios realmente competitivos y, en general, un servicio decente.</p>
<p><span id="more-54"></span></p>
<p><!--more--></p>
<p>Hoy comienza la andadura de este blog por godaddy, a&uacute;n tengo que darle unos ajustes pero por lo general ya funciona bien, tengo revisar algunas funcionalidades como el ajax de los comentarios, que aunque funcionen bien, dan un error al lanzar el comentario y detalles as&iacute;. Godaddy utiliza phpmyadmin como gestor de la base de datos MySQL, lo cual ha sido muy de mi agrado dado que es el gestor que siempre he utilizado, gracias a ello la importaci&oacute;n y exportaci&oacute;n de la base de datos ha sido realmente sencilla.</p>
<p>Sobre los ficheros del blog (wordpress), unicamente he tenido que editar el fichero de configuraci&oacute;n wp-config.php para indicar los nuevos datos de la base de datos, aqu&iacute; hay que tener en cuenta que el host de la base de datos cambia, ya no es &quot;localhost&quot; si no otro servidor.</p>
<p>De esta forma tengo mi blog en internet por unos 40 EUR al a&ntilde;o (dominio incluido) que es mas o menos lo que me cuesta un mes de conexi&oacute;n de ONO, con la diferencia que a partir de dentro de poco voy a poder apagar el servidor, (y hacerle un monumento! uptime ahora mismo = 289 d&iacute;as)</p>
<p>Resumiendo para migrar wordpress a godaddy he hecho lo siguiente</p>
<p>1- Crear la base de datos desde el panel de control de godaddy. Pod&eacute;is ver m&aacute;s detalles <a target="_blank" href="http://help.godaddy.com/article/1361">aqu&iacute;</a></p>
<p>2- Export desde phpmyadmin de mi servidor de la base de datos.</p>
<p>3- Import desde phpmyadmin de godaddy</p>
<p>4- Subir todo el directorio wordpress a la cuenta de godaddy</p>
<p>5- Configurar el fichero wp-config.php con los datos de la nueva base de datos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carlosguerra.com/wordpress/works/migrando-el-blog-a-godaddy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Montar un directorio remoto en openwrt (fonera)</title>
		<link>http://www.carlosguerra.com/wordpress/works/montar-un-directorio-remoto-en-openwrt-fonera/</link>
		<comments>http://www.carlosguerra.com/wordpress/works/montar-un-directorio-remoto-en-openwrt-fonera/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 18:21:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Works]]></category>
		<category><![CDATA[kamikaze mount montar nfs fonera ipkg]]></category>

		<guid isPermaLink="false">http://www.carlosguerra.com/wordpress/works/montar-un-directorio-remoto-en-openwrt-fonera/</guid>
		<description><![CDATA[Hace m&#225;s de un a&#241;o consegu&#237; una fonera, al transcurrir el a&#241;o, he decidido cambiarle el firmware al aparato con el fin de tener m&#225;s funcionalidades. Con el firmware Kamikaze obtenemos un linux con kernel 2.6 en un dispositivo que nos cabe en una mano y que dispone de una interfaz de red local lan [...]]]></description>
			<content:encoded><![CDATA[<p>Hace m&aacute;s de un a&ntilde;o consegu&iacute; una <a href="http://www.fon.com">fonera</a>, al transcurrir el a&ntilde;o, he decidido cambiarle el firmware al aparato con el fin de tener m&aacute;s funcionalidades. Con el firmware Kamikaze obtenemos un linux con kernel 2.6 en un dispositivo que nos cabe en una mano y que dispone de una interfaz de red local lan y otra inal&aacute;mbrica wireless wlan (en este caso atheros ath).</p>
<p>Las utilidades son varias, desde un peque&ntilde;o o simb&oacute;lico servidor web a una herramienta para obtener claves wep de redes colindantes.  En este caso, nuestro objetivo ser&aacute; transformar la fonera en un dispositivo para capturar y crackear la clave wep de alg&uacute;n punto de acceso cercano guardando la informaci&oacute;n generada en un directorio de un equipo con windows o linux de nuestra red&#8230;. <span id="more-22"></span></p>
<p><!--more--></p>
<p>El primer paso es actualizar el firmware de la fonera al kamikaze, esto se puede hacer siguiendo el manual presentado en <a target="_blank" href="http://www.fonera.info/wiki/doku.php?id=kamikaze">fonera.info</a>&nbsp;  Nota: os recomiendo que consulteis la web www.fonera.info, est&aacute; muy bien y contiene buenos manuales.</p>
<p>&nbsp;<strong>Montar directorio remoto en openwrt</strong></p>
<p>Como podeis imaginar la capacidad de espacio en disco de nuestra fonera es limitada, por lo que al guardar paquetes .cap del airodump para despues obtener la clave con el aircrack es una limitaci&oacute;n por lo que una buena opci&oacute;n es montar una carpeta compartida o por NFS un disco de nuestro portatil, servidor, etc.  Yo lo tengo configurado tanto que windows como en linux.</p>
<p>Para <strong>windows</strong>:  En nuestro windows creamos y/o compartimos un directorio al cual acceder&aacute; nuestra fonera, en este caso ser&iacute;a el directorio wep creado en c:\wep</p>
<p>En la fonera tendremos que instalar el m&oacute;dulo cifs, en el siguiente <a href="http://www.fonera.info/index.php/topic,3.0.html">enlace de fonera.info </a>se comenta en su foro el modo de hacerlo.  Basicamente tendremos que bajarnos estos paquetes:</p>
<p>A&ntilde;adir esta linea en el /etc/ipkg.conf</p>
<p><cite><i>src fonera http://www.fonera.info/files/ipkg/kamikaze-2.6  </i></cite></p>
<p>Tras ello, hacer un update e instalar los siguientes paquetes:</p>
<p><code>ipkg update </code><br />
<code>ipkg install kmod-fs-cifs <br />
ipkg install kmod-nls-base <br />
ipkg install kmod-nls-koi8r</code></p>
<p>Si encontrais alg&uacute;n problema, podeis visitar la p&aacute;gina del <a href="http://www.fonera.info/index.php/topic,3.15.html">foro de la fonera</a>.</p>
<p>Si todo va bien, haciendo un lsmod veremos que aparece el m&oacute;dulo:</p>
<p><code> root@OpenWrt:~# lsmod | grep </code><code>cifs </code><br />
<code>cifs                  248416  0 </code><br />
<code>nls_base                4416  2 <br />
cifs,nls_koi8_r </code></p>
<p>Ahora ya podemos montar el directorio compartido en nuestra fonera de la siguiente forma:  <br />
<em>mount //192.168.0.2/wep /mnt -o username=user,password=pass</em> donde username y password es el usuario y contrase&ntilde;a que usamos para acceder a windows (sesi&oacute;n).</p>
<p>
Para <strong>Linux</strong>:  Lo he montado a trav&eacute;s de NFS, para ello haremos lo siguiente:  <br />
En la fonera: <code><br />
ipkg update <br />
ipkg install kmod-fs-nfs</code>  <br />
En nuestro servidor o estaci&oacute;n linux tendremos que tener instalados los paquetes nfs-common, nfs-user-server y portmap, a continuaci&oacute;n os pongo como se instalar&iacute;a en debian o ubuntu: <br />
<code>apt-get install nfs-common <br />
apt-get install nfs-user-server <br />
apt-get install portmap</code></p>
<p>Una vez instalados, recordar abrir en el firewall de la estaci&oacute;n o servidor una regla para permitir que la fonera (ej. 192.168.0.10) pueda conectarse a vuestro servidor (ej. 192.168.0.2)  Adem&aacute;s, habilitareis a la fonera en el exports, editando el fichero /etc/exports con la siguiente l&iacute;nea:</p>
<p><code>/home/fonera       192.168.0.10(rw,no_root_squash)</code></p>
<p><i><span style="font-family: Arial;"><big><small><span style="font-style: italic;"> </span></small></big></span></i>Ahora&nbsp; montaremos el directorio /home/fonera en /mnt : <br />
<em>mount 192.168.0.2:/home/fonera /mnt -t nfs -o nolock</em>&nbsp;</p>
<p>Nota: <em>nolock </em>es la opci&oacute;n que nos permite montar el directorio exportado sin la necesidad de tener complejo software adicional en el WRT. B&aacute;sicamente la funcionalidad que se pierde es la de poder bloquear archivos. Por tanto es conveniente recordar esto y no realizar tareas sobre el directorio montado que impliquen bloqueos.</p>
<p>Fuentes: <br />
<a href="http://www.montevideolibre.org/manuales:configurar_cliente_de_nfs_en_wrt">Montevideolibre</a><br />
Fonera.info</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carlosguerra.com/wordpress/works/montar-un-directorio-remoto-en-openwrt-fonera/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Image conversor script wizzard for Linux</title>
		<link>http://www.carlosguerra.com/wordpress/works/image-conversor-script-wizzard-for-linux/</link>
		<comments>http://www.carlosguerra.com/wordpress/works/image-conversor-script-wizzard-for-linux/#comments</comments>
		<pubDate>Wed, 16 Nov 2005 10:28:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Works]]></category>

		<guid isPermaLink="false">http://www.carlosguerra.com/wordpress/?p=7</guid>
		<description><![CDATA[Author: Carlos Guerra Alberti Conversor.sh is a script programmed to convert pictures and images. Normally, digital cameras&#8217; pictures can take lot of MB in every image, this script uses the convert program from the imagemagick packet and can reduce the space in more than 90%. Basically, the user will be able to change the picture [...]]]></description>
			<content:encoded><![CDATA[<p>Author: Carlos Guerra Alberti</p>
<p>Conversor.sh is a script programmed to convert pictures and images. Normally, digital cameras&#8217; pictures can take lot of MB in every image, this script uses the convert program from the <a href="http://www.imagemagick.org/">imagemagick</a> packet and can reduce the space in more than 90%. Basically, the user will be able to change the picture dimensions, rotate the picture, change the picture quality, convert it into monochrome, etc, etc.</p>
<p>Conversor.sh can be downloaded from <a href="http://www.carlosguerra.com/files/conversor.tgz">here</a><br />
<span id="more-7"></span></p>
<p><code><br />
#!/bin/bash</p>
<p># Picture Conversor.sh Wizzard<br />
# Carlos Guerra Alberti 2003-2005<br />
# mapache@carlosguerra.com<br />
# GNU General Public License</p>
<p># Requirements: "convert" from imagemagick<br />
# "apt-get install imagemagick" for Debian Users<br />
# convert will be allocated in /usr/bin/convert</p>
<p>if test -e /usr/bin/convert<br />
then<br />
echo ························································<br />
echo ·<br />
echo · Introduce the folder where your images are.<br />
echo ·; read folder<br />
if test -e $folder<br />
then<br />
echo ·<br />
echo · Creating auxiliary folder in $folder<br />
echo ·<br />
mkdir $folder/aux >&#038; /dev/null<br />
echo · Auxiliary folder in $folder/aux<br />
echo ·<br />
echo · Which kind of file would you like to convert "(jpg, png...)"<br />
echo ·; read extension<br />
echo ·<br />
echo · Press 0 to exit<br />
echo · Pulsa 1 to change quality<br />
echo · Pulsa 2 to change dimensions W*H<br />
echo · Pulsa 3 to add a comment on each image.<br />
echo · Pulsa 4 to transform images White and Black<br />
echo · Pulsa 5 to rotate the image "(Grades)"<br />
echo ·; read answer<br />
if test "$answer" = "0"<br />
then exit<br />
else<br />
    if test "$answer" = "1"<br />
    then action="-quality"<br />
        echo · Insert the quality grade you want to apply<br />
        echo ·; read subaction<br />
    else<br />
    if test "$answer" = "2"<br />
    then action="-size"<br />
        echo · Insert the dimesions eg.: 300x400<br />
        echo ·; read subaction<br />
    else<br />
    if test "$answer" = "3"<br />
    then action="-comment"<br />
        echo · Insert the comment you would like to add<br />
        echo ·; read subaction<br />
    else<br />
    if test "$answer" = "4"<br />
    then action="-monochrome"<br />
        echo · This process will take a some seconds.<br />
        echo ·; subaction=""<br />
    else<br />
    if test "$answer" = "5"<br />
    then action="-rotate"<br />
        echo · Introduce the rotation grades you would like to apply Eg.: 90<br />
        echo ·; read subaction<br />
    fi<br />
    fi<br />
    fi<br />
    fi<br />
    fi<br />
fi<br />
        cd $folder<br />
        for i in *.$extension;<br />
        do convert $action $subaction $folder/$i $folder/aux/$i<br />
        echo · Conversing image $i<br />
        done<br />
echo ·<br />
echo · Conversed images are allocated on $folder/aux<br />
else<br />
    echo<br />
    echo  $folder not found on the system<br />
    echo<br />
fi<br />
else<br />
    echo<br />
    echo Imagemagick not installed on the system<br />
    echo<br />
fi</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.carlosguerra.com/wordpress/works/image-conversor-script-wizzard-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wireless HotSpot Authenticated Accesspoint</title>
		<link>http://www.carlosguerra.com/wordpress/works/wireless-hotspot-authenticated-accesspoint/</link>
		<comments>http://www.carlosguerra.com/wordpress/works/wireless-hotspot-authenticated-accesspoint/#comments</comments>
		<pubDate>Tue, 19 Jul 2005 09:07:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Works]]></category>

		<guid isPermaLink="false">http://www.carlosguerra.com/wordpress/?p=5</guid>
		<description><![CDATA[Author: Carlos Guerra Alberti The goal of this work is to give the maximum connectivity under minimum resources. Using a small box with only one pci slot, the objective is to create a Wireless Access Point under a Linux server using only opensource software. Hardware The Hardware used for this purpose is as basic and [...]]]></description>
			<content:encoded><![CDATA[<p>Author: Carlos Guerra Alberti</p>
<p>The goal of this work is to give the maximum connectivity under minimum resources. Using a small box with only one pci slot, the objective is to create a Wireless Access Point under a Linux server using only opensource software.</p>
<p><span id="more-5"></span></p>
<p><strong>Hardware</strong></p>
<p>The Hardware used for this purpose is as basic and simple as possible:</p>
<p>* Servicebox:</p>
<p>Motherboard: VIA TechVIA Technologies, Inc.</p>
<p>Processor: VIA Samuel 2 800 Mhz.</p>
<p>Ram: 367 SDRam.</p>
<p>Hard Disc: Seagate 40 GB.</p>
<p>Back up disc: 250 MB Memory Card.</p>
<p>Ethernet: VIA Technologies, Inc. VT6102 [Rhine-II].</p>
<p>* Conceptronic c54i pci Wireless Ethernet.</p>
<p><strong>Software</strong></p>
<p>The Software specifications are the following:</p>
<p><em>Operating System</em>: Debian GNU/Linux (Sarge).</p>
<p>The way of installing packages under Debian and its proved stability makes this distribution a very good option for accomplish this goal.</p>
<p>Debian uses the Linux kernel (the core of an operating system), but most of the basic OS tools come from the GNU Project; hence the name GNU/Linux.</p>
<p>Using the apt-get or dpkg tool, a user can install thousands of precompiled packages listed on official or unofficial list.</p>
<p><em><br />
Linux Kernel:</em> 2.4.27</p>
<p>Is necessary adapt our kernel to the hardware requirements. Like for example tunneling optiones with tun.o</p>
<p><em>Other:</em></p>
<p>Wireless ethernet driver: Madwifi &#8211; MADWiFi is short for Multiband Atheros Driver for WiFi and provides a Linux kernel driver for Atheros-based Wireless LAN devices. The driver works such that your WLAN card will appear as normal network interface in the system (ath0) and gives the possibility to perfom the Wlan card in master mode.</p>
<p>Chillispot: ChilliSpot is an open source Wireless LAN access point controller. ChilliSpot is a captive portal which authenticates users of a wireless LAN. It supports web based login which is today&#8217;s standard for public HotSpots, Authentication, authorization and accounting (AAA) is handled by a radius server.</p>
<p>Radius server: Freeradius &#8211; The FreeRADIUS server is being used all over the world in large scale installations comprising multiple radius servers with thousands of users and millions of sessions.</p>
<p>Database: Mysql is used for storing the user/passwords and other fields from the radius server.</p>
<p>Database management: PhpMyAdmin is used for controlling (adding, deleting, modifying, etc) the user/passwords parameters from the database.</p>
<p><strong><em>Madwifi Project driver</em></strong></p>
<p>We need to use this driver because for building the AccessPoint, the master mode is required.</p>
<p>First of all, we must be sure our Wireless Lan Card has the Atheros chipset and can work under the madwifi driver, so after plugin it we should do a lspci to find out this information:</p>
<p>12:35 [EW_AP~]# lspci</p>
<p>0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia] (rev 05)</p>
<p>0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia AGP]</p>
<p>0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8231 [PCI-to-ISA Bridge] (rev 10)</p>
<p>0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)</p>
<p>0000:00:11.2 USB Controller: VIA Technologies, Inc. VT82xxUHCI USB 1.1 Controller (rev 1e)</p>
<p>0000:00:11.4 Bridge: VIA Technologies, Inc. VT8235 ACPI (rev 10)</p>
<p>0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 51)</p>
<p>0000:00:14.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)</p>
<p>0000:01:00.0 VGA compatible controller: Trident Microsystems CyberBlade/i1 (rev 6a)</p>
<p>There are currently 3 generations of Atheros 802.11 wireless devices:</p>
<p>5210 supports 11a only</p>
<p>5211 supports both 11a and 11b</p>
<p>5212 supports 11a, 11b, and 11g</p>
<p>Our Atheros chipset model is AR5212, this card uses the 5212+2112 Chipset (and operates in b/g modes) and since the8/11/2003 version, this PCI card seems to be working at least in 802.11b, both in ad-hoc and master mode.</p>
<p>Nowadays Madwifi driver is not included in the Kernel series, so its compilation and building is required in order to run it into the system, the documentantion and for downloading the madwifi, user can access in the project webpage: madwifi.sourceforge.net</p>
<p>The driver functions as a normal network device and uses the Wireless Extensions API. As such normal Linux tools can and should be used with it.</p>
<p>There is only one driver included here; it supports miniPCI and Cardbus devices. The driver can be built as a module or linked into the kernel.</p>
<p>The driver depends on two other modules: wlan.o and ath_hal.o.</p>
<p>Downloading the driver</p>
<p>The current version of MADWiFi can be retrieved from CVS with the following command:</p>
<p>cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi</p>
<p>Previously its possible that we need to install the CVS package, we can do it easily throught the apt-get tool:</p>
<p>apt-get install cvs</p>
<p><em><br />
Building the driver</em></p>
<p>To build the driver at the top level you may need to edit Makefile.inc to set the pathname to your Linux kernel distribution. By default this path is obtained automatically.</p>
<p>If you are cross-compiling the driver for a different platform define the CC, LD, and STRIP macros appropriately. For example:</p>
<p>#CC= /export/tools/bin/mips-linux-gcc</p>
<p>#LD= /export/tools/bin/mips-linux-ld</p>
<p>#STRIP= /export/tools/bin/mips-linux-strip</p>
<p>Once you&#8217;ve got Makefile.inc configured appropriately, do:</p>
<p>make</p>
<p>This will generate three important files:</p>
<p>Linux 2.4</p>
<p>driver/ath_pci.o (driver for PCI/Cardbus devices),</p>
<p>ath_hal/ath_hal.o (Atheros HAL), and</p>
<p>wlan/wlan.o (802.11 support layer)</p>
<p>Using the driver</p>
<p>These files can be loaded with insmod or modprobe; e.g.</p>
<p>Linux 2.4</p>
<p>insmod wlan/wlan.o</p>
<p>insmod ath_hal/ath_hal.o</p>
<p>insmod driver/ath_pci.o</p>
<p>We should include this file in the /etc/modules file if we want them to be loaded since the starting of the system.</p>
<p>So we edit the /etc/modules file and add:</p>
<p>ath_pci</p>
<p>We check if modules are working with an ls of the modules:</p>
<p>13:31 [EW_AP~]# lsmod</p>
<p>Module Size Used by Tainted: P</p>
<p>bnep 9012 1 (autoclean)</p>
<p>rfcomm 27776 0 (autoclean)</p>
<p>l2cap 14508 3 (autoclean) [bnep rfcomm]</p>
<p>hci_usb 6172 1</p>
<p>bluez 27652 3 [bnep rfcomm l2cap hci_usb]</p>
<p>via82cxxx_audio 18808 0 (unused)</p>
<p>soundcore 3460 2 [via82cxxx_audio]</p>
<p>ac97_codec 12012 0 [via82cxxx_audio]</p>
<p>ftdi_sio 19160 0 (unused)</p>
<p>usbserial 19324 0 [ftdi_sio]</p>
<p>usb-uhci 20972 0 (unused)</p>
<p>usbcore 62464 1 [hci_usb ftdi_sio usbserial usb-uhci]</p>
<p>hostap 84456 0 (unused)</p>
<p>ath_pci 28448 1</p>
<p>wlan 40744 1 [ath_pci]</p>
<p>ath_hal 108208 1 [ath_pci]</p>
<p>via-rhine 11600 1</p>
<p>mii 2304 0 [via-rhine]</p>
<p>crc32 2848 0 [bnep via-rhine]</p>
<p>So our new device interface is ath0, and we can see how kernel log has recognize it:</p>
<p>13:42 [EW_AP~]# cat /var/log/kern.log.0 | grep ath0</p>
<p>Apr 11 18:09:17 EW_AP kernel: ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps</p>
<p>Apr 11 18:09:17 EW_AP kernel: ath0: 802.11 address: 00:0d:88:56:0b:a2</p>
<p>Apr 11 18:09:17 EW_AP kernel: ath0: Atheros 5212: mem=0xe3000000, irq=11</p>
<p>Management uses the normal Linux tools such as ifconfig and the recient wireless-tools package, very useful to interactuate with the card, for installing these tools we need to perform:</p>
<p>apt-get install wireless-tools</p>
<p>iwconfig is the star program inside the wireless-tools package, here we are some iwconfig options:</p>
<p>13:44 [EW_AP~]# iwconfig &#8211;help</p>
<p>Usage: iwconfig interface [essid {NN|on|off}]</p>
<p>[nwid {NN|on|off}]</p>
<p>[mode {managed|ad-hoc|...}</p>
<p>[freq N.NNNN[k|M|G]]</p>
<p>[channel N]</p>
<p>[ap {N|off|auto}]</p>
<p>[sens N]</p>
<p>[nick N]</p>
<p>[rate {N|auto|fixed}]</p>
<p>[rts {N|auto|fixed|off}]</p>
<p>[frag {N|auto|fixed|off}]</p>
<p>[enc {NNNN-NNNN|off}]</p>
<p>[power {period N|timeout N}]</p>
<p>13:29 [EW_AP~]# iwconfig</p>
<p>ath0 IEEE 802.11g ESSID:&#8221;NordicAP&#8221; Nickname:&#8221;WareAP&#8221;</p>
<p>Mode:Master Frequency:2.457 GHz Access Point: 00:0D:88:56:0B:A2</p>
<p>Bit Rate:0 kb/s Tx-Power:off Sensitivity=0/3</p>
<p>Retry:off RTS thr:off Fragment thr:off</p>
<p>Encryption key:off</p>
<p>Power Management:off</p>
<p>Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm</p>
<p>Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0</p>
<p>Tx excessive retries:0 Invalid misc:0 Missed beacon:0</p>
<p>13:29 [EW_AP~]# ifconfig ath0</p>
<p>ath0 Link encap:Ethernet HWaddr 00:0D:88:56:0B:A2</p>
<p>UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</p>
<p>RX packets:82504 errors:296765 dropped:0 overruns:0 frame:95134</p>
<p>TX packets:1021 errors:0 dropped:0 overruns:0 carrier:0</p>
<p>collisions:0 txqueuelen:199</p>
<p>RX bytes:3267369 (3.1 MiB) TX bytes:65344 (63.8 KiB)</p>
<p>Interrupt:11 Memory:d00a2000-d00b2000</p>
<p>We are going to insert a valid IP configuration for this device, on the /etc/network/interfaces, something like:</p>
<p>auto ath0</p>
<p>iface ath0 inet static</p>
<p>_..address 1.0.0.1</p>
<p>_..netmask 255.255.255.0</p>
<p>_..network 1.0.0.0</p>
<p>_..broadcast 1.0.0.255</p>
<p>_..wireless_essid NordicAP</p>
<p>_..wireless_mode master</p>
<p>_..wireless_channel 10</p>
<p>Chillispot</p>
<p>Chillispot is a tool destinated to give a Wifi service through the authetification in a webpage using https protocol with a user/password controlled by a Radius server and protect itself from the non-authentificated connections. For all this, Chillispot creates one new virtual interface device, tun0 where all this traffic will pass and will be filtered.</p>
<p>Chillispot supports two authentication methods:</p>
<p>    *</p>
<p>      Universal Access Method (UAM)<br />
    *</p>
<p>      Wireless Protected Access (WPA)</p>
<p>At this time we will use the UAM method in the Wireless Access Point. With UAM the wireless client requests an IP address, and is allocated a an IP address by Chilli. When the user starts a web browser chilli will capture the tcp connection and redirect to browser to an authentication web server. The web server queries the user for his username and password. The password is encrypted and sent back to chilli.Then chilli forwards the authentication request to a radius server. The radius server sends an access-accept message back to chilli if authentication was successful. Otherwise an access-reject is sent back.</p>
<p>An authentication web server is needed in order to authenticate users using the universal access method.</p>
<p>The communication interface to the web server is implemented using only the HTTP protocol. No &#8220;call backs&#8221; from the web server to chilli is needed in order to authenticate the client. This means that the HotSpot can be placed behind a NAT gateway, proxy or firewall, while the web server is located on the public Internet.</p>
<p>A cgi script for your web server which will query the user for his username and password. Once this information has been entered by the user the encrypted password is sent back to chilli which forwards the request to the radius server. We should use SSL/TLS on the web server in order to protect the username and passwords, we will use, of course, Apache-SSL.</p>
<p>So, basically, Chillispot is composed by a cgi script â€œhotspotlogin.cgiâ€ and a daemon â€œchilliâ€.</p>
<p>The Chillispot used in the moment of writing this document is 0.96-1</p>
<p>17:37 [EW_AP~]# dpkg -l chillispot</p>
<p>Name Version Description</p>
<p>===================================================================</p>
<p>===================================================================</p>
<p>chillispot 0.96-1 ChilliSpot is a Wireless LAN Access Point Controller.</p>
<p>Preparing the Software</p>
<p>Before downloading and installing Chillispot, we need to install some tools in order to have the â€œbest conditionsâ€ for making it works.</p>
<p>    *</p>
<p>      Iptables: Iptables is a building block of a framework inside the Linux 2.4.x and 2.6.x kernel. This framework enables packet filtering, network address [and port] translation (NA[P]T) and other packet mangling.Iptables is a generic table structure for the definition of rulesets. Each rule within an IP table consists of a number of classifiers (iptables matches) and one connected action (iptables target).</p>
<p>      For installing we will type:</p>
<p>      apt-get install iptables</p>
<p>    *</p>
<p>      Apache-ssl: Will be our secure webserver that will protect the process of inserting the user and password, for that ssl module will encrypt the user and password in order to avoid any undesired trying of getting this kind of information.</p>
<p>      For installing we will type this time:</p>
<p>      apt-get install apache-ssl</p>
<p>    *</p>
<p>      Mysql: Will be the database for storing the users and password and rest of data.</p>
<p>      For installing we will type:</p>
<p>      apt-get install mysql-server<br />
      apt-get install mysql-client</p>
<p>    *</p>
<p>      Freeradius: Will be the Radius Server which will support the user/password service. The package was included recently in the Sarge version of Debian GNU/Linux.</p>
<p>      For installing we will type now:</p>
<p>      apt-get install freeradius<br />
      apt-get install freeradius-mysql</p>
<p>    *</p>
<p>      Module TUN/TAP: We will use the tun.o from our Kernel in order to provides a virtual point-to-point network interfaces so the IP packets written to the /dev/tun0 character device will be received by the kernel from the tun0 interface.</p>
<p>      TUN/TAP should be included in our Kernel, if not it will be necessary to recompile it.</p>
<p>      [*] Network device support</p>
<p>      < *> Universal TUN/TAP device driver support</p>
<p>      Debian will not create any â€œtunâ€ virtual device automatically so we will need to type the following in our system:</p>
<p>      mkdir /dev/net<br />
      mknod /dev/net/tun c 10 200<br />
      modprobe tun</p>
<p>      Now we should make sure if the following line:<br />
      alias char-major-10-200 tun<br />
      is included in our /etc/modules.conf file. If not, then we should add it.</p>
<p>      For finishing TUN configuration we will type the following in our shell:</p>
<p>      echo &#8220;alias char-major-10-200 tun&#8221; >> /etc/modutils/chillispot<br />
      update-modules</p>
<p>Installing the Chillispot package</p>
<p>Still while writing this document, chillispot deb package is not included in the official respository source.list of the Debian Operating System, we could find it under any unofficial respository but in this time we will install it downloading the package manually and using the dpkg tool.</p>
<p>For downloading the Chillispot, we will go to the official website of the project, located at: www.chillispot.org where we will visit: chillispot.org/download.html and will download directly the debian binary package (.deb).</p>
<p>Once we download the package (chillispot_0.96-1_i386.deb in this case) we will use dpkg tool to install it:</p>
<p>dpkg -i chillispot_0.96-1_i386.deb</p>
<p>That will install the chillispot package in our system and leave directories/files at:</p>
<p>/usr/share/doc/chillispot/firewall.iptables &#8211;> Firewall rules.</p>
<p>/usr/share/doc/chillispot/hotspotlogin.cgi.gz &#8211;> cgi script (index for webserver)</p>
<p>/etc/chilli.conf &#8211;> configuration file</p>
<p>/etc/init.d/chilli &#8211;> daemon</p>
<p>Now we will configurate the cgi script,</p>
<p>cp /usr/share/doc/chillispot/hotspotlogin.cgi.gz /usr/lib/cgi-bin/<br />
cd /usr/lib/cgi-bin<br />
gunzip hotspotlogin.cgi.gz<br />
chmod a+x hotspotlogin.cgi</p>
<p>On the resultant hotspotlogin.cgi we will uncomment the following line:</p>
<p>$uamsecret = â€œsecretchilliâ€;</p>
<p>Now we will configure the chilli daemon, configuration file is located at /etc/chilli.conf, we will change some parameters:</p>
<p>net 5.0.0.0/24 ::: The IP of our Wireless LAN will be of this private 5.0.0.0 IP range.</p>
<p>dns1 194.47.0.30 ::: Or any other DNS server, this is from HÃ¶gskolan Halmstad (Sweden) <img src='http://www.carlosguerra.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>radiuslisten 127.0.0.1 ::: Our server will be where the radius server will be as well.<br />
radiusserver1 127.0.0.1<br />
radiusserver2 127.0.0.1</p>
<p>radiussecret secretradius ::: Same key as in cgi script.</p>
<p>radiusnasid NordicAP ::: Name of our Access Point</p>
<p>radiuslocationid isocc=es,cc=34,ac=46020,network=N_AP ::: Detailed information about the WAP</p>
<p>radiuslocationname PNM,Valencia</p>
<p>dhcpif ath0 ::: Over which ethernet will the Chilli serve the IP described on â€œnetâ€ parameter above.</p>
<p>uamserver https://5.0.0.1/cgi-bin/hotspotlogin.cgi ::: web server handling auth.</p>
<p>uamsecret secretchilli ::: Shared between chilli and authentication web server.</p>
<p>uamlisten 5.0.0.1 ::: IP address to listen to for auth. request.</p>
<p>uamallowed www.carlosguerra.com ::: Allow browsing without first authentication.</p>
<p>Iptables rules configuration of the firewall</p>
<p>Its time now to configure some iptables rules for our firewall, first we should copy the file chilli.iptables on the /etc/ folder:</p>
<p>cp /usr/share/doc/chillispot/firewall.iptables /etc/chilli.iptables<br />
chmod u+x /etc/chilli.iptables</p>
<p>Inside the file /etc/chilli.iptables, we need to modify the EXTIF and INTIF parameters.</p>
<p>EXTIF=&#8221;eth0&#8243; ::: Provides us the LAN and Internet connection.</p>
<p>INTIF=&#8221;ath0&#8243; ::: Device where EXTIF is propagated, that is, the Access Point.</p>
<p>The rest of file is composed by iptables rules about allowing, denying and filtering the traffic and ports from the tunnel with the devices, etc.</p>
<p>But of course, we should verify in the /etc/network/options configuration file that ip_forward variable is set to yes, if not we must change it:</p>
<p>ip_forward=yes</p>
<p>Freeradius configuration</p>
<p>We installed the freeradius server before with the apt-get instruction, now that chilli daemon is already set up, we have to modify some parameters in the freeradius configuration.</p>
<p>First of all, we have to change the shared key we modify in the /etc/chilli.conf, so we should modify the â€œsecretâ€ parameter inside /etc/freeradius/clients.conf</p>
<p>secret = secretradius</p>
<p>Now Let&#8217;s add the following lines on the /etc/chilli.iptables in order to have access to certains ports when the authentication is not validated still:</p>
<p># SSH<br />
$IPTABLES -A INPUT -i tun0 -p tcp -m tcp &#8211;dport 22 &#8211;syn -j ACCEPT<br />
# imap over SSL<br />
$IPTABLES -A INPUT -i tun0 -p tcp -m tcp &#8211;dport 993 &#8211;syn -j ACCEPT</p>
<p>We have to create the database where the information required from the radius server will be allocated, as this document is not for learning mysql commands, we will create the database very fast and entering commands from the shell directly.</p>
<p>For create the mysql database we will type the following in our shell prompt:</p>
<p>echo &#8220;create database radius;&#8221; | mysql -u root -p</p>
<p>echo &#8220;grant all on radius.* to radius@&#8217;%&#8217; identified by &#8216;password_sql&#8217;; flush privileges;&#8221; | mysql -u root -p</p>
<p>zcat /usr/share/doc/freeradius/examples/db_mysql.sql.tgz | mysql -u root -p radius</p>
<p>Note: where in -p, we should put our root password for the mysql-server</p>
<p>We should configurate the sql.conf from the freeradius in order to tell the freeradius that it should find out the user/password information in a database.</p>
<p>The file to modify is /etc/freeradius/sql.conf</p>
<p>sql {<br />
driver = &#8220;rlm_sql_mysql&#8221;<br />
server = &#8220;localhost&#8221;<br />
login = &#8220;radius&#8221;<br />
password = &#8220;password_sql&#8221;<br />
radius_db = &#8220;radius&#8221;<br />
[...]<br />
}</p>
<p>No we need to determine that the database type is mysql in the /etc/freeradius/radiusd.conf file:</p>
<p>$INCLUDE ${confdir}/sql.conf<br />
authorize {<br />
[...]<br />
sql<br />
[...]<br />
}<br />
accounting {<br />
[...]<br />
sql<br />
[...]<br />
}</p>
<p>The access point configuration is finished, let&#8217;s restart the daemons and services with the restart command:</p>
<p>/etc/init.d/mysql restart</p>
<p>/etc/init.d/apache-ssl restart</p>
<p>/etc/init.d/chilli restart</p>
<p>/etc/init.d/freeradius restart</p>
<p>/etc/chilli.iptables</p>
<p>For ending this document, we will explain how to create, erase, modify users on the radius database:</p>
<p>We access to the database through web browsing the phpmyadmin we have installed previously, for that we type at the web browser the local IP address of the server and slash phpmyadmin, for example: http://11.0.0.54/phpmyadmin</p>
<p>Once we have validate our user and password, we should explore the radiusact table, on this table is where the user information is, we need now to add a new line and fill the form with the new user and password, also is posible to delete and edit this kind of data.</p>
<p>Carlos Guerra Alberti</p>
<p>mapache@carlosguerra.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carlosguerra.com/wordpress/works/wireless-hotspot-authenticated-accesspoint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

