<?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>Nicolas Kuttler &#187; server</title>
	<atom:link href="http://www.nkuttler.de/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nkuttler.de</link>
	<description>WordPress Services, IT Services</description>
	<lastBuildDate>Wed, 28 Jul 2010 23:49:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using any Debian box as a wireless access point</title>
		<link>http://www.nkuttler.de/2009/02/25/using-any-debian-box-as-wireless-access-point/</link>
		<comments>http://www.nkuttler.de/2009/02/25/using-any-debian-box-as-wireless-access-point/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 14:02:45 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[wlan]]></category>

		<guid isPermaLink="false">http://www.nkuttler.de//?p=664</guid>
		<description><![CDATA[I just lost an hour trying to configure a Thinkpad T41 as a wireless access point. Most of that time was due to problems with the built-in wlan interface and a kernel recompile to use a prism54-based PCMCIA card. This is mostly a post to remind myself what to do, and how to do it [...]]]></description>
			<content:encoded><![CDATA[<p>I just lost an hour trying to configure a Thinkpad T41 as a wireless access point. Most of that time was due to problems with the built-in wlan interface and a kernel recompile to use a  prism54-based PCMCIA card. This is mostly a post to remind myself what to do, and how to do it on Debian. It&#8217;s not the first time I create an access point, but I do it so infrequently that I always forget something.<span id="more-664"></span></p>
<a name="wptoc_0_0_0"></a><h2>The NIC</h2>
<p>Make sure there&#8217;s a Linux driver for your network interface card. Make sure the card can be run in <tt>master</tt> mode.</p>
<a name="wptoc_0_0_1"></a><h2>DHCP</h2>
<p>The boxes that will connect need an IP. Install <tt>dhcp3-server</tt> and do something like this in <tt>/etc/dhcp3/dhcpd.conf</tt>:</p>
<pre>
[...]
option domain-name "192.168.6.0";
option domain-name-servers 192.168.6.1;
[...]
subnet 192.168.6.0 netmask 255.255.255.0 {
  range 192.168.6.10 192.168.6.15;
  option routers 192.168.6.1;
}
[...]
</pre>
<a name="wptoc_0_0_2"></a><h2>Configure the network</h2>
<p>Configure the interface so that it can be started with <tt>ifup</tt>. Usually you want the connected boxes to have access to whatever internet connection the access point has, so I enable forwarding and masquerading in <tt>/etc/network/interfaces</tt>:</p>
<pre>
iface eth1 inet static
    address 192.168.6.1
    netmask 255.255.255.0
    network 192.168.6.0
    wireless-mode master
    wireless-essid debianftw
    wireless-key1 s:12345
    post-up /bin/echo 1 &gt; /proc/sys/net/ipv4/ip_forward
    post-up /sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    post-up /etc/init.d/dhcp3-server restart
</pre>
<p><tt>13245</tt> is the WEP password and the network will be called <tt>debianftw</tt>.</p>
<a name="wptoc_0_0_3"></a><h2>Optional: DNS</h2>
<p>You may want to have name servers for the connected boxes. A quick solution is to take those from your <tt>/etc/resolv.conf</tt> and to put them in your <tt>/etc/dhcp3/dhcpd.conf</tt>. There are other solutions, like a caching only DNS server.</p>
<a name="wptoc_0_0_4"></a><h2>Security</h2>
<p>WEP isn&#8217;t a very good encryption but it&#8217;s enough for me. You probably don&#8217;t want to run this setup for a long time, it&#8217;s really just some notes to get me started quickly. Maybe I&#8217;ll add more about security in an update.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2009/02/25/using-any-debian-box-as-wireless-access-point/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Redirecting all subdomains to the main domain</title>
		<link>http://www.nkuttler.de/2009/01/11/redirecting-all-subdomains-to-the-main-domain/</link>
		<comments>http://www.nkuttler.de/2009/01/11/redirecting-all-subdomains-to-the-main-domain/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 14:29:30 +0000</pubDate>
		<dc:creator>nicolas</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[duplicate content]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[virtual hosts]]></category>

		<guid isPermaLink="false">http://www.nkuttler.de//?p=313</guid>
		<description><![CDATA[How to redirect a subdomain to the main domain, or a domain to a subdomain. Redirect domain.com to www.domain.com.]]></description>
			<content:encoded><![CDATA[<p>Using the canonical hostname for websites isn&#8217;t an obvious problem. After all, who really cares if your site is accessible at <tt>www.domain.com</tt> and <tt>domain.com</tt>? Search engines, for example, could penalize you for having the same content on both domains. I think that today they are smart enough to discover this specific case though.<span id="more-313"></span></p>
<p>Another problem can happen when you use cookies. If not done correctly, your user&#8217;s cookie won&#8217;t be available to the website when they were stored under <tt>www.domain.com</tt> and he uses <tt>domain.com</tt> the next time he visits. See the <a href="http://cgi.netscape.com/newsref/std/cookie_spec.html">cookie specs</a> for more details.</p>
<p>A quick research led me to a solution for apache that I didn&#8217;t like too much. It involves using <tt>mod_rewrite</tt>. <tt>mod_rewrite</tt> is a great tool, but there&#8217;s a better solution for redirecting to your main domain from subdomains or second level domains. Simply use a catchall virtual host in your apache host configuration file(s) to do the redirects. This will solve all the SEO, caching and cookie issues, and it will save some CPU cycles compared to the <tt>mod_rewrite</tt> or higher level solutions.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># NameVirtualHost *:80</span>
&nbsp;
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
    <span style="color: #00007f;">ServerName</span> www.domain.com
    <span style="color: #adadad; font-style: italic;"># This is your main domain</span>
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;
&nbsp;
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
    <span style="color: #00007f;">ServerName</span> domain.com
    <span style="color: #00007f;">ServerAlias</span> *.domain.com
    <span style="color: #adadad; font-style: italic;"># This is to make sure that foo.domain.com gets redirected too</span>
    <span style="color: #adadad; font-style: italic;"># If you want to use more virtual hosts on subdomains,</span>
    <span style="color: #adadad; font-style: italic;"># just define them earlier</span>
    <span style="color: #00007f;">Redirect</span> / http://www.domain.com/
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>Please refer to the <a href="http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect">mod alias docs</a> to decide which <tt>Redirect</tt> you need, this example uses a 302.</p>
<p>For lighttpd you can use this:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #0000ff;">$HTTP</span><span style="color: #009900;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #ff0000;">&quot;domain<span style="color: #000099; font-weight: bold;">\.</span>com&quot;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000ff;">$HTTP</span><span style="color: #009900;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> <span style="color: #ff0000;">&quot;www.domain.com&quot;</span> <span style="color: #009900;">&#123;</span>
        url<span style="color: #339933;">.</span>redirect <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>
            <span style="color: #ff0000;">&quot;^(.*)$&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;http://www.domain.com$1&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>By the way, if you&#8217;re an <tt>IIS</tt> user, you might want to read <a href="http://www.xoc.net/works/tips/domain.asp">this</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nkuttler.de/2009/01/11/redirecting-all-subdomains-to-the-main-domain/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
