<?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>3DN Linux</title>
	<atom:link href="http://linux.3dn.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://linux.3dn.nl</link>
	<description>Just another 3DN site</description>
	<lastBuildDate>Sat, 09 Jul 2011 12:06:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using MRTG on Debian</title>
		<link>http://linux.3dn.nl/using-mrtg-on-debian/</link>
		<comments>http://linux.3dn.nl/using-mrtg-on-debian/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 05:40:43 +0000</pubDate>
		<dc:creator>Fred Leeflang</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[mrtg]]></category>
		<category><![CDATA[rrd]]></category>

		<guid isPermaLink="false">http://linux.3dn.nl/?p=52</guid>
		<description><![CDATA[How to install/use MRTG on Debian]]></description>
			<content:encoded><![CDATA[<p>In yet another episode of &#8216;how to run broken packages on Debian&#8217; this is the MRTG episode.</p>
<p>I have spent some time earlier on getting mrtg to work on my server but by now it has sent me hundreds of emails already telling me it&#8217;s not working properly, telling me things like:</p>
<pre class="brush: bash; title: ; notranslate">
Constant subroutine SNMP_Session::AF_INET6 redefined at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 149
</pre>
<p>As I never gave mrtg much time on installation, let&#8217;s try and do this a bit more structurally, as MRTG, but mostly the RRD database being used as an engine for it, is really quite a nice tool that deserves some more attention. So, I removed the mrtg package first to start again from scratch:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# dpkg --purge mrtg
</pre>
<h3>Reinstalling</h3>
<p>With the mrtg package now removed, let&#8217;s reinstall and analyze what&#8217;s happening exactly:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# apt-get install mrtg
</pre>
<p>The package install asks whether the /etc/mrtg.cfg should be readable by root-only as making it readable by others is a security risk. I&#8217;m not sure why bother to ask then, so I said to make it readable by root-only. The package install recommends installing mrtg-contrib as well, so let&#8217;s:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# apt-get install mrtg-contrib
</pre>
<h3>Configuration</h3>
<p>The config file <em>/etc/mrtg.cfg</em> mentioned in the install is very simple indeed as it only specifies the <em>WorkDir, </em>the<em> WriteExpires </em>and the <em>Title.</em></p>
<p>After the install there doesn&#8217;t appear to be any daemon running, nor is there an init RC file for MRTG. Fortunately we do find an <em>/etc/cron.d/mrtg</em> file:</p>
<pre class="brush: bash; title: ; notranslate">
*/5 *	* * *	root	if [ -x /usr/bin/mrtg ] &amp;&amp; [ -r /etc/mrtg.cfg ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2&gt;&amp;1 | tee -a /var/log/mrtg/mrtg.log ; fi
</pre>
<p>So we see mrtg gets fired up every 5 minutes through cron. Looking at this we expect to find something in /var/log/mrtg as well, and indeed there&#8217;s a logfile which contains repetitive error messages seen earlier. As the script runs as root, we can also try reproducing this from the command line:</p>
<pre class="brush: bash; title: ; notranslate">

omega:/etc/cron.d# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg
Constant subroutine SNMP_Session::AF_INET6 redefined at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 149
Prototype mismatch: sub SNMP_Session::AF_INET6 () vs none at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 149
Constant subroutine SNMP_Session::PF_INET6 redefined at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 149
Prototype mismatch: sub SNMP_Session::PF_INET6 () vs none at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 149
Constant subroutine SNMPv1_Session::AF_INET6 redefined at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 608
Prototype mismatch: sub SNMPv1_Session::AF_INET6 () vs none at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 608
Constant subroutine SNMPv1_Session::PF_INET6 redefined at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 608
Prototype mismatch: sub SNMPv1_Session::PF_INET6 () vs none at /usr/share/perl/5.12/Exporter.pm line 64.
 at /usr/share/perl5/SNMP_Session.pm line 608
</pre>
<p>Just lovely&#8230;</p>
<h3><span class="Apple-style-span" style="font-size: 14px; line-height: 22px;">Fixing the bug wasn&#8217;t very difficult. I found a <a title="SNMP bug" href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629331" target="_blank">Debian bug report</a> which alas didn&#8217;t include a fix yet; however I found a fix <a title="Bugfix SNMP" href="http://us.generation-nt.com/answer/bug-628804-libnet-snmp-perl-warnings-snmp-session-pm-help-203571942.html" target="_blank">here</a>. Voila, now I have mrtg running, let&#8217;s see how to configure it.</span></h3>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.3dn.nl/using-mrtg-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenLDAP on Debian</title>
		<link>http://linux.3dn.nl/openldap-on-debian/</link>
		<comments>http://linux.3dn.nl/openldap-on-debian/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 04:30:52 +0000</pubDate>
		<dc:creator>Fred Leeflang</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://linux.3dn.nl/?p=46</guid>
		<description><![CDATA[How to install and use OpenLDAP on Debian]]></description>
			<content:encoded><![CDATA[<p>Well here&#8217;s probably another incomplete article with scratch notes about installing OpenLDAP on Debian Sid.</p>
<p>I recently bumped into a problem when trying to install OpenLDAP and will document how I fixed these problems.</p>
<h3>Problem</h3>
<p>When trying to install OpenLDAP through the regular methods:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# apt-get install slapd
</pre>
<p>I ran into a &#8216;grave bug&#8217;:</p>
<pre class="brush: bash; title: ; notranslate">
grave bugs of slapd (-&gt; 2.4.25-1.1) &lt;unfixed&gt;
 #628237 - slapd: installation fails: slap_sasl_init: auxprop add plugin failed
   Merged with: 627984
</pre>
<p>The above message is generated by the <em>apt-listbugs</em> program that checks bug reports before actually installing something. So we can inspect the cause of this problem by viewing the <a title="Bug" href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628237" target="_blank">Debian Bug Database</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.3dn.nl/openldap-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios on Debian</title>
		<link>http://linux.3dn.nl/nagios-on-debian/</link>
		<comments>http://linux.3dn.nl/nagios-on-debian/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 21:10:11 +0000</pubDate>
		<dc:creator>Fred Leeflang</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://linux.3dn.nl/?p=38</guid>
		<description><![CDATA[For monitoring my server I decided to give Nagios a try.]]></description>
			<content:encoded><![CDATA[<p>For monitoring my server I decided to give Nagios a try. The install is very straightforward:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# aptitude install nagios3-core
</pre>
<p>This also installs the packages <em>nagios-plugins</em>, <em>nagios-plugins-basic</em>, <em>nagios-plugins-standard</em> and <em>nagios3-common</em>. The only thing Debian specific in the <em>/usr/share/doc/nagios3-common/README.Debian</em> is a note about running external commands from Nagios:</p>
<pre class="brush: bash; title: ; notranslate">
/etc/init.d/nagios3 stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start
</pre>
<p>A service startup file is added in <em>/etc/init.d/nagios3</em> and the service is immediately started after the package install:</p>
<pre class="brush: bash; title: ; notranslate">
omega:/etc/init.d# ps xa|grep nagios
14937 pts/0    S+     0:00 grep nagios
24092 ?        SNs    0:00 /usr/sbin/nagios3 -d /etc/nagios3/nagios.cfg
</pre>
<p>I also immediately got two emails from Nagios, one telling me a filesystem is getting full and one telling me that a lot of processes are running on my server. I knew this last bit already.</p>
<h3>Configuration</h3>
<p>The main config file is right where I expect it, <em>/etc/nagios3/nagios.cfg.</em> Lots of parameters there, but most very comprehensive and well documented. The configured logfile <em>/var/log/nagios3/nagios.log </em>immediately shows the emailed alerts in a human readable format and the <em>/etc/nagios3/command.cfg</em> immediately shows how I got the emails I got:</p>
<pre class="brush: bash; title: ; notranslate">
define command{
    command_name    notify-host-by-email
    ....
</pre>
<p>This is just one of the more important command definitions in this file but there are a few others as well, I&#8217;m already getting the hang of this thing after 10 minutes or so.</p>
<p><em>nagios.cfg</em> also sets two <em>config_dir</em> parameters, <em>/etc/nagios-plugins/config </em>and <em>/etc/nagios3/conf.d</em>. These are both directories in which we find several files. The conf.d directory has files that:</p>
<ul>
<li>contacts_nagios2.cfg: defines a few contacts</li>
<li>extinfo_nagios2.cfg: defines host and service information</li>
<li>generic-host_nagios2.cfg: defines a <strong>template</strong> for a host</li>
<li>generic-service_nagios2.cfg: defines a <strong>template</strong> for a service</li>
<li>hostgroups_nagios2.cfg: defines generic hostgroups</li>
<li>localhost_nagios2.cfg: defines an actual host, localhost</li>
<li>services_nagios2.cfg: defines web service and ssh service</li>
<li>timeperiods_nagios2.cfg: defines the timings for monitoring</li>
</ul>
<p>The nagios-plugins/config directory has files that:</p>
<ul>
<li>apt.cfg: check apt</li>
<li>breeze.cfg: wireless?</li>
<li>dhcp.cfg: check dhcp server</li>
<li>disk.cfg: check diskspace</li>
<li>disk-smb.cfg: check SMB</li>
<li>dns.cfg: check DNS</li>
<li>flexlm.cfg: check  flexlm</li>
<li>fping.cfg: check fping</li>
<li>ftp.cfg: check ftp</li>
<li>games.cfg: check games</li>
<li>hppjd.cfg: HP printer?</li>
<li>http.cfg: check webserver</li>
<li>ifstatus.cfg: check network interfaces</li>
<li>ldap.cfg: check ldap server</li>
<li>load.cfg: check system load</li>
<li>mail.cfg: check mailserver</li>
<li>mailq.cfg: check mailserver</li>
<li>mrtg.cfg: Check mrtg</li>
<li>mysql.cfg: check MySQL database server</li>
<li>netware.cfg:</li>
<li>news.cfg:</li>
<li>nt.cfg:</li>
<li>ntp.cfg:</li>
<li>pgsql.cfg:</li>
<li>ping.cfg:</li>
<li>procs.cfg:</li>
<li>radius.cfg:</li>
<li>real.cfg:</li>
<li>rpc-nfs.cfg:</li>
<li>snmp.cfg:</li>
<li>ssh.cfg:</li>
<li>tcp_udp.cfg:</li>
<li>telnet.cfg:</li>
<li>users.cfg:</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://linux.3dn.nl/nagios-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Sendmail on Debian</title>
		<link>http://linux.3dn.nl/running-sendmail-on-debian/</link>
		<comments>http://linux.3dn.nl/running-sendmail-on-debian/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 07:00:14 +0000</pubDate>
		<dc:creator>Fred Leeflang</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://linux.3dn.nl/?p=22</guid>
		<description><![CDATA[Running sendmail on Debian; not the easiest thing to do.]]></description>
			<content:encoded><![CDATA[<p>On my main server at home I run Debian as the main OS. The default MTA on Debian is Exim, while I had already installed Postfix myself for a previous project. For a project I&#8217;m very interested in, knowledge of sendmail is required, so I figured I&#8217;d revive my rather extensive sendmail knowledge and see if I could get it to operate on Debian Sid (Sid: development/unstable branch of Debian)</p>
<h3>Installation</h3>
<p>The installation of sendmail, as with most Debian packages, is very straightforward. All the software for Debian, much like most Linux distributions nowadays, is packaged and available from an online repository. The tool <em>aptitude </em>can be used to install a package from one of these repositories:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# aptitude install sendmail
</pre>
<p>As a result of this simple little command however, a LOT of things actually happen:</p>
<pre class="brush: bash; title: ; notranslate">
The following extra packages will be installed:
  sendmail-base sendmail-bin sendmail-cf sensible-mda
Suggested packages:
  sendmail-doc rmail logcheck sasl2-bin
The following packages will be REMOVED:
  postfix
The following NEW packages will be installed:
  sendmail sendmail-base sendmail-bin sendmail-cf sensible-mda
0 upgraded, 5 newly installed, 1 to remove and 335 not upgraded.
Need to get 2,084 kB of archives.
</pre>
<p>So we see here the postfix package actually being removed. Debian knows that postfix functions as MTA and that in most ordinary cases no two MTA&#8217;s should be running on one server.</p>
<p>We also see a number of new packages being install, sendmail, sendmail-base, sendmail-bin, sendmail-cf and &#8216;sensible-mda&#8217;, which <em>aptitude </em>apparently finds to be required to set up a sendmail MTA. One thing that&#8217;s often overlooked in the aptitude output is the &#8216;Suggested packages:&#8217;. I&#8217;ve found these to be very accurate suggestions in the past so when we&#8217;re done converting to sendmail we&#8217;ll check out these packages as well.</p>
<p>Frequently I install small applications and hardly really check the output that flies by. An MTA however is often a complicated and important service which requires meticulous checking. One thing I immediately noticed:</p>
<pre class="brush: bash; title: ; notranslate">
Setting up sendmail-base (8.14.4-2) ...
adduser: Warning: The home directory `/var/lib/sendmail' does not belong to the user you are currently creating.
</pre>
<p>This should immediately trigger a mental note to verify which user is being created as part of the installation of the <em>sendmail-base </em>package. After the installation finishes a quick check in <em>/etc/passwd </em>reveals:</p>
<pre class="brush: bash; title: ; notranslate">
smmta:x:125:125:Mail Transfer Agent,,,:/var/lib/sendmail:/bin/false
smmsp:x:126:140:Mail Submission Program,,,:/var/lib/sendmail:/bin/false
omega:~# ls -la /var/lib/sendmail/
total 8
drwxr-s--x  2 smmta smmsp 4096 Jun 25 01:59 .
drwxr-xr-x 91 root  root  4096 Jun 26 01:28 ..
-rw-rw----  1 root  smmsp    0 Jun 25 01:59 dead.letter
</pre>
<p>So two new users were created, both having the same homedirectory, somewhat odd but it explains the error message.</p>
<p>Immediately after the install we also see right away that sendmail has been started up:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# ps xa|grep sendmail|grep -v grep
25117 ?        Ss     0:05 sendmail: MTA: accepting connections
</pre>
<p>And inspection shows it&#8217;s also immediately accepting connections on port 25, the SMTP port:</p>
<pre class="brush: bash; title: ; notranslate">
omega:~# telnet localhost 25
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 omega.dutchie.org. ESMTP Sendmail 8.14.4/8.14.4/Debian-2; Wed, 29 Jun 2011 08:27:52 +0200; (No UCE/UBE) logging access from: localhost.localdomain(OK)-localhost.localdomain [127.0.0.1]
</pre>
<h3>Configuration</h3>
<p>The packages that have been installed have installed some documentation according to Debian standards:</p>
<pre class="brush: bash; title: ; notranslate">
omega:/usr/share/doc/sendmail# ls -dlF /usr/share/doc/sendmail*
drwxr-xr-x 2 root root 4096 Jun 25 01:59 /usr/share/doc/sendmail/
lrwxrwxrwx 1 root root    8 Jun 25 01:58 /usr/share/doc/sendmail-base -&gt; sendmail/
drwxr-xr-x 2 root root 4096 Jun 25 01:59 /usr/share/doc/sendmail-bin/
lrwxrwxrwx 1 root root    8 Jun 25 01:59 /usr/share/doc/sendmail-cf -&gt; sendmail/
</pre>
<p>The README.gz file gives a couple of good points to get started:</p>
<ul>
<li>Overview of directory permissions required</li>
<li>DontBlameSendmail</li>
<li>File locking note</li>
</ul>
<p>Interesting is that not all the recommendations in the README.gz file are implemented in the Debian package, for example:</p>
<pre class="brush: bash; title: ; notranslate">
omega:/etc/mail# ls -l ../aliases
-rw-r--r-- 1 root root 222 Oct  4  2009 ../aliases
</pre>
<p>While the README.gz suggests permissions 0640. We see however from the timestamp on this file that this <em>aliases</em> file is a much older one already and a leftover from the postfix package that was removed when installing sendmail. This leaves open a potential risk of authorized users (in this case everybody) to lock the file and make locking by sendmail impossible!</p>
<p>All of the configuration files have been installed in /etc/mail. The most important one to inspect right away is of course <em>sendmail.cf</em> and its source <em>sendmail.mc</em>. Right after the install a <em>sendmail.cf.errors</em> has also been generated (?):</p>
<pre class="brush: bash; title: ; notranslate">
omega:/etc/mail# cat sendmail.cf.errors
*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER()
</pre>
<p>Sendmail.cf is a <em>generated</em> file with an M4 file as its source. M4 is a rather complex <em>macro processors</em> which turns a small and simple file like sendmail.mc into a complicated and approx. 15 times as large sendmail.cf. Inspection of sendmail.cf has often been referred to as &#8216;black magic&#8217;, indicating the complexity of the file as sendmail has an enormous amount of configuration options.</p>
<p>I can&#8217;t be quite sure yet but the sendmail.cf.errors are probably quite harmless as they appear to be caused by something that&#8217;s been added dynamically to sendmail.mc:</p>
<pre class="brush: bash; title: ; notranslate">
dnl # Masquerading options
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`3dn.nl.')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
</pre>
<p>As we can see, 3dn.nl is in here, which is my local mail domain. The Debian package builder probably decided to simply add these lines to the end of the sendmail.mc before generating a reasonable default configuration. It&#8217;s also handy to know this as we now have a pretty good idea of what has been done to give sendmail a reasonable initial configuration. Just to be certain though, I moved these lines before the MAILER_DEFINITIONS and regenerated sendmail.cf:</p>
<pre class="brush: bash; title: ; notranslate">
omega:/etc/mail# make sendmail.cf
Updating databases ...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...
Updating Makefile ...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/Makefile...
Updating sendmail.cf ...
</pre>
<p>This got rid of the error messages and shows something I don&#8217;t remember having seen before on earlier sendmail installs, which is the <em>sendmail.conf</em> file being used. Inspection of this file reveals:</p>
<pre class="brush: bash; title: ; notranslate">
# Parameter file for sendmail (sourced by /usr/share/sendmail/sendmail)
# Make all changes herein, instead of altering /etc/init.d/sendmail.
#
# After making changes here, you'll need to run /usr/sbin/sendmailconfig
# or /usr/share/sendmail/update_conf to have the changes take effect -
# If you change DAEMON_MODE, QUEUE_MODE, or QUEUE_INTERVAL, you'll also
# need to run /etc/init.d/sendmail restart.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://linux.3dn.nl/running-sendmail-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing a Linux box into an 802.1x AP</title>
		<link>http://linux.3dn.nl/linux-access-point/</link>
		<comments>http://linux.3dn.nl/linux-access-point/#comments</comments>
		<pubDate>Wed, 12 May 2010 07:59:51 +0000</pubDate>
		<dc:creator>Fred Leeflang</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://linux.3dn.nl/?p=4</guid>
		<description><![CDATA[802.1x is is an IEEE standard for port based network access control. It provides an authentication mechanism for devices wishing to connect to a LAN or WLAN at layer 2, or the networking layer. Consumer devices typically do not offer the standard, possible reasons for this include the complexity of configuration. Using Linux and hostapd [...]]]></description>
			<content:encoded><![CDATA[<p>802.1x is is an IEEE standard for port based network access control. It provides an authentication mechanism for devices wishing to connect to a LAN or WLAN at layer 2, or the networking layer. Consumer devices typically do not offer the standard, possible reasons for this include the complexity of configuration.</p>
<p>Using Linux and hostapd however, it is possible to build an access point that does offer 802.1x functionality. For this to work, a supported network adapter needs to be used. In this article I will document how to build an 802.1x capable access point (WLAN), while a next article may demonstrate how to use 802.1x on a wired LAN.</p>
<h2>Required Hardware</h2>
<p>To provide access point functionality the so called &#8216;master mode&#8217; needs to be supported on the Linux device driver for the network card. I purchased a TP-Link TL-WN951N PCI card for this purpose. This card has an Atheros chipset that&#8217;s recognized by Linux&#8217; ath9k driver in the current (2.6.32-5, Debian Sid) kernel.</p>
<h2>Software and Drivers</h2>
<p>To get the card to behave like a basic access point, we first need to load the ath9k driver. On Debian Sid kernels (and probably most other kernels) this happens automatically. The oldest supported kernel according to <a title="Linux Wireless" href="http://wireless.kernel.org/en/users/Drivers/ath9k">Linux Wireless</a> is 2.6.32. The dmesg output shows:</p>
<blockquote>
<pre>[    6.636267] ath9k 0000:09:01.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17</pre>
<pre>[    7.065708] ath: EEPROM regdomain: 0x809c</pre>
<pre>[    7.065709] ath: EEPROM indicates we should expect a country code</pre>
<pre>[    7.065711] ath: doing EEPROM country-&gt;regdmn map search</pre>
<pre>[    7.065712] ath: country maps to regdmn code: 0x52</pre>
<pre>[    7.065713] ath: Country alpha2 being used: CN</pre>
<pre>[    7.065714] ath: Regpair used: 0x52</pre>
<pre>[    7.118038] phy0: Selected rate control algorithm 'ath9k_rate_control'</pre>
<pre>[    7.118473] cfg80211: Calling CRDA for country: CN</pre>
<pre>[    7.118494] Registered led device: ath9k-phy0::radio</pre>
<pre>[    7.118504] Registered led device: ath9k-phy0::assoc</pre>
<pre>[    7.118513] Registered led device: ath9k-phy0::tx</pre>
<pre>[    7.118522] Registered led device: ath9k-phy0::rx</pre>
<pre>[    7.118527] phy0: Atheros AR5416 MAC/BB Rev:2 AR2133 RF Rev:81: mem=0xffffc900057a0000, irq=17</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linux.3dn.nl/linux-access-point/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

