<?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>Odd Henriksen</title>
	<atom:link href="http://www.oddhenriksen.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.oddhenriksen.net</link>
	<description>About technology and random stuff</description>
	<lastBuildDate>Sat, 18 Dec 2010 23:43:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Site off to a rough start</title>
		<link>http://www.oddhenriksen.net/en/2010/12/site-off-to-a-rough-start</link>
		<comments>http://www.oddhenriksen.net/en/2010/12/site-off-to-a-rough-start#comments</comments>
		<pubDate>Sun, 12 Dec 2010 23:32:24 +0000</pubDate>
		<dc:creator>Odd Henriksen</dc:creator>
				<category><![CDATA[Server administration]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[modsecurity]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.oddhenriksen.net/?p=51</guid>
		<description><![CDATA[I just recently set up this blog on my VPS, which was nearly &#8220;maxed out&#8221; already. Thinking that a small WordPress blog wouldn&#8217;t consume enough resources to cause any trouble, I considered it a good idea at the time. It turned out not to go so well, however.. The problem was that I use ModSecurity2 [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently set up this blog on my VPS, which was nearly &#8220;maxed out&#8221; already. Thinking that a small WordPress blog wouldn&#8217;t consume enough resources to cause any trouble, I considered it a good idea at the time. It turned out not to go so well, however..<br />
<span id="more-51"></span></p>
<p>The problem was that I use ModSecurity2 with separate configurations for each site, and that requires a quite significant amount of memory for a VPS (depending on the size of the rulesets), combined with the fact that I use Apache&#8217;s &#8220;worker&#8221; MPM. I was aware of all that, but apparently I hadn&#8217;t done my job well enough when it comes to monitoring the VPS&#8217; resources lately. It was already using a lot of swap, and after adding this site to the collection of enabled web sites, all physical <em>and</em> swap memory was quickly depleted. All the swapping obviously led to really bad performance, but the complete depletion of memory resources also led to occasional termination of CGI processes.</p>
<p>Long story short, I moved the site over to my home web server (which is also virtual), where I had a nearly identical setup. Just in case, I carefully tuned the settings for the worker MPM and increased the amount of physical memory available for the virtual web server machine. Even on the much, much slower bandwidth of my home server, this blog is performing a lot better now.</p>
<p>I just need to start actually writing stuff now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oddhenriksen.net/en/2010/12/site-off-to-a-rough-start/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using multiple IP addresses on my Debian-based VPS</title>
		<link>http://www.oddhenriksen.net/en/2010/11/using-multiple-ips-on-debian</link>
		<comments>http://www.oddhenriksen.net/en/2010/11/using-multiple-ips-on-debian#comments</comments>
		<pubDate>Sat, 27 Nov 2010 20:45:03 +0000</pubDate>
		<dc:creator>Odd Henriksen</dc:creator>
				<category><![CDATA[Information technology]]></category>
		<category><![CDATA[Server administration]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dyndns]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.oddhenriksen.net/?p=34</guid>
		<description><![CDATA[I have a VPS instance (running Debian) provided by DynDNS (their Spring Server VPS service), on which I&#8217;m running a few services, including a few web sites. I had some privacy concerns and didn&#8217;t want to share the same IP address for all of my sites. It&#8217;s very simple to locate other sites running on [...]]]></description>
			<content:encoded><![CDATA[<p>I have a VPS instance (running Debian) provided by DynDNS (their <a href="http://www.dyndns.com/services/springserver/" target="_blank">Spring Server VPS</a> service), on which I&#8217;m running a few services, including a few web sites.</p>
<p>I had some privacy concerns and didn&#8217;t want to share the same IP address for all of my sites. It&#8217;s very simple to locate other sites running on the same web server IP. Therefore I requested an additional IP address (IPv4) from DynDNS.</p>
<p>DynDNS Support were very forthcoming and I quickly had an extra IP address at my disposal. But where to go from there? Different providers have different ways to go about this. Some assign an extra network interface (virtual NIC device) to the VPS, while others (including DynDNS) simply reserve the IP address to you. In my case, IP aliasing was the way to go (creating a virtual interface &#8211; see <a href="http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_virtual_interface" target="_blank">Debian&#8217;s reference documentation on this</a>).</p>
<p><span id="more-34"></span></p>
<p>I defined a new virtual interface in <strong>/etc/network/interfaces</strong>:</p>
<blockquote>
<pre>auto eth0:0
iface eth0:0 inet static
 address 200.200.200.200
 gateway 200.200.200.1
 netmask 255.255.255.0
</pre>
</blockquote>
<p>Then I connected to the VPS through serial console (see <a href="http://springconsole.com/" target="_blank">springconsole.com</a>) and restarted the network interfaces:</p>
<blockquote>
<pre>invoke-rc.d networking restart</pre>
</blockquote>
<p>Then the real work remained &#8211; configuration. To get things working the way I wanted, I needed to reconfigure iptables, Apache (httpd), my MTA and more.</p>
<p>I won&#8217;t go into too many details when it comes to the iptables configuration, but basically I wanted to restrict some services to only be reachable on a specific IP. Configuring a service to only listen to a certain IP is fine, but it is always good to filter this with iptables. In DynDNS&#8217; Debian VPS template, you have a .conf file available for this  &#8211; <strong>/etc/iptables.conf</strong> (and <strong>/etc/ip6tables.conf</strong> for IPv6). Just to give a simple example of an input accept rule restricted to a specific local IP, here is a line which would cause incoming SMTP connections to only be accepted if 100.100.100.100 was the destination IP:</p>
<blockquote>
<pre>-A INPUT -p tcp -m tcp -d 100.100.100.100/32 --dport 25 -j ACCEPT
</pre>
</blockquote>
<p>The Apache configuration was the most important one for me. In Debian (up to and including Debian 5.0), the <em>Listen</em> directive and such for Apache2 is placed in <strong>/etc/apache2/ports.conf</strong> (in Debian 6.0 &#8220;apache2&#8243; is renamed to &#8220;apache&#8221;, so it will likely use /etc/apache). Made some simple changes here. Added explicit IP addresses to the NameVirtualHost directives:</p>
<blockquote>
<pre>NameVirtualHost 100.100.100.100:80
NameVirtualHost 200.200.200.200:80</pre>
</blockquote>
<p>That way, I became able to have a separate set of name-based virtual hosts for each IP address.</p>
<p>Next on my list was to ensure that a specific source IP was used for all outgoing SMTP connections. To achieve this in Postfix, one has to edit the <strong>master.cf</strong> file and add an option for the <strong>smtp</strong> service:</p>
<pre>
<blockquote>

smtp      unix  -       -       -       -       -       smtp
  -o smtp_bind_address=100.100.100.100
</blockquote>
</pre>
<p>That&#8217;s pretty much the gist of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oddhenriksen.net/en/2010/11/using-multiple-ips-on-debian/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Norwegian translation of Subscribe to Comments Reloaded</title>
		<link>http://www.oddhenriksen.net/en/2010/11/norwegian-translation-of-subscribe-to-comments-reloaded</link>
		<comments>http://www.oddhenriksen.net/en/2010/11/norwegian-translation-of-subscribe-to-comments-reloaded#comments</comments>
		<pubDate>Thu, 25 Nov 2010 22:41:50 +0000</pubDate>
		<dc:creator>Odd Henriksen</dc:creator>
				<category><![CDATA[Concerning the blog]]></category>
		<category><![CDATA[Translation]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[norwegian]]></category>
		<category><![CDATA[subscribe-to-comments]]></category>
		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://www.oddhenriksen.net/?p=23</guid>
		<description><![CDATA[In the process of setting up this blog (which is using WordPress), I have found some useful plugins &#8211; among others &#8220;Subscribe to Comments Reloaded&#8221; &#8211; which allows users to subscribe to follow-up comments to a post. Quite nifty. However, I haven&#8217;t done things particularly easy for myself here, because I wanted to make the [...]]]></description>
			<content:encoded><![CDATA[<p>In the process of setting up this blog (which is using WordPress), I  have found some useful plugins &#8211; among others &#8220;<a href="http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/" target="_blank">Subscribe to Comments  Reloaded</a>&#8221; &#8211; which allows users to subscribe to follow-up comments to a  post. Quite nifty.</p>
<p>However, I haven&#8217;t done things particularly  easy for myself here, because I wanted to make the blog multilingual. I  need to have as much as possible in both English and Norwegian. Since I  couldn&#8217;t find any decent Norwegian translation of Subscribe to Comments  Reloaded, I created one.</p>
<p>It&#8217;s available here if any fellow Norwegians are interested:<br />
<a href="../wp-content/uploads/2010/11/subscribe-reloaded-nb_NO.zip">subscribe-reloaded-nb_NO</a></p>
<p>The  down-side, though, is that because of the way that plugin works, with  all messages being configurable from the WP administration pages, and  the way these messages are finally &#8220;echoed&#8221;, there are still some  obstacles to resolve before I have it working optimally on a  multilingual blog. It seems I may have to do some minor alterations in  the plugin&#8217;s code, but that&#8217;s for a future post, when I&#8217;ve actually  thought it through properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oddhenriksen.net/en/2010/11/norwegian-translation-of-subscribe-to-comments-reloaded/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Under construction</title>
		<link>http://www.oddhenriksen.net/en/2010/11/under-construction</link>
		<comments>http://www.oddhenriksen.net/en/2010/11/under-construction#comments</comments>
		<pubDate>Sat, 20 Nov 2010 18:45:22 +0000</pubDate>
		<dc:creator>Odd Henriksen</dc:creator>
				<category><![CDATA[Concerning the blog]]></category>

		<guid isPermaLink="false">http://oddhenriksen.net/?p=1</guid>
		<description><![CDATA[The world is about to see yet another blog (somehow I hear no roaring applause). Much to do before I&#8217;m done setting up this blog. There&#8217;s a lot to do with the theme, setting up plugins, making it multilingual, etc. And last but not least, I should write some initial posts.]]></description>
			<content:encoded><![CDATA[<p>The world is about to see yet another blog (somehow I hear no roaring applause). Much to do before I&#8217;m done setting up this blog. There&#8217;s a lot to do with the theme, setting up plugins, making it multilingual, etc. And last but not least, I should write some initial posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oddhenriksen.net/en/2010/11/under-construction/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

