<?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>Racker Hacker &#187; ubuntu</title>
	<atom:link href="http://rackerhacker.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:07:41 +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>Automatically loading iptables rules on Debian/Ubuntu</title>
		<link>http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/</link>
		<comments>http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 04:39:52 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1039</guid>
		<description><![CDATA[If you want your iptables rules automatically loaded every time your networking comes up on your Debian or Ubuntu server, you can follow these easy steps. First, get your iptables rules set up the way you like them. Once you've verified that everything works, save the rules: iptables-save &#62; /etc/firewall.conf Next, open up /etc/network/if-up.d/iptables in [...]<p><a href="http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/">Automatically loading iptables rules on Debian/Ubuntu</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you want your iptables rules automatically loaded every time your networking comes up on your Debian or Ubuntu server, you can follow these easy steps.</p>
<p>First, get your iptables rules set up the way you like them.  Once you've verified that everything works, save the rules:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">iptables-save &gt; /etc/firewall.conf</pre></div></div>

<p>Next, open up <code>/etc/network/if-up.d/iptables</code> in your favorite text editor and add the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
iptables-restore <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>firewall.conf</pre></div></div>

</pre>
<p>Once you save it, make it executable:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">chmod +x /etc/network/if-up.d/iptables</pre></div></div>

<p>Now, the rules will be restored each time your networking scripts start (or restart).  If you need to save changes to your rules in the future, you can manually edit <code>/etc/firewall.conf</code> or you can adjust your rules live and run:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">iptables-save &gt; /etc/firewall.conf</pre></div></div>

<p><em>Thanks to <a href="http://twitter.com/ajmesserli">Ant</a> for this handy tip.</em></p>
<p><a href="http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/">Automatically loading iptables rules on Debian/Ubuntu</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/11/16/automatically-loading-iptables-on-debianubuntu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>New Linux security advisory Twitter bots</title>
		<link>http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/</link>
		<comments>http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 17:00:03 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=762</guid>
		<description><![CDATA[Thanks to the simplicity of ruby as well as the twitter and httparty gems, I've whipped up some Twitter bots today. The three bots will alert you when there are Red Hat, Ubuntu, or Debian security advisories. I'd set one up for Fedora, but their feed is broken today. @redhaterrata - Red Hat Errata Updates [...]<p><a href="http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/">New Linux security advisory Twitter bots</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Thanks to the simplicity of <a href="http://ruby-lang.org/">ruby</a> as well as the <a href="http://twitter.rubyforge.org/">twitter</a> and <a href="http://github.com/jnunemaker/httparty/tree/master">httparty</a> gems, I've whipped up some Twitter bots today.  The three bots will alert you when there are Red Hat, Ubuntu, or Debian security advisories.  I'd set one up for Fedora, but their feed is broken today.</p>
<p><strong><a href="http://twitter.com/redhaterrata/">@redhaterrata</a></strong> - Red Hat Errata Updates<br />
<strong><a href="http://twitter.com/ubuntusecurity/">@ubuntusecurity</a></strong> - Ubuntu Security Notifications<br />
<strong><a href="http://twitter.com/debiansecurity/">@debiansecurity</a></strong> - Debian Security Advisories</p>
<p>As always, you can <a href="http://twitter.com/rackerhacker/">let me know</a> if you have any suggestions for improvements, or other bots you'd like to see.</p>
<p><a href="http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/">New Linux security advisory Twitter bots</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/02/05/new-linux-security-advisory-twitter-bots/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux: Adjust storage kernel module load order</title>
		<link>http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/</link>
		<comments>http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 20:40:01 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=717</guid>
		<description><![CDATA[I set up a system at home that has two SATA controllers: one is on the motherboard (nvidia chipset), while the other is on a Silicon Image SATA card that has three eSATA ports. Here is the relevant lspci output: root@storageserver:~# lspci &#124; grep ATA 00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2) [...]<p><a href="http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/">Linux: Adjust storage kernel module load order</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I set up a system at home that has two SATA controllers: one is on the motherboard (nvidia chipset), while the other is on a Silicon Image SATA card that has three eSATA ports.  Here is the relevant <code>lspci</code> output:</p>
<pre>root@storageserver:~# lspci | grep ATA
00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
00:08.1 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
03:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)</pre>
<p>There are two primary drives connected to the onboard controller and four connected to the controller card.  One of the primary drives on the onboard controller contains the operating system (Ubuntu, in this case), while the other drive is blank.</p>
<p>When the system booted, the sata_sil24 driver for the add-on card always loaded before the sata_nv drivers for the onboard storage controller:</p>
<pre>kernel: [    4.125598] sata_sil24 0000:03:00.0: version 1.1
kernel: [    4.126102] sata_sil24 0000:03:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16
kernel: [    4.126161] sata_sil24 0000:03:00.0: setting latency timer to 64
kernel: [    4.129472] scsi0 : sata_sil24
kernel: [    4.129635] scsi1 : sata_sil24
kernel: [    8.293762] sata_nv 0000:00:08.0: version 3.5
kernel: [    8.293779] sata_nv 0000:00:08.0: PCI INT A -> Link[APSI] -> GSI 20 (level, low) -> IRQ 20
kernel: [    8.293829] sata_nv 0000:00:08.0: setting latency timer to 64
kernel: [    8.296764] scsi2 : sata_nv
kernel: [    8.296905] scsi3 : sata_nv
kernel: [    9.285034] sata_nv 0000:00:08.1: PCI INT B -> Link[APSJ] -> GSI 21 (level, low) -> IRQ 21
kernel: [    9.285074] sata_nv 0000:00:08.1: setting latency timer to 64
kernel: [    9.285161] scsi4 : sata_nv
kernel: [    9.286015] scsi5 : sata_nv</pre>
<p>After specifying an explicit order in /etc/modules and /etc/modprobe.conf, I wasn't able to see any changes.  The sata_sil24 driver still loaded before the onboard sata_nv driver.  Luckily, a <a href="http://twitter.com/Twirrim">very wise person</a> on <a href="http://twitter.com/">Twitter</a> <a href="http://twitter.com/Twirrim/status/1148330615">gave me a strategy</a> that <a href="http://tinyurl.com/d53f6e">worked just fine</a>.</p>
<p>I added sata_sil24 to the bottom of my /etc/modprobe.d/blacklist file first.  Then, in /etc/modules, I listed sata_nv first, followed by sata_sil24.  When the system booted, I got the result that I wanted:</p>
<pre>kernel: [    3.982909] sata_nv 0000:00:08.0: version 3.5
kernel: [    3.982931] sata_nv 0000:00:08.0: PCI INT A -> Link[APSI] -> GSI 20 (level, low) -> IRQ 20
kernel: [    3.982993] sata_nv 0000:00:08.0: setting latency timer to 64
kernel: [    3.984497] scsi0 : sata_nv
kernel: [    3.986013] scsi1 : sata_nv
kernel: [    4.971755] sata_nv 0000:00:08.1: PCI INT B -> Link[APSJ] -> GSI 21 (level, low) -> IRQ 21
kernel: [    4.971799] sata_nv 0000:00:08.1: setting latency timer to 64
kernel: [    4.973153] scsi2 : sata_nv
kernel: [    4.974031] scsi3 : sata_nv
kernel: [   15.988862] sata_sil24 0000:03:00.0: version 1.1
kernel: [   15.989454] sata_sil24 0000:03:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16
kernel: [   15.989511] sata_sil24 0000:03:00.0: setting latency timer to 64
kernel: [   15.990201] scsi6 : sata_sil24
kernel: [   15.991523] scsi7 : sata_sil24</pre>
<p>The sata_nv driver is loading first, and Ubuntu boots off of it without an issue.  The sata_sil24 driver loads next so that the drives connected to the card show up lower in the boot order.</p>
<p><i>Many thanks to <a href="http://twitter.com/Twirrim">@Twirrim</a> on Twitter for the suggestion!</i></p>
<p><a href="http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/">Linux: Adjust storage kernel module load order</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

