<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Config — Jürgen Kreileder</title>
	<atom:link href="/articles/category/config/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Software Engineer and Consultant</description>
	<lastBuildDate>Sat, 29 Oct 2016 01:51:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">5303222</site><image><title>Jürgen Kreileder</title><url>/jk-rss.jpg</url><link>/</link><width>144</width><height>114</height><description>Software Engineer and Consultant</description></image>	<item>
		<title>Speedport Routers Eat Your DNS SOA Requests in Modem-Mode</title>
		<link>/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/</link>
					<comments>/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 24 Nov 2009 23:17:37 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[adsl]]></category>
		<category><![CDATA[avm]]></category>
		<category><![CDATA[deutsche telekom]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[modem]]></category>
		<category><![CDATA[pppoe]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[speedport]]></category>
		<category><![CDATA[vdsl]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=358</guid>

					<description><![CDATA[Some years ago I switched to using a Speedport W701V from Deutsche Telekom on my ADSL line at home. I set it up in modem-mode and let a small Linux box handle everything else. This setup had worked fine with other modems but shortly after switching to the Speedport I noticed that my local caching<br />[&#8594; <a href="/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Some years ago I switched to using a Speedport W701V from <a href="http://www.t-home.de/">Deutsche Telekom</a> on my ADSL line at home.  I set it up in modem-mode and let a small Linux box handle everything else.  This setup had worked fine with other modems but shortly after switching to the Speedport I noticed that my local caching DNS server didn&#8217;t work correctly anymore.  I didn&#8217;t really connect the dots at this point, though.</p>
<p>That happened a few days later when I tried to use Apple&#8217;s <em>Back to My Mac</em> — it just didn&#8217;t work.  After some network tracing I found out that the Apple machine sent DNS SOA requests but never got a reply back.  It turned out that all SOA request got blocked somewhere.  Sending requests to my own name server (<code>host -t soa blackdown.de ns.blackdown.de</code>) and tracing DNS there showed that no packet ever arrived.</p>
<p>I put the Speedport back into router-mode at this point and, who would have guessed it, SOA requests worked fine again.</p>
<p>After fruitless discussions with Deutsche Telekom support (it was impossible to find anyone who even remotely understood what I was talking about) and sending a bug report to <a href="http://www.avm.de/">AVM</a> (the 701V actually is a FRITZ!Box) which never got an answer, I finally solved the problem by putting a <a href="http://trac.freetz.org/">Freetz</a> firmware on the Speedport.  This firmware had an option to disable the <em>PPPoE-Filter</em>.  After disabling the filter the device worked flawlessly in modem-mode.</p>
<p>Now, a few days ago, I switched to VDSL and got a new router: a Speedport W920V.<br />
First thing I did was to put it into modem-mode.  And there it was again, the DNS SOA problem!</p>
<p>Knowing what the problem was, I found a simpler fix this time:</p>
<ol style="text-align: left;">
<li>Download the configuration from the device</li>
<li>Manually change <code>dnsfilter_for_active_directory = yes;</code> to <code>dnsfilter_for_active_directory = no;</code> in the <code>pppoefw</code> section</li>
<li>Manually change <code>ipnetbiosfilter = yes;</code> to <code>ipnetbiosfilter = no;</code> in the <code>pppoefw</code> section</li>
<li>Insert a <code>NoChecks=yes</code> line after the <code>Country=</code>&hellip; line in the header to make the device accept the modified file although its checksum is wrong now</li>
<li>Upload the modified configuration to the device</li>
</ol>
<p>(If you have a local NTP server, you also might want to add it to the <code>server_list</code> in the <code>ntpclient</code> section while editing the configuration of the Speedport.)</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/speedport-routers-eat-your-dns-soa-requests-in-modem-mode/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">358</post-id>	</item>
		<item>
		<title>WordPress SSL Patch Update</title>
		<link>/articles/wordpress-ssl-patch-update/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 12 Jan 2007 16:34:46 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2007/01/12/wordpress-ssl-patch-update/</guid>

					<description><![CDATA[The recently released security update for WordPress introduced some changes that broke my HTTPS patch for it. I have updated the patch for WordPress 2.0.6 and 2.0.7-RC1 now: wp2-ssl.patch. Read the complete SSL setup guide here: Securing WordPress 2 Admin Access With SSL Regarding WordPress security, please note that there still is a possible exploit<br />[&#8594; <a href="/articles/wordpress-ssl-patch-update/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>The recently released security update for <a href="http://wordpress.org/" rel="tag">WordPress</a> introduced some changes that broke my HTTPS patch for it. I have updated the patch for WordPress 2.0.6 and 2.0.7-RC1 now: <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</p>
<p>Read the complete SSL setup guide here: <a href="/2006/01/22/securing-wordpress-2-admin-access-with-ssl/">Securing WordPress 2 Admin Access With SSL</a></p>
<p>Regarding WordPress security, please note that there still is a possible exploit for 2.0.6: <a href="http://www.heise-security.co.uk/news/83575"> New WordPress exploit also affects version 2.0.6</a><br />
Make sure you use safe a PHP version and set <code>register_globals = off</code>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">48</post-id>	</item>
		<item>
		<title>Miscellaneous ALSA Patches</title>
		<link>/articles/miscellaneous-alsa-patches/</link>
					<comments>/articles/miscellaneous-alsa-patches/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Mon, 20 Mar 2006 20:05:01 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2006/03/20/miscellaneous-alsa-dmix-patches/</guid>

					<description><![CDATA[I got a new PowerMac G5 Quad a couple of weeks ago. Nice machine, except for the weak graphics and non-existent sound support on Linux. The built-in sound card is completely unsupported at this time. As I did not feel like writing a driver for it, I plugged in an old USB sound device (Creative<br />[&#8594; <a href="/articles/miscellaneous-alsa-patches/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I got a new PowerMac G5 Quad a couple of weeks ago. Nice machine, except for the weak graphics and non-existent sound support on Linux.</p>
<p>The built-in sound card is completely unsupported at this time. As I did not feel like writing a driver for it, I plugged in an old USB sound device (Creative Sound Blaster Audigy&nbsp;2&nbsp;NX). At first this did not work, I just got oopses. But with a small <a href="http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa657ca9245a06fa435e00332a13da1fce182abc">fix</a> (included in the kernel since 2.6.15.5) it started to work.</p>
<p>Next I tried to set up <a href="http://www.alsa-project.org/">ALSA</a>&#8216;s dmix plug-in with S16 which resulted in horrible crackling: The byte swapping code was broken.</p>
<p>Also, ALSA&#8217;s <code>softvol</code> plug-in (not strictly necessary but nice to have with GNOME&#8217;s volume control applet) didn&#8217;t work, it did not support any format available with snd-usb-audio on big-endian machines.</p>
<p>Here are the fixes for these two problems (against alsa-lib-1.0.11rc3):</p>
<ul>
<li><a href="/static/alsa/alsa-dmix-fix.patch">alsa-dmix-fix.patch</a></li>
<li><a href="/static/alsa/alsa-softvol.patch">alsa-softvol.patch</a></li>
</ul>
<p>If somebody is interested, here is the <a href="/static/alsa/USB-Audio.conf">USB-Audio.conf</a> I use with my Audigy&nbsp;2&nbsp;NX.</p>
<p>By the way: Is it normal that the <code>dmix</code> plug-in consumes 100% CPU?</p>
<p><em><strong>April 9th, 2006:</strong> The patches have been integrated into alsa-libs 1.0.11rc4, the 100% CPU issue is fixed in that version too.<br />
There&#8217;s also a ALSA driver for the chip in the PowerMac Quad now, see this <a href="http://lists.debian.org/debian-powerpc/2006/03/msg00470.html">mail</a> from Johannes Berg.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/miscellaneous-alsa-patches/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">44</post-id>	</item>
		<item>
		<title>Securing WordPress 2 Admin Access With SSL</title>
		<link>/articles/securing-wordpress-2-admin-access-with-ssl/</link>
					<comments>/articles/securing-wordpress-2-admin-access-with-ssl/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 22 Jan 2006 20:34:42 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2006/01/22/securing-wordpress-2-admin-access-with-ssl/</guid>

					<description><![CDATA[A few people have asked for an updated version of my Securing WordPress Admin Access With SSL guide. So here is an updated version for WordPress 2! The situation has not changed much since WordPress 1.5: WordPress 2.0 still does not support HTTPS access to the admin area when the rest of the blog is<br />[&#8594; <a href="/articles/securing-wordpress-2-admin-access-with-ssl/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>A few people have asked for an updated version of my <a href="/2005/05/18/securing-wordpress-admin-access-with-ssl/">Securing WordPress Admin Access With SSL</a> guide. So here is an updated version for <a href="http://wordpress.org/" rel="tag">WordPress</a> 2!</p>
<p>The situation has not changed much since WordPress 1.5: WordPress 2.0 still does not support HTTPS access to the admin area when the rest of the blog is served via normal HTTP and I still do not like logging in to my server over unencrypted connections, especially not when using public WLANs. Getting around this WordPress limitation requires quite a few steps:</p>
<h3>The Goal</h3>
<p>All communication involving passwords or authentication cookies should be done over HTTPS connections. <code>wp-login.php</code> and the <code>wp-admin</code> directory should only be accessible over HTTPS.<br />
Normal reading access, as well as comments, tracebacks, and pingbacks still should go over ordinary HTTP.</p>
<h3>The Plan</h3>
<ul>
<li>Add an HTTPS virtual host that forwards requests to the HTTP virtual host</li>
<li>Modify WordPress to send <em>secure</em> authentication cookies, so cookies never get sent over insecure connections accidentally</li>
<li>Require a valid certificate on HTTPS clients. That means to log in to WordPress you need both a valid certificate and a valid password.  If someone manages to get your password, he still can not login because he does not have a valid certificate.</li>
</ul>
<h3>The Implementation</h3>
<p>Note: This documentation assumes a <a href="http://www.debian.org/">Debian</a> sarge installation with <a href="http://httpd.apache.org/" rel="tag">Apache</a> 2. Some things, in particular Apache module related ones, will be different on other systems.<br />
The server used throughout the instructions is example.org/192.0.34.166. The server&#8217;s <code>DocumentRoot</code> is /blog and WordPress resides in /blog/wp. The value of WordPress&#8217; <code>home</code> option is &#8216;http://example.org&/#8217; and the value of its <code>site_url</code> option is &#8216;http://example.org/wp&#8217;.</p>
<ul>
<li>Prepare the SSL certificates:
<ul>
<li>Generate your own certificate authority (CA) if you don&#8217;t have one already (I&#8217;m using the makefile from <a href="http://sial.org/howto/openssl/ca/">OpenSSL Certificate Authority Setup</a> for managing mine) and import it into your browser.</li>
<li>Generate a certificate for the SSL server and certify it with your private CA.</li>
<li>Generate a certificate for your browser and certify it with your private CA. Most browsers expect a <abbr title="Public-Key Cryptography Standard">PKCS</abbr>#12 file, so generate one with
<pre>$ openssl pkcs12 -export -clcerts &#92;
    -in blogclient.cert &#92;
    -inkey blogclient.key &#92;
    -out blogclient.p12</pre>
<p>Then import <code>blogclient.p12</code> into your browser.</p>
</li>
</ul>
</li>
<li>Make WordPress SSL-ready:<br />
Apply this <a href="/static/wp/wp2-ssl.patch">patch</a> to the WordPress code. It makes the following changes:</p>
<ul>
<li>Use <em>secure</em> authentication cookies in <code>wp_setcookie()</code></li>
<li>Make <code>check_admin_referer()</code> work with HTTPS URLs</li>
<li>Use HTTPS URLs for notification mails</li>
<li>Use HTTPS URLS for redirects to <code>wp-login.php</code></li>
<li>Only allow XML-RPC logins from the local host (ie. the HTTPS proxy)</li>
<li>Add the <em>Mark-as-Spam</em> feature from trunk</li>
</ul>
<p>The patch is against <a href="http://subversion.tigris.org/">svn</a> version 3825 of WordPress (ie. WordPress 2.0.3), when you apply it to a newer version, you will likely get some harmless ‘<code>Hunk succeeded</code>’ message. If you are getting ‘<code>Hunk FAILED</code>’ message, just send me note and I&#8217;ll update the patch.</p>
</li>
<li>Enable the necessary Apache modules:
<ul>
<li>Install <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>.  It will be used to replace absolute &#8216;http://example.org&/#8217; HTTP URLs in the WordPress output with &#8216;https://example.org&/#8217; HTTPS URLs:
<pre>$ aptitude install libapache2-mod-proxy-html</pre>
<p>The module gets enabled automatically after installation.</p>
</li>
<li>Enable mod_proxy and mod_ssl
<pre>$ a2enmod proxy
$ a2enmod ssl</pre>
<p>Debian provides sane default configurations for both modules. You might want to take a look at the configuration files (<code>ssl.conf</code> and <code>proxy.conf</code>) nevertheless.<br />
I have changed <code>SSLCipherSuite</code> to</p>
<pre style="overflow:scroll;width:93%;">TLSv1:SSLv3:!SSLv2:!aNULL:!eNULL:!NULL:!EXP:!DES:!MEDIUM:!LOW:@STRENGTH</pre>
<p>in <code>ssl.conf</code> in order to just allow TLS v1 and SSL v3 ciphers which provide strong encryption and authentication (see <a href="http://www.openssl.org/docs/apps/ciphers.html">ciphers(1)</a>).</p>
</li>
<li>If you are compressing WordPress output (that is if you enabled the <em>&#8216;WordPress should compress articles (gzip) if browsers ask for them&#8217;</em> option) then also enable mod_headers:
<pre>$ a2enmod headers</pre>
</li>
</ul>
</li>
<li>Configure Apache to listen on the HTTPS port
<pre>$ cat &gt; /etc/apache2/conf.d/ssl.conf &lt;&lt; EOF
&lt;IfModule mod_ssl.c&gt;
	Listen 443
&lt;/IfModule&gt;
EOF</pre>
</li>
<li>Modify the blog virtual host to limit access to <code>wp-login.php</code> and <code>wp-admin</code> to the local host. Also completely deny access to files which should never be accessed directly. Here is an example: <a href="/static/wp/10-wp2-example.org"><code>10-wp2-example.org</code></a></li>
<li>Now setup the HTTPS virtual server: <a href="/static/wp/20-wp2-example.org-ssl"><code>20-wp2-example.org-ssl</code></a><br />
If you are compressing WordPress output you have to enable the <code>RequestHeader</code> line.
</li>
<li>Enable the site and restart Apache
<pre>$ a2ensite 20-blog-ssl
$ /etc/init.d/apache2 restart</pre>
</li>
<li>Remove the old WP cookies from your browser</li>
<li>Test the new setup!</li>
</ul>
<p><em><strong>February 1st, 2006:</strong> <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a> updated for WordPress <a href="http://wordpress.org/development/2006/01/201-release/">2.0.1</a></em></p>
<p><em><strong>March 11st, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/03/security-202/">2.0.2</a> has been released, fixing some security issues. The HTTPS patch still applies fine to that version.</em></p>
<p><em><strong>March 19th, 2006:</strong> Updated <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>. Changes: Fix bug in list-manipulation.php, use HTTPS for &#8216;Login&#8217; and &#8216;Register&#8217; links, backport &#8216;Mark-as-Spam&#8217; feature from trunk</em></p>
<p><em><strong>May 1st, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/06/wordpress-203/">2.0.3</a> has been released. Here is the updated <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</em></p>
<p><em><strong>July 29th, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/07/wordpress-204/">2.0.4</a> has been released, fixing some security issues. Here is an updated version of the <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</em></p>
<p><em><strong>January 12st, 2007:</strong> <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a> updated for 2.0.6 and 2.0.7-RC1</em></p>
<p><em><strong>January 15st, 2007:</strong> WordPress <a href="http://wordpress.org/development/2007/01/wordpress-207/">2.0.7</a> has been released. The patch still applies fine to that version.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/securing-wordpress-2-admin-access-with-ssl/feed/</wfw:commentRss>
			<slash:comments>32</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">43</post-id>	</item>
		<item>
		<title>Updated Logitech MX1000 Configuration</title>
		<link>/articles/updated-logitech-mx1000-configuration/</link>
					<comments>/articles/updated-logitech-mx1000-configuration/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 15 Jan 2006 08:07:55 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Mozilla]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2006/01/15/updated-logitech-mx1000-configuration/</guid>

					<description><![CDATA[XOrg 6.9 and later come with a new evdev driver. Configurations using the old evdev protocol hack no longer work. So here&#8217;s an updated version of my old MX1000 configuration: Build a udev rule to give the mouse device a static name: I&#8217;m using ACTION==&#34;add&#34;, &#92; KERNEL==&#34;event*&#34;, &#92; SUBSYSTEM==&#34;input&#34;, &#92; SYSFS{manufacturer}==&#34;Logitech&#34;, &#92; SYSFS{product}==&#34;USB Receiver&#34;, &#92;<br />[&#8594; <a href="/articles/updated-logitech-mx1000-configuration/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>XOrg 6.9 and later come with a new <em>evdev</em> driver. Configurations using the old <em>evdev</em> protocol hack no longer work. So here&#8217;s an updated version of my old MX1000 <a href="/2005/04/03/logitech-mx1000-configuration/">configuration</a>:</p>
<ul>
<li>Build a <a href="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html">udev </a> rule to give the mouse device a static name: I&#8217;m using
<pre>ACTION==&quot;add&quot;, &#92;
  KERNEL==&quot;event*&quot;, &#92;
  SUBSYSTEM==&quot;input&quot;, &#92;
  SYSFS{manufacturer}==&quot;Logitech&quot;, &#92;
  SYSFS{product}==&quot;USB Receiver&quot;, &#92;
  NAME=&quot;input/mx1000&quot;</pre>
<p> in <code>/etc/udev/rules.d/010_local.rules</code>.<br />
After restarting <code>udev</code> and replugging the mouse, you should see a device named <code>/dev/input/mx1000</code>.</p>
</li>
<li><code>/etc/X11/xorg.conf</code>:
<pre>Section &quot;InputDevice&quot;
 Identifier &quot;MX1000&quot;
 Driver     &quot;evdev&quot;
 Option     &quot;CorePointer&quot;
 Option     &quot;Device&quot;    &quot;/dev/input/mx1000&quot;
EndSection</pre>
</li>
<li><code>~/.xbindkeysrc</code>:<br />
(You have to install <code>xbindkeys</code> and <code>xvkbd</code> for this; I&#8217;m starting <code>xbindkeys</code> in <code>~/.gnomerc</code>)</p>
<pre># Backward and Forward buttons
&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Left]&quot;&quot;
  m:0x10 + b:8
&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Right]&quot;&quot;
  m:0x10 + b:9

# &quot;Cruise Control&quot; disabled:
#&quot;xvkbd -text &quot;&#92;[Page_Up]&quot;&quot;
#  m:0x10 + b:11
#&quot;xvkbd -text &quot;&#92;[Page_Down]&quot;&quot;
#  m:0x10 + b:12

# &quot;Cruise Control&quot; enabled:
# Work-around extra events
&quot;~/bin/click 4&quot;
 m:0x10 + b:11
&quot;~/bin/click 5&quot;
 m:0x10 + b:12

# Application-Switch button
# A-Tab doesn't work
# Use it as another Forward for now
&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Right]&quot;&quot;
  m:0x10 + b:10</pre>
<p>Using the <em>Application-Switch</em> button for switching windows in GNOME doesn&#8217;t work because it would require holding down the <em>Alt</em> key while pressing <em>Tab</em> several times, xvkbd can&#8217;t do that. I&#8217;m using the button as another <em>Forward</em> now, it&#8217;s easier to reach than the real <em>Forward</em> button.<br />
Defining actions for the <em>Cruise Control</em> buttons only makes sense when <em>Cruise Control</em> is disabled (you can disable it with <a href="http://www.bedroomlan.org/~alexios/coding_lmctl.html">lmctl</a> or the <a href="http://freshmeat.net/projects/logitech_applet/">Logitech Mouse Applet</a>). If it is disabled, the buttons generate 11 and 12.  When it is enabled, they generate a single button 11 or 12 event and then a series of button 4 or 5 events just like scrolling the wheel does.<br />
I have no idea why the mouse generates 11 or 12 before starting normal scrolling in <em>Cruise Control</em> mode. I&#8217;m mapping 11 and 12 to a little utility (<em><a href="http://www.ussg.iu.edu/hypermail/linux/kernel/0504.0/1371.html">click</a> </em> by Jeremy Nickurak) which replaces these bogus events with normal scroll events.</p>
</li>
<li>At this point the <em>Backward</em> and <em>Forward</em> buttons should work in GNOME, KDE, and <a href="http://www.mozilla.org/products/" rel="tag">Mozilla</a>-based browsers. Horizontal scrolling should work in GNOME and KDE.<br />
Mozilla-based browser like <a href="http://www.mozilla.org/products/firefox/" rel="tag">Firefox</a> need two additional changes to get horizontal scrolling working with the tilt wheel: Open <code>about:config</code> and set</p>
<pre>mousewheel.horizscroll.withnokey.action = 0
mousewheel.horizscroll.withnokey.sysnumlines = true</pre>
</li>
</ul>
<p><em><strong>January 18th, 2006:</strong> The evdev driver in XOrg 6.9 is broken on big-endian machines like powerpc. Here&#8217;s a <a href="/static/x11/evdev.patch">fix</a>.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/updated-logitech-mx1000-configuration/feed/</wfw:commentRss>
			<slash:comments>33</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">41</post-id>	</item>
		<item>
		<title>Debian Installer With Kernel 2.6.11</title>
		<link>/articles/debian-installer-with-kernel-2611/</link>
					<comments>/articles/debian-installer-with-kernel-2611/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 26 Jun 2005 09:43:04 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Kernel]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/06/26/debian-installer-with-kernel-2611/</guid>

					<description><![CDATA[As mentioned recently, Debian Sarge&#8217;s installer doesn&#8217;t work on my Dell Inspiron 9300. I like Debian but I think it&#8217;s a shame that the sarge installer was already outdated on the day of its release. The official sarge installer still uses a 2.4 kernel by default but includes a 2.6 kernel that can be used<br />[&#8594; <a href="/articles/debian-installer-with-kernel-2611/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>As <a href="/2005/06/06/the-sky-is-falling/">mentioned</a> recently, <a href="http://debian.org/">Debian</a> Sarge&#8217;s installer doesn&#8217;t work on my Dell Inspiron 9300. I like Debian but I think it&#8217;s a shame that the sarge installer was already outdated on the day of its release.</p>
<p>The official sarge installer still uses a 2.4 kernel by default but includes a 2.6 kernel that can be used by booting with &quot;<code>install26</code>&quot; or &quot;<code>expert26</code>&quot;.  But even that kernel, 2.6.8, is too old for the Inspiron 9300. It still doesn&#8217;t recognize the hard disk.</p>
<p>Ubuntu&#8217;s installer, which uses a 2.6.11 kernel, works fine on the machine. Although <a href="http://ubuntu.com/">Ubuntu</a> is a nice distribution, I like pure Debian better. Unfortunately I wasn&#8217;t able to find any 2.6.11 based Debian installer on the net, even a question on <a href="http://lists.debian.org/debian-boot/">debian-boot</a> yielded nothing.</p>
<p>Anyhow, I finally had the time to build one myself:<br />
<a href="/static/debian/debian-2.6.11-i386-businesscard.iso">debian-2.6.11-i386-businesscard.iso</a> (<a href="/static/debian/debian-2.6.11-i386-businesscard.iso.sign">GPG signature</a>)</p>
<p>The image is basically a sarge businesscard ISO with a 2.6.11 kernel from Debian testing instead of the original 2.6.8 kernel.</p>
<p>Unlike with Ubuntu, installation on the Inspiron 9300 still doesn&#8217;t work out of the box but with a few tricks I was able to install Debian sarge:</p>
<ul>
<li>Boot with <code>expert26</code></li>
<li>When the installer starts up, switch to the second console (Alt-F2) and enter these commands:
<pre>
~ # modprobe ide_generic
~ # modprobe ata_piix</pre>
<p>Without this the installer won&#8217;t find the CD-ROM.</p>
</li>
<li>If network configuration via DHCP fails, just retry &#8212; worked for me</li>
<li>When asked what version of Debian you would like to install, choose <em>stable</em>.  Installing <em>testing</em> or <em>unstable</em> directly doesn&#8217;t work.</li>
<li>It doesn&#8217;t matter which kernel you choose to install, we have to replace it with a 2.6.11 kernel later anyway</li>
<li>Just before the first reboot, that means right after the installer ejects the CD-ROM, switch back to console two. Now download and install the latest available Debian kernel. I&#8217;ve used <a href="/static/debian/kernel-image-2.6.11-1-686_2.6.11-7_i386.deb">2.6.11-1-686</a>:
<pre style="overflow:auto;width:100%;">~ # mount -t proc proc /target/proc
~ # chroot /target
sh-2.05b# cd /root
sh-2.05b# wget http://blog.blackdown.de/static/debian/kernel-image-2.6.11-1-686_2.6.11-7_i386.deb
sh-2.05b# dpkg -i kernel-image-2.6.11-1-686_2.6.11-7_i386.deb
&hellip;
sh-2.05b# exit
~ # umount /target/proc</pre>
</li>
<li>Reboot (using the kernel just installed) and complete the installation</li>
<li>Upgrade to <em>testing</em> or <em>unstable</em></li>
<li>Build a custom kernel (2.6.12 or newer). It&#8217;s probably a good idea to include some additional libata <a href="http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/">patches</a>. To get the DVD drive working you have to apply this <a href="/static/kernel/ata-atapi.patch">patch</a>.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>/articles/debian-installer-with-kernel-2611/feed/</wfw:commentRss>
			<slash:comments>22</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">35</post-id>	</item>
		<item>
		<title>Securing WordPress Admin Access With SSL</title>
		<link>/articles/securing-wordpress-admin-access-with-ssl/</link>
					<comments>/articles/securing-wordpress-admin-access-with-ssl/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 17 May 2005 23:11:24 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/05/18/securing-wordpress-admin-access-with-ssl/</guid>

					<description><![CDATA[January 22nd, 2006: There&#8217;s an updated version of this guide for WordPress 2 now: Securing WordPress 2 Admin Access With SSL As one can guess from the look of this site, I&#8217;m using WordPress as my blog engine. At this time WordPress does not support HTTPS access to the admin area when the rest of<br />[&#8594; <a href="/articles/securing-wordpress-admin-access-with-ssl/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p><em><strong>January 22nd, 2006:</strong> There&#8217;s an updated version of this guide for WordPress 2 now: <a href="/2006/01/22/securing-wordpress-2-admin-access-with-ssl/">Securing WordPress 2 Admin Access With SSL</a></em></p>
<p>As one can guess from the look of this site, I&#8217;m using <a href="http://wordpress.org/" rel="tag">WordPress</a> as my blog engine. At this time WordPress does not support HTTPS access to the admin area when the rest of the blog is served via normal HTTP. This is a bit unfortunate. I do not like logging in to my server over unencrypted connections, especially not when using public WLANs. Getting around this WordPress limitation requires quite a few steps:</p>
<h3>The Goal</h3>
<p>All communication involving passwords or authentication cookies should be done over HTTPS connections. <code>wp-login.php</code> and the <code>wp-admin</code> directory should only be accessible over HTTPS.<br />
Normal reading access, as well as comments, tracebacks, and pingbacks still should go over ordinary HTTP.</p>
<h3>The Plan</h3>
<ul>
<li>Add an HTTPS virtual host that forwards requests to the HTTP virtual host</li>
<li>Modify WordPress to send <em>secure</em> authentication cookies, so cookies never get sent over insecure connections accidentally</li>
<li>Require a valid certificate on HTTPS clients. That means to log in to WordPress you need both a valid certificate and a valid password.  If someone manages to get your password, he still can not login because he does not have a valid certificate.</li>
</ul>
<h3>The Implementation</h3>
<p>Note: This documentation assumes a <a href="http://www.debian.org/">Debian</a> sarge installation with <a href="http://httpd.apache.org/" rel="tag">Apache</a> 2. Some things, in particular Apache module related ones, will be different on other systems.<br />
The server used throughout the instructions is example.org/192.0.34.166. The server&#8217;s <code>DocumentRoot</code> is /blog and WordPress resides in /blog/wp. The value of WordPress&#8217; <code>home</code> option is &#8216;http://example.org&/#8217; and the value of its <code>site_url</code> option is &#8216;http://example.org/wp&#8217;.</p>
<ul>
<li>Prepare the SSL certificates:
<ul>
<li>Generate your own certificate authority (CA) if you don&#8217;t have one already (I&#8217;m using the makefile from <a href="http://sial.org/howto/openssl/ca/">OpenSSL Certificate Authority Setup</a> for managing mine) and import it into your browser.</li>
<li>Generate a certificate for the SSL server and certify it with your private CA.</li>
<li>Generate a certificate for your browser and certify it with your private CA. Most browsers expect a <abbr title="Public-Key Cryptography Standard">PKCS</abbr>#12 file, so generate one with
<pre>$ openssl pkcs12 -export -clcerts &#92;
    -in blogclient.cert &#92;
    -inkey blogclient.key &#92;
    -out blogclient.p12</pre>
<p> Then import <code>blogclient.p12</code> into your browser.</p>
</li>
</ul>
</li>
<li>Make WordPress SSL-ready:<br />
Apply this <a href="/static/wp/wp-ssl.patch">patch</a> to the WordPress code. It makes the following changes:</p>
<ul>
<li>Use <em>secure</em> authentication cookies in <code>wp_setcookie()</code></li>
<li>Make <code>check_admin_referer()</code> working with HTTPS URLs</li>
<li>Disable login over XML-RPC</li>
</ul>
</li>
<li>Enable the necessary Apache modules:
<ul>
<li>Install <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>.  It will be used to replace absolute &#8216;http://example.org&/#8217; HTTP URLs in the WordPress output with &#8216;https://example.org&/#8217; HTTPS URLs:
<pre>$ aptitude install libapache2-mod-proxy-html</pre>
<p>The module gets enabled automatically after installation.</p>
</li>
<li>Enable mod_proxy and mod_ssl
<pre>$ a2enmod proxy
$ a2enmod ssl</pre>
<p>Debian provides sane default configurations for both modules. You might want to take a look at the configuration files (<code>ssl.conf</code> and <code>proxy.conf</code>) nevertheless.</p>
</li>
<li>If you are compressing WordPress output (that is if you enabled the <em>&#8216;WordPress should compress articles (gzip) if browsers ask for them&#8217;</em> option) then also enable mod_headers:
<pre>$ a2enmod headers</pre>
</li>
</ul>
</li>
<li>Configure Apache to listen on the HTTPS port
<pre>$ cat &gt; /etc/apache2/conf.d/ssl.conf &lt;&lt; EOF
&lt;IfModule mod_ssl.c&gt;
	Listen 443
&lt;/IfModule&gt;
EOF</pre>
</li>
<li>Modify the blog virtual host to limit access to <code>wp-login.php</code> and <code>wp-admin</code> to the local host. Also completely deny access to files which should never be accessed directly. Here is an example: <a href="/static/wp/10-example.org"><code>10-example.org</code></a></li>
<li>Now setup the HTTPS virtual server: <a href="/static/wp/20-example.org-ssl"><code>20-example.org-ssl</code></a><br />
If you are compressing WordPress output you have to enable the <code>RequestHeader</code> line.
</li>
<li>Enable the site and restart Apache
<pre>$ a2ensite 20-blog-ssl
$ /etc/init.d/apache2 restart</pre>
</li>
<li>Remove the old WP cookies from your browser</li>
<li>Test the new setup!</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>/articles/securing-wordpress-admin-access-with-ssl/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">28</post-id>	</item>
		<item>
		<title>Logitech MX1000 Configuration</title>
		<link>/articles/logitech-mx1000-configuration/</link>
					<comments>/articles/logitech-mx1000-configuration/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 03 Apr 2005 15:28:39 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mozilla]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/04/03/logitech-mx1000-configuration/</guid>

					<description><![CDATA[I&#8217;ve had to buy a new mouse, this time I got me a Logitech MX1000 (my first Logitech mouse ever). The Microsoft IntelliMouse Explorer I&#8217;ve used on my G5 got broken, it lost about two out of ten of clicks on the left button. I&#8217;m not completely satisfied with the MX1000. It&#8217;s too heavy and<br />[&#8594; <a href="/articles/logitech-mx1000-configuration/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve had to buy a new mouse, this time I got me a Logitech MX1000 (my first Logitech mouse ever). The Microsoft IntelliMouse Explorer I&#8217;ve used on my G5 got broken, it lost about two out of ten of clicks on the left button.</p>
<p>I&#8217;m not completely satisfied with the MX1000. It&#8217;s too heavy and a bit too small for my hands. The notable exception is the <em>Forward</em> button, it&#8217;s too far away from my thumb. I&#8217;ve had the last problem with the IntelliMouse Explorer too. I still have a few IntelliMouse Optical on other machines, I really like that mouse. Perfect Size, good wheel, easily reachable side buttons.  The only drawback is the annoying big red light.</p>
<p>Anyhow, back to the MX1000. Only a few changes to my <a href="/2005/03/01/tilt-wheel-mouse/">configuration</a> for the IntelliMouse Explorer where needed to get it working. Here&#8217;s my new configuration:</p>
<ul>
<li><code>/etc/X11/XF86Config-4 </code> or <code>/etc/X11/xorg.conf</code>:
<pre>Section &quot;InputDevice&quot;
 Identifier &quot;MX1000&quot;
 Driver     &quot;mouse&quot;
 Option     &quot;CorePointer&quot;
 Option     &quot;Protocol&quot;        &quot;evdev&quot;
 Option     &quot;Dev Name&quot;        &quot;Logitech USB Receiver&quot;
 Option     &quot;Buttons&quot;         &quot;12&quot;
 Option     &quot;ZAxisMapping&quot;    &quot;11 12 10 9&quot;
 Option     &quot;Resolution&quot;      &quot;800&quot;
 Option     &quot;Emulate3Buttons&quot; &quot;false&quot;
EndSection</pre>
</li>
<li><code>/etc/X11/Xmodmap</code>:
<pre>! MX1000
pointer = 1 2 3 8 9 10 11 12 6 7 4 5</pre>
<p>This gets the buttons in right order: Scrolling the wheel generates 4 and 5, tilting the wheel 6 and 7.</p>
</li>
<li><code>~/.xbindkeysrc</code>:<br />
(You have to install <code>xbindkeys</code> and <code>xvkbd</code> for this; I&#8217;m starting <code>xbindkeys</code> in <code>~/.gnomerc</code>)</p>
<pre># Backward and Forward buttons
&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Left]&quot;&quot;
  m:0x10 + b:8
&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Right]&quot;&quot;
  m:0x10 + b:9

# &quot;Cruise Control&quot; disabled:
#&quot;xvkbd -text &quot;&#92;[Page_Up]&quot;&quot;
#  m:0x10 + b:11
#&quot;xvkbd -text &quot;&#92;[Page_Down]&quot;&quot;
#  m:0x10 + b:12

# &quot;Cruise Control&quot; enabled:
# Only use this if you have problems with Mozilla
#&quot;NoCommand&quot;
#  m:0x10 + b:11
#&quot;NoCommand&quot;
#  m:0x10 + b:12

# Application-Switch button
# A-Tab doesn't work
# Use it as another Forward for now
&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Right]&quot;&quot;
  m:0x10 + b:10</pre>
<p>Using the <em>Application-Switch</em> button for switching windows in GNOME doesn&#8217;t work because it would require holding down the <em>Alt</em> key while pressing <em>Tab</em> several times, xvkbd can&#8217;t do that. I&#8217;m using the button as another <em>Forward</em> now, it&#8217;s easier to reach than the real <em>Forward</em> button.<br />
Defining actions for the <em>Cruise Control</em> buttons only makes sense when <em>Cruise Control</em> is disabled (you can disable it with the <a href="http://freshmeat.net/projects/logitech_applet/">Logitech Mouse Applet</a>). If it is disabled, the buttons generate 11 and 12.  When it is enabled, they generate a single button 11 or 12 event and then a series of button 4 or 5 events just like scrolling the wheel does.<br />
I have no idea why the mouse generates 11 or 12 before starting normal scrolling in <em>Cruise Control</em> mode. I&#8217;m mapping 11 and 12 to &#8220;NoCommand&#8221;, this eliminates the ButtonPress but not the ButtonRelease event. This seems to eliminate the negative effects of the extra button events in Mozilla. (Mozilla interprets the 11 and 12 events as normal left clicks, Firefox doesn&#8217;t have this issue. So if you&#8217;re using Firefox or if you don&#8217;t see the left-click problem with your Mozilla build, then don&#8217;t bind 11 and 12 to anything.)</p>
</li>
<li>At this point the <em>Backward</em> and <em>Forward</em> buttons should work in GNOME, KDE, and <a href="http://www.mozilla.org/products/" rel="tag">Mozilla</a>-based browsers. Horizontal scrolling should work in GNOME and KDE.<br />
Mozilla-based browser like <a href="http://www.mozilla.org/products/firefox/" rel="tag">Firefox</a> need two additional changes to get horizontal scrolling working with the tilt wheel: Open <code>about:config</code> and set</p>
<pre>mousewheel.horizscroll.withnokey.action = 0
mousewheel.horizscroll.withnokey.sysnumlines = true</pre>
</li>
</ul>
<p><em><strong>April 5th, 2005:</strong> Update: Don&#8217;t bind 11/12 to anything in Cruise Control mode by default (only needed if there are problems with Mozilla). Fixed the &quot;Cruise Control&quot; comments in ~/.xbindkeysrc.</em></p>
<p><em><strong>January 15th, 2006:</strong> Xorg 6.9 and later come with a different <em>evdev</em> driver. I&#8217;ve made an <a href="/2006/01/15/updated-logitech-mx1000-configuration/">updated version</a> of this guide now.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/logitech-mx1000-configuration/feed/</wfw:commentRss>
			<slash:comments>24</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">21</post-id>	</item>
		<item>
		<title>cyrus_sasl patch for Exim 4</title>
		<link>/articles/cyrus_sasl-patch-for-exim-4/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 22 Mar 2005 00:11:32 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/22/cyrus_sasl-patch-for-exim-4/</guid>

					<description><![CDATA[The Exim 4 source code supports authentication with SASL since version 4.43. Debian started enabling this feature in exim4_4.50-2. After I&#8217;ve had upgraded to that version and replaced my saslauthd authenticators with brand-new cyrus_sasl authenticators, I&#8217;ve noticed that auth.log got flooded with entries like &#8216;exim4: OTP unavailable because can't read/write key database /etc/opiekeys: No such<br />[&#8594; <a href="/articles/cyrus_sasl-patch-for-exim-4/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>The <a href="http://www.exim.org/">Exim 4</a> source code supports authentication with <a href="http://asg.web.cmu.edu/sasl/"><acronym title="Simple Authentication and Security Layer">SASL</acronym></a> since version 4.43. <a href="http://www.debian.org/">Debian</a> started enabling this feature in exim4_4.50-2. After I&#8217;ve had upgraded to that version and replaced my <em>saslauthd</em> authenticators with brand-new <em>cyrus_sasl</em> authenticators, I&#8217;ve noticed that <code>auth.log</code> got flooded with entries like &#8216;<code>exim4: OTP unavailable because can't read/write key database /etc/opiekeys: No such file or directory</code>.&#8217;</p>
<p>My exim configuration uses three different <em>cyrus_sasl</em> authenticators and each exim invocation resulted in three of these <abbr title="One-Time-Password">OTP</abbr> warnings because exim calls <code>sasl_listmech()</code> for each configured authenticator. It doesn&#8217;t specify a limiting <code>mech_list</code>, that means SASL will test which of all installed mechs actually can be used for authentication. Debian&#8217;s SASL package includes <code>libotp.so</code>, so it also tries to use OTP which is not configured on my system.</p>
<p>There are two ways to get rid off the warnings:</p>
<ul>
<li>Remove <code>/usr/lib/sasl2/libotp.*</code>. You&#8217;ll have to do this after each upgrade of the libsasl2-modules package.</li>
<li>Rebuild exim with this <a href="/static/exim/71_cyrus_sasl.dpatch">patch</a>. The patch specifies a limiting <code>mech_list</code> option for SASL.  This limits <code>sasl_listmech()</code> to the mechs used in the exim configuration. Other mechs won&#8217;t be tried anymore.</li>
</ul>
<p><em><strong>May 3rd, 2005:</strong> A slightly modified version of the patch has been integrated into Exim CVS and will be included in the next Debian release of exim4 (see Debian bug <a href="http://bugs.debian.org/299743">#299743</a>)</em></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">19</post-id>	</item>
		<item>
		<title>Updated MySQL Chroot Script</title>
		<link>/articles/updated-mysql-chroot-script/</link>
					<comments>/articles/updated-mysql-chroot-script/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 13 Mar 2005 03:12:17 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/13/updated-mysql-chroot-script/</guid>

					<description><![CDATA[Debian&#8217;s latest MySQL packages are compiled with --with-mysqld-ldflags = -all-static. That means libc.so.6 is linked statically now. But glibc&#8217;s getpwnam and getpwuid implementations still need the shared libraries. The needed libraries must be copied into the chroot because mysqld calls those functions after calling chroot. I&#8217;ve updated the mysql-chroot script accordingly. (The rest of the<br />[&#8594; <a href="/articles/updated-mysql-chroot-script/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.debian.org/">Debian&#8217;s</a> latest <a href="http://dev.mysql.com/">MySQL</a> packages are compiled with <code>--with-mysqld-ldflags = -all-static</code>.</p>
<p>That means <code>libc.so.6</code> is linked statically now. But glibc&#8217;s <code>getpwnam</code> and <code>getpwuid</code> implementations still need the shared libraries. The needed libraries must be copied into the chroot because <code>mysqld</code> calls those functions after calling <code>chroot</code>. I&#8217;ve updated the <code><a href="/static/mysql-chroot">mysql-chroot</a></code> script accordingly.<br />
<em>(The rest of the chroot setup procedure still works as described in <a href="/2005/03/04/chrooting-mysql-on-debian/">Chrooting MySQL on Debian</a>.)</em></p>
<p>By the way, I&#8217;ve filed a wishlist bug at Debian&#8217;s BTS (<a href="http://bugs.debian.org/299265">#299265</a>). <code>mysqld</code> should do all <code>/etc/passwd</code> lookups before calling <code>chroot</code>. That way chrooting would work without <code>$CHROOT/etc/passwd</code> and with copying any libraries into the chroot. That&#8217;s how Apache and Bind 9 do it.</p>
<p><em><strong>March 17th, 2005:</strong> Debian has removed the <code>-all-static</code> flag again. I&#8217;m leaving the additional bits in the chroot script however, just in case the maintainers decide to add the flag again.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/updated-mysql-chroot-script/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">12</post-id>	</item>
		<item>
		<title>PHP Error Logging to syslog from a chroot</title>
		<link>/articles/php-error-logging-to-syslog-from-a-chroot/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Mon, 07 Mar 2005 06:48:34 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/php-error-logging-to-syslog-from-a-chroot/</guid>

					<description><![CDATA[Here&#8217;s a little trick to log PHP errors to syslog from an apache chroot. Instead of creating a $CHROOT/dev/log socket in the chroot and configuring syslog to listen on that, just define a bogus virtual host that logs to syslog. &#60;VirtualHost 127.0.0.2:80&#62; ServerName JustForOpeningSyslog Redirect permanent / http://127.0.0.1/ ErrorLog syslog &#60;/VirtualHost&#62; Now apache calls openlog(3)<br />[&#8594; <a href="/articles/php-error-logging-to-syslog-from-a-chroot/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Here&#8217;s a little trick to log <a href="http://www.php.net/">PHP</a> errors to syslog from an <a href="http://httpd.apache.org/">apache</a> chroot. Instead of creating a <code>$CHROOT/dev/log</code> socket in the chroot and configuring syslog to listen on that, just define a bogus virtual host that logs to syslog.</p>
<pre>
&lt;VirtualHost 127.0.0.2:80&gt;
        ServerName JustForOpeningSyslog
        Redirect permanent / http://127.0.0.1/
        ErrorLog syslog
&lt;/VirtualHost&gt;</pre>
<p>Now apache calls <code>openlog(3)</code> with <code>LOG_NDELAY</code> before being chrooted by libapache2-mod-chroot, and libapache2-mod-php4&#8217;s <code>syslog(3)</code> calls work just fine.<br />
(Idea stolen from <a href="http://cryptio.net/~ferlatte/blog/2004/10/01/#syslog_and_chroot">syslog(3) and chroot(2)</a>.)</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8</post-id>	</item>
		<item>
		<title>Chrooting MySQL on Debian</title>
		<link>/articles/chrooting-mysql-on-debian/</link>
					<comments>/articles/chrooting-mysql-on-debian/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 04 Mar 2005 22:46:45 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/chrooting-mysql-on-debian/</guid>

					<description><![CDATA[It&#8217;s quite easy to chroot bind9 and apache on Debian. (See this page for bind9 and libapache2-mod-chroot or libapache2-mod-security for apache.) But I&#8217;ve found no guide for chrooting MySQL, so here&#8217;s my short recipe: Prepare the chroot directory. It&#8217;s recommended to use an extra partition/filesystem for it. I will use /srv/mysql (which is an LVM2<br />[&#8594; <a href="/articles/chrooting-mysql-on-debian/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>It&#8217;s quite easy to chroot <a href="http://www.isc.org/sw/bind/">bind9</a> and <a href="http://httpd.apache.org/">apache</a> on <a href="http://www.debian.org/">Debian</a>.  (See <a href="http://cryptio.net/~ferlatte/blog/config/bind9/">this page</a> for bind9 and <a href="http://packages.debian.org/libapache2-mod-chroot">libapache2-mod-chroot</a> or <a href="http://packages.debian.org/libapache2-mod-security">libapache2-mod-security</a> for apache.)</p>
<p>But I&#8217;ve found no guide for chrooting <a href="http://dev.mysql.com/">MySQL</a>, so here&#8217;s my short recipe:</p>
<ul>
<li>Prepare the chroot directory. It&#8217;s recommended to use an extra partition/filesystem for it. I will use <code>/srv/mysql</code> (which is an <a href ="http://sourceware.org/lvm2/">LVM2</a> partition with an ext3 filesystem on my system) for the rest of the text.</li>
<li>Stop MySQL:
<pre>/etc/init.d/mysql stop</pre>
</li>
<li>Copy the databases to new location:
<pre>mkdir -p /srv/mysql/var/lib
cp -a /var/lib/mysql /srv/mysql/var/lib</pre>
</li>
<li>Copy <a href="/static/mysql-chroot">this script</a> to <code>/etc/default/mysql-chroot</code></li>
<li>Edit <code>/etc/init.d/mysql</code>:
<ul>
<li>Source the <code><a href="/static/mysql-chroot">mysql-chroot</a></code> script somewhere at the top:
<pre>&hellip;
test -x /usr/sbin/mysqld || exit 0

<strong>. /etc/default/mysql-chroot</strong>

SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
&hellip;</pre>
</li>
<li>Run <code>setup_chroot</code> right in the start section:
<pre>&hellip;
if mysqld_status check_alive nowarn; then
  echo &quot;...already running.&quot;
else
<strong>  setup_chroot</strong>
  /usr/bin/mysqld_safe &gt; /dev/null 2&gt;&amp;1 &amp;
&hellip;</pre>
</li>
<li>Somehow <code>/var/run/mysqld/mysqld.pid</code> disappears after each start.  We have to create it each time, otherwise the <code>stop</code> command won&#8217;t work properly:
<pre>&hellip;
if mysqld_status check_alive warn; then
  echo &quot;.&quot;
<strong>  ln -sf $CHROOT_DIR/var/run/mysqld/mysqld.pid \
                 /var/run/mysqld</strong>
  # Now start mysqlcheck or whatever the admin wants.
  /etc/mysql/debian-start
&hellip;</pre>
</li>
</ul>
</li>
<li>In <code>/etc/mysql/debian.cnf</code>, change the <code>socket</code> line to:
<pre>socket = /srv/mysql/var/run/mysqld/mysqld.sock</pre>
</li>
<li>In <code>/etc/mysql/my.cnf</code>:
<ul>
<li>Change the <code>socket</code> line in the <code>[client]</code> section to:
<pre>socket = /srv/mysql/var/run/mysqld/mysqld.sock</pre>
<p>Don&#8217;t change the <code>socket</code> lines in the other sections!</p>
</li>
<li>Add
<pre>chroot = /srv/mysql</pre>
<p> to the <code>[mysqld]</code> section.</p>
</li>
</ul>
</li>
<li>Prepend <code>/srv/mysql</code> to the log files listed in <code>/etc/logrotate.d/mysql-server</code></li>
<li>Start MySQL:
<pre>/etc/init.d/mysql start</pre>
</li>
<li>Check <code>/var/log/syslog</code> for errors ;-)</li>
</ul>
<p><em><strong>March 13th, 2005:</strong> I&#8217;ve updated the script for newer Debian packages, see <a href="/2005/03/13/updated-mysql-chroot-script/">Updated MySQL Chroot Script</a> for more information.</em></p>
<p><em><strong>July 30th, 2006:</strong> These modifications still work fine on the current stable Debian release (3.1, &#8220;sarge&#8221;).  The mysql packages in the testing (&#8220;etch&#8221;) and unstable (&#8220;sid&#8221;) distributions of Debian need a few additional changes, I&#8217;ll post an updated guide in a few days.</em></p>
<p><em><strong>December 30th, 2006:</strong> I&#8217;ve made an <a href="/2006/12/30/chrooting-recent-mysql-versions-on-debian-and-ubuntu/">updated guide</a> on how to chroot more recent MySQL packages on Debian and Ubuntu</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/chrooting-mysql-on-debian/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7</post-id>	</item>
		<item>
		<title>Tilt Wheel Mouse</title>
		<link>/articles/tilt-wheel-mouse/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 01 Mar 2005 16:41:35 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mozilla]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/tilt-wheel-mouse/</guid>

					<description><![CDATA[Now that I finally got the kernel&#8217;s evdev driver running on my machine, I managed to get my tilt-wheel mouse working. Mouse section from /etc/X11/XF86Config-4: Section &#34;InputDevice&#34; Identifier &#34;Configured Mouse&#34; Driver &#34;mouse&#34; Option &#34;CorePointer&#34; Option &#34;Protocol&#34; &#34;evdev&#34; Option &#34;Dev Name&#34; &#34;*Microsoft IntelliMouse*&#34; Option &#34;Buttons&#34; &#34;9&#34; Option &#34;ZAxisMapping&#34; &#34;8 9 6 7&#34; Option &#34;Emulate3Buttons&#34; &#34;false&#34; EndSection<br />[&#8594; <a href="/articles/tilt-wheel-mouse/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Now that I finally got the kernel&#8217;s <a href="/2005/02/28/32-bit-compat-evdev-driver/">evdev</a> driver running on my machine, I managed to get my tilt-wheel mouse working.</p>
<ul>
<li>
	Mouse section from <code>/etc/X11/XF86Config-4</code>:</p>
<pre>
Section &quot;InputDevice&quot;
  Identifier &quot;Configured Mouse&quot;
  Driver     &quot;mouse&quot;
  Option     &quot;CorePointer&quot;
  Option     &quot;Protocol&quot;        &quot;evdev&quot;
  Option     &quot;Dev Name&quot;        &quot;*Microsoft IntelliMouse*&quot;
  Option     &quot;Buttons&quot;         &quot;9&quot;
  Option     &quot;ZAxisMapping&quot;    &quot;8 9 6 7&quot;
  Option     &quot;Emulate3Buttons&quot; &quot;false&quot;
EndSection</pre>
</li>
<li>
	To get the buttons in the correct order for X11, change <code>/etc/X11/Xmodmap</code> to:</p>
<pre>pointer = 1 2 3 8 9 7 6 4 5</pre>
<p>Now horizontal scrolling should work with GNOME!</p>
</li>
<li>
	In <a href="http://www.mozilla.org/">Mozilla</a>-based browsers however, tilting the wheel moves back- or forward in the history now. To fix this open <code>about:config</code> and set <code>mousewheel.horizscroll.withnokey.action</code> to <code>0</code>.<br /> Unfortunately Mozilla and GNOME seem to have different interpretations of <em>left</em> and	<em>right</em>; set <code>mousewheel.horizscroll.withnokey.sysnumlines</code> to <code>true</code> to fix that.</li>
<li>
	To get the sides buttons going back- and forward in history again, install <code>xbindkeys</code> and <code>xvkbd</code>. Bind the buttons to <code>Alt-Left</code> and <code>Alt-Right</code> in <code>~/.xbindkeysrc</code>:</p>
<pre>&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Left]&quot;&quot;
  m:0x10 + b:8
&quot;xvkbd -text &quot;&#92;[Alt_L]&#92;[Right]&quot;&quot;
  m:0x10 + b:9</pre>
<p>and run <code>xbindkeys</code> in <code>~/.gnomerc</code></p>
</li>
</ul>
<p><em><strong>January 15th, 2006:</strong> Xorg 6.9 and later come with a different <em>evdev</em> driver. I&#8217;ve made a new <a href="/2006/01/15/updated-logitech-mx1000-configuration/">guide</a> now. The new guide talks about the Logitech MX1000 but it&#8217;s quite easy to adapt the configuartion for other mice.</em></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6</post-id>	</item>
		<item>
		<title>Exim 4 and Dynamic IP-Addresses</title>
		<link>/articles/exim-4-and-dynamic-ip-addresses/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sat, 26 Feb 2005 11:38:29 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/03/08/exim-4-and-dynamic-ip-addresses/</guid>

					<description><![CDATA[I&#8217;ve recently changed my network connection at home to a provider which assigns dynamic addresses. Exim always provided a broken HELO/EHLO name to my smarthost since then because my externally visible hostname changes each time I connect. I&#8217;m now using Exim&#8217;s Perl interface to lookup the assigned hostname when connecting my smarthost: /etc/exim4/exim.pl: Don&#8217;t forget<br />[&#8594; <a href="/articles/exim-4-and-dynamic-ip-addresses/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve recently changed my network connection at home to a provider which assigns dynamic addresses. <a href="http://www.exim.org/">Exim</a> always provided a broken HELO/EHLO name to my smarthost since then because my externally visible hostname changes each time I connect. I&#8217;m now using Exim&#8217;s Perl interface to lookup the assigned hostname when connecting my smarthost:</p>
<ul>
<li><code>/etc/exim4/exim.pl</code>:<br />
<em>Don&#8217;t forget to change <code>ppp0</code> to the interface you want to handle!</em></p>
<pre>
#! /usr/bin/perl

# Requires libio-interface-perl

use strict;
use IO::Socket;
use IO::Interface;

sub get_remote_helo_data()
{
    my $s = IO::Socket::INET-&gt;new(Proto =&gt; 'udp');
    my $addr = inet_aton($s-&gt;if_addr('ppp0'));
    my $hostname = gethostbyaddr($addr, AF_INET);

    $hostname = '' if (!$hostname);

    return $hostname;
}
</pre>
</li>
<li><code>/etc/exim4/conf.d/main/50_exim4-localconfig_perl</code>:
<pre>
#main/50_exim4-localconfig_perl
perl_at_start = true
perl_startup = do '/etc/exim4/exim.pl'
</pre>
</li>
<li>Add the following code to the appropriate transport, e.g. <code>remote_smtp_smarthost</code>:
<pre>
helo_data = \
  ${if &gt;{${strlen:${perl{get_remote_helo_data}}}}{0} \
                 {${perl{get_remote_helo_data}}} \
                 {$primary_hostname}}
</pre>
</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4</post-id>	</item>
	</channel>
</rss>
