<?xml version='1.0' encoding='UTF-8'?>
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 <!-- 
  This is where we will call the external files that we would like to
  include in our document. Uncomment each line if you wish to call the 
  corresponding external file. At the end of the document you will
  also need to uncomment the corresponding entity.
 -->
 <!-- Appendix -->
<!ENTITY appendix SYSTEM "ldp-appendix.xml">
 <!-- Remember to uncomment &appendix; in the document body as well. -->
 
 <!-- Glossary -->
 <!-- <!ENTITY glossary SYSTEM "ldp-glossary.xml"> -->
 <!-- Remember to uncomment &glossary; in the document body as well. -->

 <!-- Bibliography -->
 <!-- <!ENTITY bibliography SYSTEM "ldp-bibliography.xml"> -->
 <!-- Remember to uncomment &bibliography; in the document body as well. -->
]>
<article id="index">
  <articleinfo>
    <title>Wireless access point from laptop HOWTO.</title>
    <subtitle>How to create a wireless access point and router, from a laptop.</subtitle>
    <author>
      <firstname>Krastyo</firstname>
      <surname>Komsalov</surname>
      <authorblurb>
        <para/>
      </authorblurb>
      <affiliation>
<!-- The name of your organization is optional. -->        <orgname>
          <ulink url="http://komsalov.homelinux.org/">http://komsalov.homelinux.org/</ulink>
          <ulink url="http://ca.linkedin.com/in/kkomsalov">http://ca.linkedin.com/in/kkomsalov</ulink>
        </orgname>
<!-- A valid email is required. You may add a spam blocker, or get a Yahoo/Gmail/etc account. -->        <address>
          <email>kkomsalov@gmail.NOSPAM.com</email>
        </address>
      </affiliation>
    </author>
<!-- The date of publication. -->    <pubdate>2012-04-15</pubdate>
<!-- A short description of what is contained in this document. -->    <abstract>
      <para>This is as simple as I managed to made it instruction how to make wireless access point from a computer wit wireless adapter.</para>
    </abstract>
<!-- A summary of the revisions to date. The latest revision should be at the top. -->    <revhistory>
      <revision>
        <revnumber> 2.0</revnumber>
        <date>2012-06-29</date>
        <authorinitials>Me</authorinitials>
        <revremark>Changed the document title. Fixed a number of spelling mistakes.</revremark>
      </revision>
      <revision>
        <revnumber> 1.1</revnumber>
        <date>2012-01-01</date>
        <authorinitials>ME</authorinitials>
        <revremark>Created first DocBooc version.</revremark>
      </revision>
      <revision>
        <revnumber> 1.0</revnumber>
        <date>2011-10-09</date>
        <authorinitials>ME</authorinitials>
        <revremark>First UNofficial release.</revremark>
      </revision>
    </revhistory>
  </articleinfo>
<!-- 
 A little about file names...
 If you would like, you can add an "id" to each of your sections.
 The id will be used as the file name when output to HTML. Make sure
 it is:
  1) all one word
  2) contains no spaces
 As of March 2005, the LDP is using DSSSL processing tools. The 
  <?dbhtml filename="file.html" ?>
 should match the id so that the file names are the same regardless of 
 processing tools.
-->  <sect1 label="" id="aboutdoc">
<?dbhtml filename="aboutdoc.html"?>    <title>About this document</title>
    <sect2 id="copyright">
<?dbhtml filename="copyright.html"?>      <title>Copyright and License</title>
      <para>
      Copyright (c) 2012 by Krastyo Komsalov.</para>
      <para>Permission is granted to copy, distribute and/or modify this 
      document under the terms of the GNU Free Documentation License, Version 
      1.1 or any later version published by the Free Software Foundation;
      with no Invariant Sections, no Front-Cover Texts, and with no Back-Cover
      Texts.
      A copy of the license is included in <xref linkend="gfdl"/>.
  <!-- The LDP requires you to include the full text of the license. -->
</para>
    </sect2>
    <sect2 id="translations">
<?dbhtml filename="translations.html"?>      <title>Translations</title>
<!--
Probably your document will not have a translation to start.
Uncomment the following section when there are translations ready.
--><!-- 
<para>This document is also available in the following languages:</para>

<itemizedlist>
<listitem>
<para><ulink url="URL">LANGUAGE</ulink>. Include a note of thanks to your translation team.</para>
</listitem>
</itemizedlist>
-->      <para>If you know of any translations for this document, or you are interested in translating it, please email me <email>kkomsalov@gmail.com</email>.</para>
    </sect2>
    <sect2 id="preface">
      <title>Preface</title>
      <para>The main reason for writing this document is to share my surprise of how easy it is to convert a laptop into a wireless access point on Slackware.</para>
    </sect2>
    <sect2 id="thanks">
      <title>Acknowledgments</title>
      <para>I wish to express my gratitude towards my two sons Petko Komsalov and Viktor Komsalov who helped me with the countless hours of their time in the redaction of this guide. The finalized form of this guide would not have been publishable, if not for their advices and counseling during the rooting out of inconsistencies and mistakes.</para>
<!-- If it is a long list of people, you may want to use a bullet list: --><!-- 
<itemizedlist>
<listitem><para></para></listitem>
<listitem><para></para></listitem>
<listitem><para></para></listitem>
</itemizedlist>
-->    </sect2>
    <sect2 id="feedback">
      <title>Feedback</title>
      <para>Find something wrong with this document? (Or perhaps something right?) I would love to hear from you. Please email me at <email>kkomsalov@gmail.com</email>.</para>
    </sect2>
    <sect2 id="conventions">
      <title>Conventions used in this document</title>
<!-- 
 This section was provided by Machtelt Garrels.
 You do not need to include it in your document, especially if your HOWTO is 
 very short.
-->      <para>The following typographic and usage conventions occur in this text:
</para>
      <table frame="all" id="table-conventions">
        <title>Typographic and usage conventions</title>
        <tgroup cols="2" colsep="1" rowsep="1" align="left">
          <thead>
            <row>
              <entry>Text type</entry>
              <entry>Meaning</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry>
                <quote>Quoted text</quote>
              </entry>
              <entry>Quotes from people, quoted computer output.</entry>
            </row>
            <row>
              <entry>
                <screen>terminal view</screen>
              </entry>
              <entry>Literal computer input and output captured from the terminal.</entry>
            </row>
            <row>
              <entry>
                <command>command</command>
              </entry>
              <entry>Name of a command that can be entered on the command line.</entry>
            </row>
            <row>
              <entry>
                <option>option</option>
              </entry>
              <entry>Option to a command, as in <quote>the <option>-a</option> option to the <command>ls</command> command</quote>.</entry>
            </row>
            <row>
              <entry>
                <parameter>parameter</parameter>
              </entry>
              <entry>Parameter to a command, as in <quote>read <command>man <parameter>ls</parameter></command></quote>.</entry>
            </row>
            <row>
              <entry>
                <cmdsynopsis>
                  <command>command <option>options</option><parameter>arguments</parameter></command>
                </cmdsynopsis>
              </entry>
              <entry>Command synopsis or general usage, on a separated line.</entry>
            </row>
            <row>
              <entry>
                <filename>filename</filename>
              </entry>
              <entry>Name of a file or directory, for example <quote>Change to the <filename class="directory">/usr/bin</filename> directory.</quote></entry>
            </row>
            <row>
              <entry>
                <menuchoice>
                  <guimenu>Menu</guimenu>
                  <guimenuitem>Choice</guimenuitem>
                </menuchoice>
              </entry>
              <entry>Choice to select from a graphical menu, for instance: <quote>Select <menuchoice>
                    <guimenu>Help</guimenu>
                    <guimenuitem>About Mozilla</guimenuitem>
                  </menuchoice> in your browser.</quote></entry>
            </row>
            <row>
              <entry>
                <ulink url="http://www.xtrinsic.com">The author</ulink>
              </entry>
              <entry>Click-able link to an external web resource.</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>Thanks to Machtelt <quote>Tille</quote> Garrels for this list of conventions.</para>
    </sect2>
  </sect1>
  <sect1 id="about">
<?dbhtml filename="about.html"?>    <title>Introduction</title>
    <para>The main reason for writing this document is to share my surprise of how easy it is to convert the Aspire One into a wireless access point on Slackware and how good the Aspire One hardware is for this. Accidentally, I happened to have some free time and one three year old Aspire in my hands so I decided to do something about my growing dissatisfaction with my home router. I live in a crowded Wi-Fi area with over 30 access points coming from the apartments around me and my router obviously has troubles with this. What I wanted was a wireless router over which I will have full control of all settings: log levels control, ability to install additional software for traffic analysis, a decent iptables firewall, RADIUS; in short a wireless router with full Linux installed on it.</para>
    <orderedlist numeration="loweralpha">
      <listitem>
        <para>I chose to use Free RADIUS, since I wanted not only support for WPA and the ability to append eventual access points with roaming, but also the extensibility to any user data base, from local flat files to LDAP. Hostapd has its own integrated RADIUS, but the freedom of having FreeRADIUS was so tempting; besides the setup with flat ASCII users file is really easy. In this configuration RADIUS is set up to use files.</para>
      </listitem>
      <listitem>
        <para>Ipv6 and DNSSEC are here to stay and no embedded router has all the functionality which I have with Linux. Ipv6 and DNSSEC configuration is not included in this HOWTO guide, but the freedom to configure them is there.</para>
      </listitem>
      <listitem>
        <para>I wanted to have not only a standard firewall, but the full power of iptables. A simple functionality like SSH tunnels that allows home access from school for my kids is tricky with my router and traffic shaping is simply not available. For this reason the Firewall Builder is included in this configuration with a basic rule set.  I think it is by far the best firewall management solution on the market and it is free for Linux users.</para>
      </listitem>
      <listitem>
        <para>I wanted to have at least two wireless networks &quot;different ssid&quot;, to open safely one of them and share some of my bandwidth with my neighbours. This I hope will make me feel less ripped-off next time I pay my internet bill.</para>
      </listitem>
      <listitem>
        <para>The other solution OpenWrt had two disadvantages: my router is too weak to support OpenWrt and any router that is powerful enough for everything that I want will cost nearly as much or more then the Aspire; which I already have.</para>
      </listitem>
    </orderedlist>
  </sect1>
  <sect1 id="install">
<?dbhtml filename="install.html"?>    <title>Hardware description</title>
    <para>My Acer Aspire One has a Model KAV10, which is one of Acer&apos;s oldest models. Since then Acer has produced many new models, but the only important part for this configuration is the model of the wireless adapter within it. From what I found Acer has been changing the adapter in nearly all newer models of Aspire. All the models I checked come with a different adapter made by Atheros (although its important to verify the producer). If you are thinking of buying the laptop, check in advance its wireless adapter. For mine, <command>lspci</command> and <command>dmesg</command> are giving this:</para>
    <screen>bash-4.1# lspci
01:00.0 Ethernet controller: Atheros Communications Inc. AR5001
        Wireless Network Adapter (rev 01)
03:00.0 Ethernet controller: Atheros Communications AR8121/AR8113/AR8114
        Gigabit or Fast Ethernet (rev b0)
bash-4.1# dmesg |grep Atheros
[   10.367156] ath5k phy0: Atheros AR2425 chip found (MAC: 0xe2, PHY: 0x70)</screen>
    <para>This is really good news as it seems that Atheros is one of the best supported adapters on Linux (the people from The MadWifi project are doing excellent work).</para>
    <para>Surprisingly Windows is giving different information:</para>
    <graphic fileref="Atheros_win.eps"/>
    <para>If it turns out that your adapter is different from mine, you will have to investigate further in order to be sure it supports AP mode. To accomplish this you will need the &quot;<command>iw</command>&quot; command. You probably have it already, but for the source and some documentation go to: <ulink url="http://linuxwireless.org/en/users/Documentation/iw">http://linuxwireless.org/en/users/Documentation/iw</ulink>. The most informative syntax is:</para>
    <para><command>iw list</command></para>
    <para>It will give you a pretty long output. In it look for the part that is similar to the following:</para>
    <screen>Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
        Supported commands:</screen>
    <para>If there is a line &quot;* AP&quot; it is good news, you have the necessary AP support for hostapd.</para>
    <para>If it turns out that your chipset is different from mine you can check if it is supported on the MadWifi website. The MadWifi website is also by far the best source of documentation I have found. This will be one of your primary sources of knowledge when you decide to adjust to your needs, experiment or simply improve the configuration given below.</para>
    <para>If you do not have Linux already installed, you can boot it from Slackware or SystemRescueCd USB stick and do some investigation on your Aspire.</para>
    <para>The model of my old router &quot;Linksys SRX 200&quot; shown as part of two of the three configurations is not important. You may use any wireless router if you have any or avoid using it at all if you decide to permanently dedicate the Aspire as your Wireless router.</para>
  </sect1>
  <sect1 id="netconf">
<?dbhtml filename="Some-possible-network-configurations.html"?>    <title>Some possible network configurations</title>
    <sect2 id="netconfa">
<?dbhtml filename="netconfa.html"?>      <title>Keep your old router and append the Aspire inside, providing two additional wireless networks. Configuration (a.).</title>
      <graphic fileref="2AP3net_masq.eps" srccredit="" contentwidth="" align="center" vendor=""/>
      <para>In this configuration the Ethernet port of the Aspire is connected directly to &quot;SRX 200&quot;. This solves the problem of Aspire having only one Ethernet port. Two Ethernet ports required are one for the Internet link the other for the internal switch to provide Internet access to Ethernet connected computers. The two wireless networks are NAT&apos;ed to the 192.168.1.55 IP address. The reason for this is not only to put ssid &quot;Welcome&quot; in a separate network and simplify firewalling, but also to resolve some NAT and routing problems. First the devices in 192.168.1.0/24 must have a route to 192.168.11.0/24. I had no problem adding routes within Linux and Solaris, but my network printer simply has no such thing as a routing table in its web interface. Second, appending the route in &quot;SRX 200&quot; is not a problem, but &quot;SRX 200&quot; refuses to NAT any other network than the one connected to its interface. This is probably solvable by sub-networking its network, but I think the next configurations (b.) and (c.) are better solutions. Even with all its disadvantages, I think this configuration is the best starting point as it will not cause any disruptions or changes in your current setup until all configurations on Aspire are done and tested; then it can easily be converted to any other.</para>
    </sect2>
    <sect2 id="netconfb">
<?dbhtml filename="netconfb.html"?>      <title>Using only Aspire as AP. Configuration (b.).</title>
      <graphic fileref="Aspire_only.eps"/>
      <para>This configuration is setting you free from any later worries and is the optimal variant, but there is a price to pay. Since the Aspire has only one Ethernet adapter you have to append a second one. There are two solutions. The first one &quot;shown on the picture&quot; is to use an intelligent or managed switch to VLAN the eth0. The second one is to use a USB to Ethernet adapter, to convert one of the USB ports to Ethernet. The drawback of the switch solution is that it is much more expensive, though it has the advantage of speed, stability and simplicity. The USB to Ethernet adapter is much cheaper, but it comes with a doubtful Linux driver support and uncertain speed and reliability.
There is one more small detail to mention: depending what kind of Internet connection you have there will be different setups for the uplink adapter. If you use a cable connection than it simply has to be on DHCP. In the case of ADSL (my case) you will need to configure a PPPoE. On Slackware you simply have to run a pppoe-setup script.</para>
    </sect2>
    <sect2>
<?dbhtml filename="netconfc.html"?>      <title>Bridging between the two private networks and NATing only &quot;Welcome&quot; public network. Configuration (c.).</title>
      <graphic fileref="2AP3net_Bridge.eps"/>
      <para>In this configuration the interfaces eth0 and wlan0 are bridged. The network 192.168.1.0/24 can be accessed either through &quot;kristo&quot; or &quot;Acer_A1&quot; ssid. The DHCP server on the Aspire is bind only to the wlan0_0 interface. NAT to 192.168.1.55 is only done for 172.17.0.0/16. The computers assessing the 192.168.1.0/24 network through ssid &quot;Acer_A1&quot; are getting IP addresses from the DHCP server on &quot;SRX 200&quot;. Other solutions will be available if the DHCP server on &quot;SRX 200&quot; was more manageable. For example, instead of bridging the two parts of 192.168.1.0/24, it will be more elegant to subnet 192.168.1.0/24 and setup a DHCP helper for the part in ssid &quot;Acer_A1&quot;.</para>
      <para>This configuration has two advantages. The first is that it avoids both, the routing problem of the solution (a.) and the consequent NAT&apos;ing of the &quot;Acer_A1&quot;. Second, it allows the Aspire to be turned off while networking remains through your old router. If you can&apos;t afford to dedicate your Aspire as AP, this is the best configuration. It provides a stable network when you do not need the Aspire and allows you to disconnect the Aspire from the network for personal use, while preserving a functional network.</para>
    </sect2>
  </sect1>
  <sect1 id="using-softwarepackage" xreflabel="Using SOFTWARE">
<?dbhtml filename="install-a.html"?>    <title>Initial Configuration <emphasis role="bold">(a.)</emphasis> - installation instructions for all the necessary software for all configurations.</title>
    <para>I installed all the necessary programs from the source in /usr/local. I left some configuration files in  <filename>/usr/local/etc</filename> and moved some in <filename>/etc</filename>/. There are Slackware packages on SlackBuilds.org or you can make your own if you decide it is worth the effort, considering that installing it from source is easier.</para>
    <sect2>
      <title>The easiest way of installing Slackware on Acer Aspire One</title>
      <para>his chapter is probably unnecessary, but I love to preach about Slackware.</para>
      <para>You need a Linux FTP server, to host a Slackware and a USB stick.</para>
      <para>First you have to create a Slackware mirror by getting the script <filename>mirror-slackware-current.sh</filename> from Alien Pastures and running it. The script will put the mirror by default in the <filename>/home/ftp</filename> directory, which is exactly where you need it for the last step.</para>
      <para>After this is done insert a USB stick, go to the directory</para>
      <para><filename>/home/ftp/pub/Linux/Slackware/slackware-current/usb-and-pxe-installers</filename></para>
      <para>unmount the USB if it is mounted and run the script to make a startup USB.</para>
      <screen>/home/ftp/pub/Linux/Slackware/slackware-current/usb-and-pxe-installers
dmesg |grep sd
[86504.700524]  sdb: sdb1
[86504.708517] sd 6:0:0:0: [sdb] Assuming drive cache: write through
umount /dev/sdb1
sh usbimg2disk.sh -i usbboot.img -o /dev/sdb</screen>
      <para>Boot from the USB and install the Slackware. Here is the how to do it: <ulink url="http://www.slackbook.org/html/installation.html">http://www.slackbook.org/html/installation.html</ulink>. Use a network cable (makes things easier) to connect the laptop to the network, you will need it anyway to access the machine during the configuration of the access point, and after as your uplink.</para>
    </sect2>
    <sect2>
      <title>Kernel configuration</title>
      <para>It is a good idea to start by recompiling your kernel. Click on <ulink url="http://wiki.tldp.org/KrastyoKomsalov?action=AttachFile&amp;do=get&amp;target=kernel.config.2.6.38.7">.config</ulink> to download my configuration file in <filename>/usr/src/linux</filename>.  This is not a fully optimized version and only the processor is set to Intel Atom and some obviously unnecessary stuff is removed. I chose not to put here a version that is too customized to my needs. I used the <option>-j 8</option> option since it makes bzImage and modules faster. It seems <option>-j 8</option> gives the best results, but on the first compilation you will not have this advantage. Anyway it will take forever to compile even with the <option>-j 8</option> option. It is important not to forget to reinstall the MadWifi drivers, if someday you decide to optimize your kernel.</para>
      <para>In case you want to keep Windows and resize its partition, the best solution is SystemRescueCd. Follow the instructions for installing it on a USB stick from here <ulink url="http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick">http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick</ulink>. It is a good idea to archive the partitions of your Aspire, in case you decide to return it back to the current state someday; if you can afford the space to keep the images.</para>
    </sect2>
    <sect2>
      <title>Remote access - XDMCP</title>
      <para>Depending on how comfortable you feel with the small keyboard and monitor of Aspire, you may consider enabling XDMCP. Here is good guide of how to do it: <ulink url="http://alien.slackbook.org/blog/running-x-window-on-ms-windows/">http://alien.slackbook.org/blog/running-x-window-on-ms-windows/</ulink>. If you have CygWin already installed you would not need to install X-Server, simply run</para>
      <cmdsynopsis>
        <command>xwin <option>-query</option><parameter>Aspire.IP.address</parameter></command>
      </cmdsynopsis>
      <para>from a CygWin terminal.</para>
    </sect2>
    <sect2>
      <title>For consideration:</title>
      <para>FreeRadius <ulink url="http://freeradius.org/">http://freeradius.org/</ulink> - Formally RADIUS support is necessary only if you want the following capabilities: having WPA Enterprise authentication, being able to append more access points or authentication against external user data bases like LDAP or Novell eDirectory. It is also important to consider the choice between the standalone RADIUS server and the hostapd integrated RADIUS support. With so many choices, I thought it is a good idea to explain my arguments for choosing FreeRadius. First of all WEP in its 128 bit version is acceptable for home security, but it is so easy to configure that it takes away all the fun from the task. In its most basic configuration FreeRadius is really easy to install and configure, which means that obtaining WPA requires only a modest amount of effort. Configuring RADIUS is certainly not easy (it requires a lot of patience) and it may take days to set it up as a DAP gateway, but it is a five minutes work in the simplest scenario as in the example here with flat ASCII files. I suspect that using the hostapd integrated RADIUS allows for a lower CPU load than a separate RADIUS server and this has to be considered for small embedded routers. FreeRadius though has low processing requirements so the dedicated Aspire can easily run it.</para>
      <para>If you opt for FreeRadius, you can download the latest version from <ulink url="http://freeradius.org/download.html">http://freeradius.org/download.html</ulink>. I used the freeradius-server-2.1.11 version.  The installation is as simple as typing the command ./configure, make, make install. The following instructions can be used to configure RADIUS <ulink url="http://wiki.freeradius.org/Basic-configuration-HOWTO">http://wiki.freeradius.org/Basic-configuration-HOWTO</ulink>.  If you used <filename>./configure</filename> without additional options the &quot;<filename>users</filename>&quot; file will be created in &quot;<filename>/usr/local/etc/raddb</filename>&quot;.</para>
      <itemizedlist>
        <listitem>
          <para>First, create some users, simply by appending at the end of the &quot;user&quot; file something like:
<userinput>User1 Cleartext-Password := &quot;password1&quot; Second, change the &quot;secret=12345:-)&quot;</userinput></para>
        </listitem>
        <listitem>
          <para>Second, change the <command>&quot;secret=12345:-)&quot;</command> statement in the <filename>clients.conf.</filename> No further actions are needed since all communications in this configuration are going through the <interface>looback</interface> address that is configured by default.</para>
        </listitem>
        <listitem>
          <para>Third, copy the <filename>rc.radiusd</filename> script from the <filename>freeradius-server-2.1.11/scripts</filename> to <filename>/etc/rc.d/</filename>. Run the first tests of your newly installed RADIUS server with <command>&quot;radiusd -X&quot;</command>. Once you are satisfied, insert the line &quot;<command>/etc/rc.d/rc.radiusd start</command>&quot; in the <filename>&quot;/etc/rc.d/rc.local&quot;</filename> file. Create the file <filename>&quot;/etc/rc.d/rc.local_shutdown&quot;</filename>, make it executable and put the corresponding &quot;<command>/etc/rc.d/rc.radiusd stop</command>&quot; in it. From now on, if there are problems with RADIUS you will look in <filename>/usr/local/var/log/radius</filename>. There is also a lot of authentication related information in <filename>/usr/local/var/log/radius/radacct/127.0.0.1</filename>.
</para>
        </listitem>
        <listitem>
          <para>Finally, the default self-signed certificates generated during the installation in <filename>&quot;/usr/local/etc/raddb/certs&quot;</filename> are good, but if you want your self-signed certificates to show something different you can generate your own. All of the certificates are located in the RADIUS sub-directory <filename>&quot;certs&quot;</filename>.</para>
        </listitem>
      </itemizedlist>
    </sect2>
    <sect2>
      <title>Necessary:</title>
      <itemizedlist spacing="compact">
        <listitem>
          <para><orgname>MadWifi project</orgname></para>
          <para><ulink url="http://madwifi-project.org/">http://madwifi-project.org/</ulink></para>
        </listitem>
        <listitem>
          <para>hostapd: IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator</para>
          <para><ulink url="http://hostap.epitest.fi/hostapd/">http://hostap.epitest.fi/hostapd/</ulink>.</para>
        </listitem>
      </itemizedlist>
      <para>I used <application>
          <application>hostapd-0.7.3</application>
        </application> and <application>madwifi-0.9.4-r4167-20110827</application>.</para>
      <para><emphasis role="bold">First</emphasis>, I installed <application>MadWifi</application> since there is a remark about hostapd in <filename>README-WPS</filename> mentioning that <application>hostapd</application> needs specifications about the location of the <application>MadWifi</application> libraries. All the instructions for installing <application>MadWifi</application> are found within the <filename>INSTALL</filename> file of the source. Look in the <filename>README</filename> file in the source for the necessary kernel configuration. Make the  necessary changes in your kernel or simply use my kernel <ulink url="http://wiki.tldp.org/KrastyoKomsalov?action=AttachFile&amp;do=get&amp;target=kernel.config.2.6.38.7">.config</ulink>. The only thing not mentioned that I thought necessary to do is to enter &quot;<command>make install</command>&quot; at the end, simply to be sure all is on place.</para>
      <para><emphasis role="bold">Second</emphasis> I installed <application>hostapd</application>. Here comes the most sophisticated part of the whole installation.  Within the source directory (wherever you extracted it), there is a subdirectory <filename>hostapd</filename>. You need a <filename>.config</filename> file in order to compile the file. Copy the <filename>defconfig</filename> file to the <filename>.config</filename> file in the same directory and then edit the <filename>.config</filename> file. Its editing depends on the configuration that you want to build and types of authentication that you plan to support. There are many important options that need consideration when editing the <filename>.congif</filename> file. For example, do you want RADIUS and if yes with what kind of support etc. These are the changes I made to my .config:</para>
      <para><screen>CONFIG_DRIVER_MADWIFI=y
CFLAGS += -I/tmp/2/madwifi-0.9.4-r4167-20110827 # change to the madwifi source directory
CONFIG_DRIVER_NL80211=y
CONFIG_WPS=y
CONFIG_WPS_UPNP=y
CONFIG_RADIUS_SERVER=y
CONFIG_IEEE80211R=y
CONFIG_DRIVER_RADIUS_ACL=y
CONFIG_IEEE80211N=y</screen></para>
      <para>And here is the link to get my <filename>.config</filename> which I called &quot;<ulink url="http://wiki.tldp.org/KrastyoKomsalov?action=AttachFile&amp;do=get&amp;target=hostapd.config">hostapd.config</ulink>&quot; to avoid confusion with the kernel <filename>.config</filename>. Copy it in the <filename>hostapd</filename> subdirectory and rename it <filename>.config</filename> and then &quot;<command>make</command>&quot;, &quot;<command>make install</command>&quot;. Change the path to the <application>MadWifi</application> libraries depending on your installation location choice.<screen>CFLAGS += -I/tmp/2/madwifi-0.9.4-r4167-20110827</screen>I strongly recommend reading my file and also the <filename>README</filename> and <filename>README-WPS</filename> that are in the same directory even if you simply decide to use my configuration file. This will give you better understanding and may also spark ideas for interesting experiments. If you decide to dig deeper, check the dependencies between the variables in the <filename>Makefile</filename> &quot;ifdef constructions&quot;. Follow the &quot;Matrix&quot; movie&apos;s advice and  &quot;Go to the source&quot;.</para>
      <para>Create the <filename>/etc/hostapd/</filename> directory and copy in it at least the <filename>hostapd.conf</filename> file (do not confuse it with my <filename>hostapd.config</filename> it is a copy of my <filename>.config</filename> for <filename>hostapd</filename>) from the source directory. This is the changes for configuration (a.):
<screen>#driver=madwifi
#ctrl_interface_group=0
#ssid=test
ssid=Acer_A1
hw_mode=g
channel=11
ieee8021x=1
eapol_key_index_workaround=1
nas_identifier=komsalov.homelinux.org
auth_server_addr=127.0.0.1
auth_server_port=1812
auth_server_shared_secret=12345:-)
acct_server_addr=127.0.0.1
acct_server_port=1813
acct_server_shared_secret=12345:-)
wpa=1
wpa_key_mgmt=WPA-EAP
wpa_pairwise=TKIP
wpa_group_rekey=300
wpa_gmk_rekey=640
bss=wlan0_0
ssid=Welcome</screen></para>
      <para>You may need to copy some other files and eventually create some if you decide to change the configuration and of course fix the path to them in <filename>hostapd.conf</filename>. Here is my <filename>hosapd.conf</filename> for the network configuration (a.). It can be used as it is, the only absolutely necessary change is to put your RADIUS secret.
<screen>auth_server_shared_secret=12345:-)
acct_server_shared_secret=12345:-)</screen></para>
      <para>At first run <application>hostapd</application> in the terminal, like that:
<screen>/usr/local/bin/hostapd -dd /etc/hostapd/hostapd.conf</screen></para>
      <para>You can either start directly with my file or with the example file from the source directory first. The example file will create one open network with <command>ssid=test</command>, giving you some confidence. It is a good idea to begin like this before setting up the DHCP server and eventually masquerading with the firewall. This will help you pinpoint the problems that need to be fixed. If you start two or more encrypted ssid&apos;s, DHCP, DNS and the firewall at once, it will be harder to identify the source of the eventual problems. It will also be good to test the configuration with any wireless client, but Windows, even a simple iPod would be better. Configuring Windows to work with RADIUS self-signed keys for WPA is a bit tricky and it is hard to pinpoint what gives you the problem, the client or the AP. There are two things you may consider here: to use CCMP instead of TKIP and to switch from WPA to WPA2. I decided to leave this decision for configuration (c.), because this is the one I will keep until I can afford to dedicate my Aspire to configuration (b.).</para>
      <para>You can get the <filename>rc.hostapd</filename> from <ulink url="http://slackbuilds.org/repository/13.0/network/hostapd/">http://slackbuilds.org/repository/13.0/network/hostapd/</ulink>, after you get bored looking on the <application>hostapd</application> in a terminal and running it manually. Put the <filename>rc.hostpd</filename> in the <filename>/etc/rc.d</filename>  directory, fix the paths in it, call it from <filename>/etc/rc.d/rc.local</filename> and stop it from <filename>rc.local_shutdown</filename>.</para>
      <para>At this state your rc.local should look like this:
<screen>#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.


/etc/rc.d/rc.radiusd start


/sbin/ifconfig wlan0 up
/sbin/iwconfig wlan0 channel auto


route add default gw 192.168.1.1


/sbin/ifconfig wlan0 192.168.11.1


/etc/rc.d/rc.hostapd start


/sbin/ifconfig wlan0_0 172.17.0.1


/usr/sbin/dhcpd wlan0 wlan0_0


#EOF</screen></para>
      <para>And your  rc.local_shutdown:
<screen>#!/bin/sh
#

/etc/rc.d/rc.hostapd stop


/etc/rc.d/rc.radiusd start

#EOF</screen></para>
      <para>The &quot;<command>/sbin/ifconfig wlan0 up ; /sbin/iwconfig wlan0 channel auto</command>&quot; commands in <filename>rc.local</filename> should not be necessary, but if you do not give them you will get an error when <application>hostapd</application> sets the channel.</para>
      <para>Here is my simple dhcpd.conf file:<screen>

authoritative;
ddns-update-style none;


default-lease-time 604800;
# 7 days 7*86400


max-lease-time 2592000;
# 30 days 30*86400


subnet 192.168.11.0 netmask 255.255.255.0 {
   range 192.168.11.10 192.168.11.100;
   range 192.168.11.150 192.168.11.200;


option domain-name &quot;mydomain.org&quot;;
option broadcast-address 192.168.11.255;
option routers 192.168.11.1;
option domain-name-servers 192.168.11.1, 207.164.234.193, 207.164.234.129;


    }


subnet 172.17.0.0 netmask 255.255.0.0 {
   range 172.17.0.10 172.17.255.250;


option domain-name &quot;mydomain.org&quot;;
option broadcast-address 172.17.255.255;
option routers 172.17.0.1;
option domain-name-servers 172.17.0.1, 207.164.234.193, 207.164.234.129;


    }


#log-facility local7;</screen></para>
      <para>I decided to have a caching DNS server on the Aspire; it is not mandatory, but it is necessary to put your DNS servers in the <filename>dhcpd.conf</filename>.</para>
    </sect2>
    <sect2>
      <title>Optional programs:</title>
      <para><application>
          <emphasis role="bold">Firewall builder</emphasis>
        </application> by NetCitadel <ulink url="http://www.fwbuilder.org/">http://www.fwbuilder.org/</ulink>
Having a firewall is not exactly an option, but you will have to do some NAT with iptables anyway. Of course you may do it manually but I strongly recommend Firewall Builder. It is from my point of view by far the best firewall management solution on the market and is free on Linux. Here is a simple script <ulink url="http://wiki.tldp.org/KrastyoKomsalov?action=AttachFile&amp;do=get&amp;target=acerap.fw">acerap.fw</ulink> generated with it for the configuration (a.), as an example. On Slackware, download the source and compile it and then run <command>ldconfig</command> after using &quot;<command>make install</command>&quot;.</para>
      <para><emphasis role="bold">Wireshark</emphasis> - <ulink url="http://www.fwbuilder.org/">http://www.wireshark.org/</ulink>
Wireshark is unnecessary for the current configuration, but at some moment you certainly will want to know what is going on. As you are anyway in the process of downloading and compiling, install it to have it on hand when necessary. I recommend that you put at least &quot;<command>./configure --enable-threads</command>&quot; if no other option. It improves performance and the program remains stable.</para>
    </sect2>
  </sect1>
  <sect1>
    <title>Configuration <emphasis role="bold">(b.)</emphasis> - VLAN&apos;s and switches</title>
    <para>For this configuration I used a Cisco Catalyst 2900 XL switch. I am on Bell Sympatico ADSL with SpeedStream 5360 Ethernet ADSL modem, which is actually only a bridge. It turned out that it does not matter how I configured the port of the Cisco Catalyst, it did not detect the SpeedStream. Finally, I gave up and used one small 5 port TrendNet TE100-SS/CA switch in between them. Since all SpeedStream 5360&apos;s are gone nowadays, you probably will not have this problem. DSL modems nowadays are actually routers and have integrated PPPoE support and for this configuration it is only necessary to VLAN the switch and <interface>eth0</interface>. I used a Cisco Catalyst (which is actually not so bad) only because this is what I managed to borrow, but if you are thinking of buying a switch look for something better.</para>
    <para>I configured two additional VLAN&apos;s on it:<screen>I configured two additional VLAN&apos;s on it:
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/2, Fa0/3, Fa0/4, Fa0/5,
                                                Fa0/6, Fa0/7, Fa0/8, Fa0/13,
                                                Fa0/14, Fa0/15, Fa0/16, Fa0/20,
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
2    VLAN0002                         active    Fa0/9, Fa0/10, Fa0/11, Fa0/12
3    VLAN0003                         active    Fa0/17, Fa0/18, Fa0/19</screen></para>
    <para>Port FA01 is a tagged port. I am not giving the detailed commands to set it up, since they will depend on whatever switch model you have.</para>
    <para>From the side of Linux it is really easy; type the commands:<screen>ifconfig eth0 0.0.0.0</screen>(to remove the IP address from <interface>eth0</interface>)<screen>ip link add link eth0 name eth0.1 type vlan id 1
ip link add link eth0 name eth0.2 type vlan id 2
ifconfig eth0.1 up
ifconfig eth0.2 up</screen></para>
    <para>Of course in &quot;vlan id NN&quot; the NN will have to be replaced with your VlanID. In my case the new IP addresses are set back like this:<screen>ifconfig eth0.1 0.0.0.0
ifconfig eth0.2 192.168.1.55 netmask 255.255.255.0</screen></para>
    <para>If you like you can go with something more traditional like 192.168.1.1 for your future default gateway. I used <interface>eth0.1</interface> as the uplink. If you want your physical wireless and wired networks to be in the same network, to mimic the behavior of the commercial routers, you can bridge <interface>eth0.2</interface> and <interface>wlan0</interface>. Check configuration (c.) below for help with bridging. The only real reason you may want this is to use <trademark>Microsoft </trademark>workgroup network, though in this case you should consider installing Samba as a master browser on the Aspire.</para>
    <para>In my case I had to setup PPPoE by running the <filename>pppoe-setup</filename> script. This will not be necessary for most people, but if it is for you than pay attention to the last question (asked by the <filename>pppoe-setup</filename> script) and answer it depending on the firewall management you choose. You may encounter additional MTU auto discovery problems with Internet providers such as Bell Sympatico. If it turns out that you are able to ping external machines, but browsing barely works if at all, you will have to use some commands like the next one in your firewall script:<screen>iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu</screen>In case you decide to use the Firewall Builder, it is only a matter of checking the check box &quot;<menuchoice>
        <guimenuitem>Clamp MSS to MTU</guimenuitem>
      </menuchoice>&quot; in firewall settings. If you want to know more about this problem check &quot;Linux Advanced Routing &amp; Traffic Control HOWTO&quot;.</para>
    <para>I implemented the configuration with a manageable switch rather than the one with the USB to Ethernet converter, since to start with I have no such device. The second problem with such devices is actually making them work. Finally I have difficulties believing the advertised speeds of all USB to Ethernet converters that the manufacturers claim.</para>
  </sect1>
  <sect1>
    <title>Configuration <emphasis role="bold">(c.)</emphasis> - bridging</title>
    <para>I chose to stay with this configuration for now, since it allows me to pull my Aspire out of the network from time to time without loosing Internet connectivity. When travelling, I use my Aspire as a GPS device in combination with a USB connected satellite antenna.</para>
    <para>These are the commands given in the necessary order placed inside the <filename>/etc/rc.d/rc.local</filename> file:<screen>#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

/etc/rc.d/rc.radiusd start

/sbin/ifconfig wlan0 up
/sbin/iwconfig wlan0 channel auto

/etc/rc.d/rc.hostapd start

/sbin/ifconfig wlan0_0 172.17.0.1

/sbin/ifconfig eth0 up
/sbin/ifconfig wlan0 up

/usr/sbin/brctl addbr br0
/sbin/ifconfig br0 up
/usr/sbin/brctl addif br0 eth0
/usr/sbin/brctl addif br0 wlan0

/sbin/ifconfig br0 192.168.1.55

/sbin/route add default gw 192.168.1.1

/usr/sbin/dhcpd wlan0_0

/etc/rc.d/firewall/acerap_br.fw
/etc/rc.d/rc.traffic_shaping start

/etc/rc.d/rc.bind restart

#EOF</screen></para>
    <para>The part that concerns bridging is in bold. Bridging on Linux is really easy and it should not cause you any troubles. The spanning tree should be off as it is by default. Turn it on only if you really know what you are doing.
The dhcpd is bound only to the <interface>wlan0</interface> to serve 172.17.0.0/16 addresses to the Welcome network. The network with the Acer_A1 ssid is getting its IP addresses from the &quot;Linksys SRX 200&quot; DHCP server trough the bridge (it transfers broadcasts transparently).
The <filename>
        <ulink url="http://wiki.tldp.org/KrastyoKomsalov?action=AttachFile&amp;do=get&amp;target=rc.traffic_shaping">rc.traffic_shaping</ulink>
      </filename> script is for traffic shaping which turned out to be necessary, because some of the clients in Welcome misbehaved (see 6. Additional administrative tasks).</para>
    <para>Of course you will need a firewall as well, so here is the <ulink url="http://wiki.tldp.org/KrastyoKomsalov?action=AttachFile&amp;do=get&amp;target=acerap_br.fwb">acerap_br.fwb</ulink> file created with the FWbuilder project and the script <ulink url="http://wiki.tldp.org/KrastyoKomsalov?action=AttachFile&amp;do=get&amp;target=acerap_br.fw">acerap_br.fw</ulink> it generated, really basic, but a good starting point.
I decided to switch to WPA2 after using this configuration for about one month. This required only a change of <varname>wpa=1</varname> in <filename>/etc/hostapd.conf</filename> to <varname>wpa=2</varname> and a restart of the hostapd. I was worried about the amount of work necessary to reconfigure all clients, but it turned out that only some small changes to the Windows clients are required.</para>
  </sect1>
  <sect1>
    <title>Clients setup - WPA and WPA2 with self-signed certificates.</title>
    <sect2>
      <title>Linux.</title>
      <para>Slackware comes with <application>Wicd</application> in <filename>/Slackware/slackware-current/extra/wicd</filename> directory and it works fine, so simply install it. Most other collections seem to be using <application>NetworkManager</application>, but anyway there are no problems.</para>
    </sect2>
    <sect2>
      <title>Mac OS X 10.7.2</title>
      <para>When I first tried to connect it showed a message stating that the certificate is not from a known authority and offered me a check box to accept it permanently, then it asked for the <varname>username</varname> and <varname>password</varname> and worked fine after. There is a key management program in Mac OS&apos;s utilities called <application>Key Chain Access</application>. Here I marked the certificate as trusted and it became green. I am not sure if this was necessary, but I wanted to be on the safe side. I found an instruction that recommended installing manually and in advance the certificate, but it turned out that Mac does it for you. When you decide to use WPA2 there will be no need to even touch a Mac. It detects the change in the access point and reacts accordingly by readjusting its settings and even reusing the <varname>username</varname> and <varname>password</varname> from the previous configuration.</para>
    </sect2>
    <sect2>
      <title>Itouch.</title>
      <para>I asked my son to do it, since I only have second hand experience with those devices. Besides I did not want to look for my glasses. It behaved the same way as the Mac, it asked me to accept the certificate and then asked me for the <varname>username</varname> and <varname>password</varname>.</para>
    </sect2>
    <sect2>
      <title>Windows 7</title>
      <para>Do not expect to get a question about the certificate at this point.  You will have to install the certificate in advance by yourself. Go to <filename>/usr/local/etc/raddb/certs/</filename> to get it, I used a USB stick. The instructions, I found online, are to create the connection manually and install the certificate as soon as the network connection setuping wizard reaches the point of asking you for them. This did not help and Windows continued to complain about the certificate. I installed it through the Internet options section within the Control Panel, but this did not help either. I played with the check boxes &quot;the best Windows approach isn&apos;t it?&quot;, and did some googling. Suddenly it worked and when I tried to connect asked me to accept the certificate (the same one which I installed and marked in advance as trusted in all the possible places!!!) This is the picture with the certificate&apos;s options.</para>
      <graphic fileref="Windows_WPA_setup_576.eps"/>
      <para>As if this is not enough you need to do the same for all the users on each Windows machine, even with the same laptop the procedure for each user will be similar but unique.
The only advice I have is to be persistent and it will work. If you google the problem you will find that some people simply got around the problem by buying certificates obviously it comes cheaper for big number of laptops, but maybe quitting Windows is better.</para>
      <para>If you decide to use WPA2 Windows 7 will work fine, but it will not detect the change automatically. The properties change shown on the the picture above will work. The encryption should remain TKIP. Windows 7 will ask for the <varname>username</varname> and <varname>password</varname> and then it should work fine.</para>
    </sect2>
  </sect1>
  <sect1>
    <title>Additional administrative tasks you may consider necessary.</title>
    <sect2>
      <title>Limit bad clients - bit torrent.</title>
      <para>It did not take more than a couple of days for around thirty of my neighbors to start using the open &quot;Welcome&quot; network. Most of them turned to being modest doing mostly mail and some surfing, but two or three <application>bittorrent</application> fans turned out to be a problem. If you decide to provide some Internet for your neighbors you certainly should do something about this problem.</para>
      <para>You have at least two options: l7-filter from <ulink url="http://l7-filter.clearfoundation.com/">http://l7-filter.clearfoundation.com/</ulink> and ipp2p from <ulink url="http://www.ipp2p.org/">http://www.ipp2p.org/</ulink>. During one time or another I used both of them and the results are relatively similar. I still prefer <application>ipp2p</application> as I believe it is less CPU consuming. The project web page claims that the project is discontinued. This is not exactly true, it is only discontinued as a separate project for the external module. It was moved to <application>patch-o-matic</application> which is today defunct. Nowadays after netfilter.org discontinued <application>patch-o-matic</application>, it was moved to <application>xtables-addons</application> and netfilter.org is still support it. First, do not forget to install <application>libmnl</application> from <ulink url="http://www.netfilter.org/projects/xtables-addons/index.html">http://www.netfilter.org/projects/xtables-addons/index.html</ulink> and then the <application>xtables-addons</application>. Then you will need something like this:<screen>    $IPTABLES -N Bittorrent
$IPTABLES -t mangle -N Bittorrent
$IPTABLES -t mangle -A PREROUTING -s 172.17.0.0/16 -m ipp2p --bit -j Bittorrent
$IPTABLES -A INPUT  -s 172.17.0.0/16 -m ipp2p --bit -j Bittorrent
$IPTABLES -A OUTPUT  -s 172.17.0.0/16 -m ipp2p --bit -j Bittorrent
$IPTABLES -A FORWARD  -s 172.17.0.0/16 -m ipp2p --bit -j Bittorrent
$IPTABLES -A Bittorrent  -j LOG  --log-level info --log-prefix &quot;Bittorrent &quot;
$IPTABLES -t mangle -A Bittorrent  -j LOG  --log-level info --log-prefix &quot;Bittorrent m &quot;
$IPTABLES -A Bittorrent  -j DROP
$IPTABLES -t mangle -A Bittorrent  -j DROP</screen></para>
      <para>Most of these commands are unnecessary, just doing:
<screen>iptables -t mangle -A PREROUTING -s 172.17.0.0/16 -m ipp2p --bit -j DROP</screen>
will do most of the job. You simply put it before the line
<screen>iptables -A XXXXX -m state --state ESTABLISHED,RELATED -j ACCEPT</screen>        
to get it working.</para>
      <para>Anyway, do not expect too much from it, or from <application>l7-filter</application> for that matter. They will slow down <application>bittorrent</application> clients significantly, but both have problems recognizing encrypted connections. At least the <application>bittorrent</application> clients for sure will not be able to kill anymore all other connections. If you are not satisfied with the results of the solution just described you should combine it with traffic shaping (next paragraph).</para>
    </sect2>
    <sect2>
      <title>Traffic shaping</title>
      <para>The decision to spend time to setting up  and fine tuning traffic shaping depends on: the type of Internet connection used, the number of clients you have, their behavior and most important, will you provide some Internet for your neighbors.</para>
      <para>If you have a relatively fast and symmetric connection you have nothing to worry about, but if you are on something like ADSL and your provider has an illicit behavior than moving the queue to your machine makes a real difference. You can read about the reasons for getting control over your queue here &quot;<ulink url="http://lartc.org/howto/lartc.cookbook.ultimate-tc.html">The Ultimate Traffic Conditioner</ulink>&quot;.</para>
      <para>It is important to mention that since &quot;<ulink url="http://lartc.org/howto/index.html">Linux Advanced Routing &amp; Traffic Control HOWTO</ulink>&quot; was written, lots of things have changed, though probably the most important new thing in the field of traffic shaping is the &quot;<ulink url="http://lartc.org/howto/index.html">Intermediate Functional Block device</ulink>&quot;. A lot of work has been done in the field and you have to be really careful when you are doing your own research since many of the online documentations and examples are outdated. Most examples will still work fine, but often better solutions have been developed.</para>
      <para>My traffic shaping script had the following goals:</para>
      <orderedlist numeration="loweralpha">
        <listitem>
          <para>Move the queue to my machine.</para>
        </listitem>
        <listitem>
          <para>Provide fairness between both my family clients and guests in the &quot;Welcome&quot; network.</para>
        </listitem>
        <listitem>
          <para>Give a warranted advantage to my own clients, leaving the clients in &quot;Welcome&quot; with what is left, while at the same time warranting some bandwidth for Welcome even in moments of heavy load. My Internet connection is actually 99% unused anyway, but I did not want to listen to complaints from my family.</para>
        </listitem>
        <listitem>
          <para>Have a method to separate clients that misbehave from the crowd.</para>
        </listitem>
      </orderedlist>
      <para>Here is the resulting script rc.traffic_shaping. It does what I wanted it to, but is certainly not perfect and will require additional fine-tuning. Anyway you will have to readjust it to your conditions.</para>
      <para>One important thing that needs to be mentioned is that limiting the outgoing traffic from a specific source, does not lead to proportional limitation to the incoming traffic. Most streaming protocols require small amounts of outgoing requests in order to get real floods of incoming video. As a result even class 1:13 (this is where baddies go), can seem too restrictive with its &quot;rate 10kbit burst 15kbit&quot;, but it actually gives them around 600kbits of download speed. This demonstrates that in order to have precise control you need to shape incoming connections as well.</para>
      <para>Next is the chart of outgoing traffic shaping.</para>
      <para>The traffic goes as follow:</para>
      <simplelist>
        <member>From Acer_A1 -&gt;1:11</member>
        <member>From Welcome -&gt; 1:12</member>
        <member>Bad clients -&gt; 1:13</member>
        <member>Between may cable clients and Acer_A1 -&gt; 1:2</member>
      </simplelist>
      <para>For example the traffic is classified by <command>iptables</command> with rules like this:</para>
      <para><command>iptables -t mangle -A POSTROUTING -s 192.168.1.0/24 -d 192.168.1.0/24 -j CLASSIFY --set-class 1:2</command>

</para>
      <para>You can see how I set the classes in  &quot;Policy: Traffic_Control&quot; in <filename>acer_br.pdf</filename> or check the detailed syntax inside the <filename>acerap_br.fw</filename> script.</para>
      <graphic fileref="outgoing_traffic_shaping.eps"/>
      <para>The next picture represents the chart of incoming traffic shaping.</para>
      <para>The traffic goes as follow:</para>
      <simplelist>
        <member>To Acer_A1 -&gt;1:31</member>
        <member>From Welcome -&gt; 1:32</member>
        <member>Bad clients -&gt; 1:33 - nobody is there yet, but it is ready:-).</member>
        <member>Between may cable clients and Acer_A1 -&gt; 1:4</member>
      </simplelist>
      <graphic fileref="incoming_traffic_shaping.eps"/>
      <para>The first step in shaping the outgoing traffic is to get the <interface>ifb0</interface> <ulink url="http://lartc.org/howto/index.html">Intermediate Functional Block device</ulink>&quot; working. It turned out that the module does not load automatically, but I rather loaded it in the <filename>rc.traffic_shaping</filename> script by: <screen>/sbin/modprobe ifb
ifconfig ifb0 up</screen></para>
      <para>The next problem is really interesting look at the part of the rc.traffic_shaping script pasted below:</para>
      <programlisting>##############################
# It is necessary to mirror both eth0 and br0 to ifb0 in order to have both traffics
# with destinations 172.17.0.0/16 and 192.168.1.0/24,
# because each of them sees only one destination as outgoing.
# You may check it by remarking one of the mirrors and the running WireShark on ifb0.


tc filter add dev $DEV parent ffff: protocol ip prio 10 u32 \
 match ip dst 0.0.0.0/0 flowid 1: \
 action mirred egress redirect dev ifb0


tc filter add dev br0 parent ffff: protocol ip prio 10 u32 \
 match ip dst 0.0.0.0/0 flowid 1: \
 action mirred egress redirect dev ifb0
##############################</programlisting>
      <para>The $DEV=eth0 is set at the beginning of the script.
There is probably a better way of directing traffic to ifb0,  but this is the only way that works for me.
You will need the following commands, to investigate and adjust the script to your own needs:</para>
      <programlisting>tc class ls dev eth0


tc class ls dev ifb0


tc -s -d qdisc show dev eth0


tc -s -d qdisc show dev ifb0


tc -s class show dev eth0</programlisting>
    </sect2>
    <sect2>
      <title>Cache DNS server.</title>
      <para>Having a cache DNS server was a great advantage in the time when everyone thought that a 28&apos;800 modem is lighting fast. With today&apos;s speed the percentage of economized bandwidth is close to zero, but it is so easy to install, and besides old habits die hard. Just make <filename>/etc/rc.d/rc.bind</filename> executable. Slackware has a <filename>/etc/named.conf</filename> pre-ready. It is a good idea to setup regular updates of named.root by simply creating the script <filename>/etc/cron.monthly/named.root</filename> and putting the following two commands in it:<programlisting>#!/bin/sh
#
/usr/bin/wget --user=ftp --password=ftp \
        http://www.internic.net/zones/named.root \
        -O /var/named/caching-example/named.root
/etc/rc.d/rc.bind restart</programlisting></para>
    </sect2>
    <sect2>
      <title>Log configuration.</title>
      <para><emphasis role="bold">The dhcpd log</emphasis> can be moved to separate files by three simple steps:</para>
      <para>Putting the next line at the end of the <filename>dhcpd.conf</filename><programlisting>log-facility local7;</programlisting></para>
      <para>Append at the end of <filename>/etc/syslog.conf</filename> the line</para>
      <programlisting>local7.*                   -/var/log/dhcpd.log</programlisting>
      <para>Create an empty dhcpd.log by:<programlisting>:&gt; /var/log/dhcpd.log</programlisting></para>
      <para>Of course dhcpd and syslogd need to be restarted.</para>
      <para><emphasis role="bold">iptables log.</emphasis> It is a tempting idea to move the <command>iptables</command> log in a separate file if you use Firewall Builder or just enjoy having extensive logs from your firewall. The complication here comes from the limited choice of &quot;<option>--log-level X</option>&quot; available. As a result, the kernel (and not the iptables) is in reality doing all the filtering thus all logs go in log facility &quot;<emphasis role="bold">kern.*</emphasis>&quot;. The choice for * is limited between those levels &quot;<emphasis role="bold">0 emerg, 1 alert, 2 crit, 3 err, 4 warning, 5 notice, 6 info, 7 debug</emphasis>&quot;. Besides &quot;<emphasis role="bold">crit</emphasis>&quot; is the default level for <filename>klogd</filename> to send messages to the console so whatever goes on this level inevitably goes on the console as well. You may experiment with other levels or try changing &quot;<command>klogd -c 3</command>&quot; to something else.</para>
      <para>Everything else is simple after these difficult choices are made.</para>
      <para>First either change the log level setting in Firewall Builder, or if you wrote your own script set it to something like &quot;<parameter>-j LOG --log-level warn --log-prefix &quot;my log text&quot;</parameter>&quot;.</para>
      <para>After this is done, append at the end of <filename>/etc/syslog.conf</filename> the line:</para>
      <programlisting>kern.=warn                  -/var/log/fwbuilder.log</programlisting>
      <para>and exclude it from</para>
      <programlisting>*.warn;kern.!=warn;\
        authpriv.none;cron.none;mail.none;news.none        -/var/log/syslog</programlisting>
      <para>If you decide to experiment with other levels, for example &quot;<emphasis role="bold">notice</emphasis>&quot;, change the line like this:</para>
      <programlisting>kern.=notice                   /var/log/fwbuilder.log</programlisting>
      <para>But in the case of &quot;<emphasis role="bold">notice</emphasis>&quot; you will also have to exclude &quot;<emphasis role="bold">kern.notice</emphasis>&quot; from <filename>/var/log/messages</filename> by editing the related line in <filename>syslog.conf</filename> in a similar way  yielding the line:</para>
      <programlisting>*.info;*.!warn;kern.!=notice;\
        authpriv.none;cron.none;mail.none;news.none        -/var/log/messages</programlisting>
      <para>There is no perfect choice and some of your boot messages will always go to <filename>fwbuilder.log</filename> instead of going in to the messages or syslog files. The biggest problem are the eventual error messages generated during the normal course of work, which will be buried in the <filename>fwbuilder.log</filename>.</para>
      <para>If you want see what else goes on in the /var/log/fwbuilder.log and iptables logs, the next command will help you:</para>
      <programlisting>cat /var/log/fwbuilder.log |grep RULE -v</programlisting>
    </sect2>
  </sect1>
  <sect1>
    <title>Some final words.</title>
    <para>Over a month passed, since I started writing this document, while creating the access point took me only three days.</para>
    <para>During the time being the AP did not drop one connection, while providing coverage over almost a 100 meter diameter. No timeout error messages occurred, which was so common for the &quot;Linksys SRX 200&quot; router.</para>
    <para>Over 30 of my neighbors started using it more or less heavily and some really heavily.</para>
    <para>For example, while writing this:</para>
    <screen>root@acer:/var/log# cat /proc/net/ip_conntrack |grep tcp -c
565
root@acer:/var/log# cat /proc/net/ip_conntrack |grep udp -c
76</screen>
    <graphic fileref="iptraf_low.eps" format="EPS" scale="75"/>
    <para>And even in a moment of heavy load, like below, not only does the network remain stable, but it also provides a descent speed for everyone.</para>
    <graphic fileref="iptraf.eps" format="EPS" scale="55"/>
    <para>Now I have comprehensive log files like:</para>
    <screen>Nov 21 21:29:49 acer kernel: [420579.216945] RULE 3 -- CONTINUE IN=wlan0_0 OUT=br0
       SRC=172.17.128.154 DST=173.194.31.138 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=58669
       DF PROTO=TCP SPT=49604 DPT=80 WINDOW=0 RES=0x00 RST URGP=0</screen>
    <para>All in all I am satisfied with the outcome. It was worth the effort, and the result surpassed the best of all my expectations.</para>
  </sect1>
<!-- If you had a second appendix in an external file, you would call it
here with the following: --><!-- This exactly matches the word you used at the very top of the
document. Use whatever word makes sense to you so long as it only uses
letters, underscores and hyphens. -->  <appendix id="gfdl">
    <title>GNU Free Documentation License</title>
<!-- - GNU Project - Free Software Foundation (FSF) --><!-- LINK REV="made" HREF="mailto:webmasters@gnu.org" --><!-- http://www.gnu.org/copyleft/fdl.html -->    <sect1>
      <title>GNU Free Documentation License</title>
      <para>Version 1.1, March 2000</para>
      <blockquote>
        <para>Copyright (C) 2000  Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.</para>
      </blockquote>
    </sect1>
    <sect1 id="gfdl-0">
      <title>PREAMBLE</title>
      <para>The purpose of this License is to make a manual, textbook,
    or other written document &quot;free&quot; in the sense of freedom: to
    assure everyone the effective freedom to copy and redistribute it,
    with or without modifying it, either commercially or
    noncommercially.  Secondarily, this License preserves for the
    author and publisher a way to get credit for their work, while not
    being considered responsible for modifications made by
    others.</para>
      <para>This License is a kind of &quot;copyleft&quot;, which means that
    derivative works of the document must themselves be free in the
    same sense.  It complements the GNU General Public License, which
    is a copyleft license designed for free software.</para>
      <para>We have designed this License in order to use it for manuals
    for free software, because free software needs free documentation:
    a free program should come with manuals providing the same
    freedoms that the software does.  But this License is not limited
    to software manuals; it can be used for any textual work,
    regardless of subject matter or whether it is published as a
    printed book.  We recommend this License principally for works
    whose purpose is instruction or reference.</para>
    </sect1>
    <sect1 id="gfdl-1">
      <title>APPLICABILITY AND DEFINITIONS</title>
      <para>This License applies to any manual or other work that
    contains a notice placed by the copyright holder saying it can be
    distributed under the terms of this License.  The &quot;Document&quot;,
    below, refers to any such manual or work.  Any member of the
    public is a licensee, and is addressed as &quot;you&quot;.</para>
      <para>A &quot;Modified Version&quot; of the Document means any work
    containing the Document or a portion of it, either copied
    verbatim, or with modifications and/or translated into another
    language.</para>
      <para>A &quot;Secondary Section&quot; is a named appendix or a front-matter
    section of the Document that deals exclusively with the
    relationship of the publishers or authors of the Document to the
    Document&apos;s overall subject (or to related matters) and contains
    nothing that could fall directly within that overall subject.
    (For example, if the Document is in part a textbook of
    mathematics, a Secondary Section may not explain any mathematics.)
    The relationship could be a matter of historical connection with
    the subject or with related matters, or of legal, commercial,
    philosophical, ethical or political position regarding
    them.</para>
      <para>The &quot;Invariant Sections&quot; are certain Secondary Sections
    whose titles are designated, as being those of Invariant Sections,
    in the notice that says that the Document is released under this
    License.</para>
      <para>The &quot;Cover Texts&quot; are certain short passages of text that
    are listed, as Front-Cover Texts or Back-Cover Texts, in the
    notice that says that the Document is released under this
    License.</para>
      <para>A &quot;Transparent&quot; copy of the Document means a
    machine-readable copy, represented in a format whose specification
    is available to the general public, whose contents can be viewed
    and edited directly and straightforwardly with generic text
    editors or (for images composed of pixels) generic paint programs
    or (for drawings) some widely available drawing editor, and that
    is suitable for input to text formatters or for automatic
    translation to a variety of formats suitable for input to text
    formatters.  A copy made in an otherwise Transparent file format
    whose markup has been designed to thwart or discourage subsequent
    modification by readers is not Transparent.  A copy that is not
    &quot;Transparent&quot; is called &quot;Opaque&quot;.</para>
      <para>Examples of suitable formats for Transparent copies include
    plain ASCII without markup, Texinfo input format, LaTeX input
    format, SGML or XML using a publicly available DTD, and
    standard-conforming simple HTML designed for human modification.
    Opaque formats include PostScript, PDF, proprietary formats that
    can be read and edited only by proprietary word processors, SGML
    or XML for which the DTD and/or processing tools are not generally
    available, and the machine-generated HTML produced by some word
    processors for output purposes only.</para>
      <para>The &quot;Title Page&quot; means, for a printed book, the title page
    itself, plus such following pages as are needed to hold, legibly,
    the material this License requires to appear in the title page.
    For works in formats which do not have any title page as such,
    &quot;Title Page&quot; means the text near the most prominent appearance of
    the work&apos;s title, preceding the beginning of the body of the
    text.</para>
    </sect1>
    <sect1 id="gfdl-2">
      <title>VERBATIM COPYING</title>
      <para>You may copy and distribute the Document in any medium,
    either commercially or noncommercially, provided that this
    License, the copyright notices, and the license notice saying this
    License applies to the Document are reproduced in all copies, and
    that you add no other conditions whatsoever to those of this
    License.  You may not use technical measures to obstruct or
    control the reading or further copying of the copies you make or
    distribute.  However, you may accept compensation in exchange for
    copies.  If you distribute a large enough number of copies you
    must also follow the conditions in section 3.</para>
      <para>You may also lend copies, under the same conditions stated
    above, and you may publicly display copies.</para>
    </sect1>
    <sect1 id="gfdl-3">
      <title>COPYING IN QUANTITY</title>
      <para>If you publish printed copies of the Document numbering more
    than 100, and the Document&apos;s license notice requires Cover Texts,
    you must enclose the copies in covers that carry, clearly and
    legibly, all these Cover Texts: Front-Cover Texts on the front
    cover, and Back-Cover Texts on the back cover.  Both covers must
    also clearly and legibly identify you as the publisher of these
    copies.  The front cover must present the full title with all
    words of the title equally prominent and visible.  You may add
    other material on the covers in addition.  Copying with changes
    limited to the covers, as long as they preserve the title of the
    Document and satisfy these conditions, can be treated as verbatim
    copying in other respects.</para>
      <para>If the required texts for either cover are too voluminous to
    fit legibly, you should put the first ones listed (as many as fit
    reasonably) on the actual cover, and continue the rest onto
    adjacent pages.</para>
      <para>If you publish or distribute Opaque copies of the Document
    numbering more than 100, you must either include a
    machine-readable Transparent copy along with each Opaque copy, or
    state in or with each Opaque copy a publicly-accessible
    computer-network location containing a complete Transparent copy
    of the Document, free of added material, which the general
    network-using public has access to download anonymously at no
    charge using public-standard network protocols.  If you use the
    latter option, you must take reasonably prudent steps, when you
    begin distribution of Opaque copies in quantity, to ensure that
    this Transparent copy will remain thus accessible at the stated
    location until at least one year after the last time you
    distribute an Opaque copy (directly or through your agents or
    retailers) of that edition to the public.</para>
      <para>It is requested, but not required, that you contact the
    authors of the Document well before redistributing any large
    number of copies, to give them a chance to provide you with an
    updated version of the Document.</para>
    </sect1>
    <sect1 id="gfdl-4">
      <title>MODIFICATIONS</title>
      <para>You may copy and distribute a Modified Version of the
    Document under the conditions of sections 2 and 3 above, provided
    that you release the Modified Version under precisely this
    License, with the Modified Version filling the role of the
    Document, thus licensing distribution and modification of the
    Modified Version to whoever possesses a copy of it.  In addition,
    you must do these things in the Modified Version:</para>
      <orderedlist numeration="upperalpha">
        <listitem>
          <para>Use in the Title Page
      (and on the covers, if any) a title distinct from that of the
      Document, and from those of previous versions (which should, if
      there were any, be listed in the History section of the
      Document).  You may use the same title as a previous version if
      the original publisher of that version gives permission.</para>
        </listitem>
        <listitem>
          <para>List on the Title Page,
      as authors, one or more persons or entities responsible for
      authorship of the modifications in the Modified Version,
      together with at least five of the principal authors of the
      Document (all of its principal authors, if it has less than
      five).</para>
        </listitem>
        <listitem>
          <para>State on the Title page
      the name of the publisher of the Modified Version, as the
      publisher.</para>
        </listitem>
        <listitem>
          <para>Preserve all the
      copyright notices of the Document.</para>
        </listitem>
        <listitem>
          <para>Add an appropriate
      copyright notice for your modifications adjacent to the other
      copyright notices.</para>
        </listitem>
        <listitem>
          <para>Include, immediately
      after the copyright notices, a license notice giving the public
      permission to use the Modified Version under the terms of this
      License, in the form shown in the Addendum below.</para>
        </listitem>
        <listitem>
          <para>Preserve in that license
      notice the full lists of Invariant Sections and required Cover
      Texts given in the Document&apos;s license notice.</para>
        </listitem>
        <listitem>
          <para>Include an unaltered
      copy of this License.</para>
        </listitem>
        <listitem>
          <para>Preserve the section
      entitled &quot;History&quot;, and its title, and add to it an item stating
      at least the title, year, new authors, and publisher of the
      Modified Version as given on the Title Page.  If there is no
      section entitled &quot;History&quot; in the Document, create one stating
      the title, year, authors, and publisher of the Document as given
      on its Title Page, then add an item describing the Modified
      Version as stated in the previous sentence.</para>
        </listitem>
        <listitem>
          <para>Preserve the network
      location, if any, given in the Document for public access to a
      Transparent copy of the Document, and likewise the network
      locations given in the Document for previous versions it was
      based on.  These may be placed in the &quot;History&quot; section.  You
      may omit a network location for a work that was published at
      least four years before the Document itself, or if the original
      publisher of the version it refers to gives permission.</para>
        </listitem>
        <listitem>
          <para>In any section entitled
      &quot;Acknowledgements&quot; or &quot;Dedications&quot;, preserve the section&apos;s
      title, and preserve in the section all the substance and tone of
      each of the contributor acknowledgements and/or dedications
      given therein.</para>
        </listitem>
        <listitem>
          <para>Preserve all the
      Invariant Sections of the Document, unaltered in their text and
      in their titles.  Section numbers or the equivalent are not
      considered part of the section titles.</para>
        </listitem>
        <listitem>
          <para>Delete any section
      entitled &quot;Endorsements&quot;.  Such a section may not be included in
      the Modified Version.</para>
        </listitem>
        <listitem>
          <para>Do not retitle any
      existing section as &quot;Endorsements&quot; or to conflict in title with
      any Invariant Section.</para>
        </listitem>
      </orderedlist>
      <para>If the Modified Version includes new front-matter sections
    or appendices that qualify as Secondary Sections and contain no
    material copied from the Document, you may at your option
    designate some or all of these sections as invariant.  To do this,
    add their titles to the list of Invariant Sections in the Modified
    Version&apos;s license notice.  These titles must be distinct from any
    other section titles.</para>
      <para>You may add a section entitled &quot;Endorsements&quot;, provided it
    contains nothing but endorsements of your Modified Version by
    various parties--for example, statements of peer review or that
    the text has been approved by an organization as the authoritative
    definition of a standard.</para>
      <para>You may add a passage of up to five words as a Front-Cover
    Text, and a passage of up to 25 words as a Back-Cover Text, to the
    end of the list of Cover Texts in the Modified Version.  Only one
    passage of Front-Cover Text and one of Back-Cover Text may be
    added by (or through arrangements made by) any one entity.  If the
    Document already includes a cover text for the same cover,
    previously added by you or by arrangement made by the same entity
    you are acting on behalf of, you may not add another; but you may
    replace the old one, on explicit permission from the previous
    publisher that added the old one.</para>
      <para>The author(s) and publisher(s) of the Document do not by
    this License give permission to use their names for publicity for
    or to assert or imply endorsement of any Modified Version.</para>
    </sect1>
    <sect1 id="gfdl-5">
      <title>COMBINING DOCUMENTS</title>
      <para>You may combine the Document with other documents released
    under this License, under the terms defined in section 4 above for
    modified versions, provided that you include in the combination
    all of the Invariant Sections of all of the original documents,
    unmodified, and list them all as Invariant Sections of your
    combined work in its license notice.</para>
      <para>The combined work need only contain one copy of this
    License, and multiple identical Invariant Sections may be replaced
    with a single copy.  If there are multiple Invariant Sections with
    the same name but different contents, make the title of each such
    section unique by adding at the end of it, in parentheses, the
    name of the original author or publisher of that section if known,
    or else a unique number.  Make the same adjustment to the section
    titles in the list of Invariant Sections in the license notice of
    the combined work.</para>
      <para>In the combination, you must combine any sections entitled
    &quot;History&quot; in the various original documents, forming one section
    entitled &quot;History&quot;; likewise combine any sections entitled
    &quot;Acknowledgements&quot;, and any sections entitled &quot;Dedications&quot;.  You
    must delete all sections entitled &quot;Endorsements.&quot;</para>
    </sect1>
    <sect1 id="gfdl-6">
      <title>COLLECTIONS OF DOCUMENTS</title>
      <para>You may make a collection consisting of the Document and
    other documents released under this License, and replace the
    individual copies of this License in the various documents with a
    single copy that is included in the collection, provided that you
    follow the rules of this License for verbatim copying of each of
    the documents in all other respects.</para>
      <para>You may extract a single document from such a collection,
    and distribute it individually under this License, provided you
    insert a copy of this License into the extracted document, and
    follow this License in all other respects regarding verbatim
    copying of that document.</para>
    </sect1>
    <sect1 id="gfdl-7">
      <title>AGGREGATION WITH INDEPENDENT WORKS</title>
      <para>A compilation of the Document or its derivatives with other
    separate and independent documents or works, in or on a volume of
    a storage or distribution medium, does not as a whole count as a
    Modified Version of the Document, provided no compilation
    copyright is claimed for the compilation.  Such a compilation is
    called an &quot;aggregate&quot;, and this License does not apply to the
    other self-contained works thus compiled with the Document, on
    account of their being thus compiled, if they are not themselves
    derivative works of the Document.</para>
      <para>If the Cover Text requirement of section 3 is applicable to
    these copies of the Document, then if the Document is less than
    one quarter of the entire aggregate, the Document&apos;s Cover Texts
    may be placed on covers that surround only the Document within the
    aggregate.  Otherwise they must appear on covers around the whole
    aggregate.</para>
    </sect1>
    <sect1 id="gfdl-8">
      <title>TRANSLATION</title>
      <para>Translation is considered a kind of modification, so you may
    distribute translations of the Document under the terms of section
    4.  Replacing Invariant Sections with translations requires
    special permission from their copyright holders, but you may
    include translations of some or all Invariant Sections in addition
    to the original versions of these Invariant Sections.  You may
    include a translation of this License provided that you also
    include the original English version of this License.  In case of
    a disagreement between the translation and the original English
    version of this License, the original English version will
    prevail.</para>
    </sect1>
    <sect1 id="gfdl-9">
      <title>TERMINATION</title>
      <para>You may not copy, modify, sublicense, or distribute the
    Document except as expressly provided for under this License.  Any
    other attempt to copy, modify, sublicense or distribute the
    Document is void, and will automatically terminate your rights
    under this License.  However, parties who have received copies, or
    rights, from you under this License will not have their licenses
    terminated so long as such parties remain in full
    compliance.</para>
    </sect1>
    <sect1 id="gfdl-10">
      <title>FUTURE REVISIONS OF THIS LICENSE</title>
      <para>The Free Software Foundation may publish new, revised
    versions of the GNU Free Documentation License from time to time.
    Such new versions will be similar in spirit to the present
    version, but may differ in detail to address new problems or
    concerns.  See <ulink url="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</ulink>.</para>
      <para>Each version of the License is given a distinguishing
    version number.  If the Document specifies that a particular
    numbered version of this License &quot;or any later version&quot; applies to
    it, you have the option of following the terms and conditions
    either of that specified version or of any later version that has
    been published (not as a draft) by the Free Software Foundation.
    If the Document does not specify a version number of this License,
    you may choose any version ever published (not as a draft) by the
    Free Software Foundation.</para>
    </sect1>
    <sect1 id="gfdl-11">
      <title>HOW TO USE THIS LICENSE FOR YOUR DOCUMENTS</title>
      <para>To use this License in a document you have written, include
    a copy of the License in the document and put the following
    copyright and license notices just after the title page:</para>
      <blockquote>
        <para>
      Copyright (c)  YEAR  YOUR NAME.
      Permission is granted to copy, distribute and/or modify this document
      under the terms of the GNU Free Documentation License, Version 1.1
      or any later version published by the Free Software Foundation;
      with the Invariant Sections being LIST THEIR TITLES, with the
      Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
      A copy of the license is included in the section entitled &quot;GNU
      Free Documentation License&quot;.
</para>
      </blockquote>
      <para>If you have no Invariant Sections, write &quot;with no Invariant
    Sections&quot; instead of saying which ones are invariant.  If you have
    no Front-Cover Texts, write &quot;no Front-Cover Texts&quot; instead of
    &quot;Front-Cover Texts being LIST&quot;; likewise for Back-Cover
    Texts.</para>
      <para>If your document contains nontrivial examples of program
    code, we recommend releasing these examples in parallel under your
    choice of free software license, such as the GNU General Public
    License, to permit their use in free software.</para>
    </sect1>
  </appendix>
<!-- Uncomment the following line if you are using an external file for
your glossary. You may also paste the contents of that file into the
template at this point if you prefer having a single, longer file. --><!-- &glossary; --><!-- Uncomment the following line if you are using an external file for
your bibliography. You may also paste the contents of that file into the
template at this point if you prefer having a single, longer file. --><!-- &bibliography; --></article>
