<?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>phlinux.com</title>
	<atom:link href="http://www.phlinux.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.phlinux.com</link>
	<description>/* just a bunch of stuff about linux */</description>
	<lastBuildDate>Sat, 02 Jan 2010 21:20:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Stop managing the server!</title>
		<link>http://www.phlinux.com/?p=6</link>
		<comments>http://www.phlinux.com/?p=6#comments</comments>
		<pubDate>Sun, 12 Aug 2007 22:47:11 +0000</pubDate>
		<dc:creator>wago</dc:creator>
				<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.phlinux.com/?p=6</guid>
		<description><![CDATA[I just got back from a quick trip to LinuxWorld, where I discovered that the vendors are still *gasp* completely clueless. They&#8217;re stuck in this &#8220;The Server is Precious&#8221; mindset, which prevents them from understanding the real value in Linux. Linux isn&#8217;t an operating system, it&#8217;s a framework. Datacenter computing isn&#8217;t a collection of random [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: green;">I just got back from a quick trip to <a title="LinuxWorld" href="http://www.linuxworldexpo.com/" target="_blank">LinuxWorld</a></span></strong>, where I discovered that the vendors are still <em>*gasp*</em> completely clueless. They&#8217;re stuck in this <em>&#8220;The Server is Precious&#8221;</em> mindset, which prevents them from understanding the real value in Linux. Linux isn&#8217;t an operating system, it&#8217;s a framework. Datacenter computing isn&#8217;t a collection of random boxes, it&#8217;s a compute grid. Of course, for this to all make sense, software must be built with the datacenter in mind. Good IT shops understand this, and bad ones go to LinuxWorld and suck up <a title="Avocent" href="http://www.avocent.com/" target="_blank">Avocent</a> bullsh!t about remote server management.</p>
<h2><span style="color: red;">&#8220;The Server is Precious&#8221;:</span></h2>
<p>This old-school mentality basically entails a staff of administrators who lovingly hand-craft every server for it&#8217;s new purpose. The server performs this purpose for some period of time, then fails spectacularly. The admins profusely apologize for this failure, sell their management on a cluster (-f_ck) at five times the price of the original server. The cluster, being less reliable than the original server, proceeds to fail in a more subtle, less recoverable way, taking the service down again. The admins, who probably understand something about grid computing, refuse to bring it up to their management, since they&#8217;re afraid of change, and <em>Server TLC</em> is their only modus operandi. So, the company continues to hunt around for a better set of crutches for their poorly designed, highly persistent application. They&#8217;ll probably go to <a title="Windows Server" href="http://www.microsoft.com/servers/default.mspx" target="_blank">windows server</a>, sucking up the <a title="microsoft availability crap" href="http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=51828" target="_blank">microsoft crap about five-nines</a>.</p>
<h2><span style="color: red;">Linux is a Framework:</span></h2>
<p>Okay, so now that it&#8217;s clear that you shouldn&#8217;t think of servers as these little hand-crafted beasties, how do we move on? The key is to think of Linux as an application framework rather than a monolithic operating system. A monolithic operating system is generally hand-installed, comes with every imagineable feature, and must be upgraded by hand every few years. A framework, however, is simply the collection of open source software that surrounds the business application. This framework is the minimum set of libraries and tools required to operate and maintain the application in production. Each application should have it&#8217;s own framework. Keep it simple.</p>
<h2><span style="color: red;">Datacenter Grid Computing:</span></h2>
<p>Every system in your datacenter should be viewed as a meaningless, stateless blob of compute capacity. Think of it as a big CPU hopper. The Infrastructure team is responsible for throwing the lowest-price, least stinky CPU manure into the top of the hopper. Their only job is to keep costs low, and the hopper full enough to satisfy demand. They need to understand (and be measured by) the cost-per-pound of said CPU, and they need to charge each service for the capacity that they consume. Think of it this way: you need to buy processors and DIMMs. Anything else is overhead. Some of it (like a mainboard) is probably necessary. But why do you need a discrete power supply? Why a discrete chassis? What the hell do you need remote floppy redirect over a java applet for, again?</p>
<h2><span style="color: red;">Make the Software an Appliance:</span></h2>
<p>Ah! Now we&#8217;re getting somewhere. Once you have a big hopper of CPU cycles, you can simply instantiate the software on this resource as needed. Need more? Take it from the hopper on a just-in-time basis. Done with your resources? Back in the hopper. Suddenly, things like a complete, mangled (ahem, <em>managed</em>) operating system become superfluous. Since you built a framework of your minimum set of requirements around your application, you can just toss that blob into the compute farm and execute it to your heart&#8217;s content.</p>
<h2><span style="color: red;">Rubber, meet Road:</span></h2>
<p>Okay, this is all good to talk about. In fact, lots of people are talking this way. So, who gets it&#8230; and who is completely missing the boat?</p>
<p><strong>On the Boat:</strong></p>
<ul>
<li><a href="http://www.rpath.com/" target="_blank">rPath</a></li>
<li><a href="http://www.amazonaws.com/" target="_blank">Amazon Web Services</a></li>
<li><a href="http://www.google.com/" target="_blank">Google</a></li>
<li><a href="http://www.redhat.com/rhel/virtualization/" target="_blank">RedHat&#8217;s Xen Platform</a></li>
<li><a href="http://www.rackable.com/" target="_blank">Rackable Systems</a></li>
<li><a href="http://www.dell.com/cloudcomputing" target="_blank">Dell Cloud Computing</a></li>
<li><a href="http://www.siliconmechanics.com/" target="_blank">Silicon Mechanics </a></li>
</ul>
<p><strong>Still on the Dock:</strong></p>
<ul>
<li><a href="http://www.microsoft.com/" target="_blank">Microsoft</a></li>
<li><a href="http://www.yahoo.com/" target="_blank">Yahoo</a></li>
<li><a href="http://www.ebay.com/" target="_blank">eBay</a></li>
<li><a href="http://www.hp.com/" target="_blank">Hewlett Packard</a></li>
<li><a href="http://www.sun.com" target="_blank">Sun Microsystems</a></li>
<li><a href="http://www.emc.com/" target="_blank">EMC/Veritas</a></li>
<li><a href="http://www.avocent.com/">Avocent</a></li>
</ul>
<p><strong><span style="color: red;">Am I crazy?</span></strong> Post a comment, let me know. Who else is still on the dock? Who is the captain of the boat?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phlinux.com/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing RHEL3 on a Soekris 4801</title>
		<link>http://www.phlinux.com/?p=5</link>
		<comments>http://www.phlinux.com/?p=5#comments</comments>
		<pubDate>Mon, 27 Dec 2004 18:45:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-To Guides]]></category>

		<guid isPermaLink="false">http://www.phlinux.com/?p=5</guid>
		<description><![CDATA[I&#8217;ve been running m0n0wall on my Soekris 4801 for awhile now. I&#8217;ve decided that I want to get a little more control over my firewall and move back to Linux. So, I installed WhiteBox Linux on the 4801 and built a set of IPtables firewall rules.
Requirements

Soekris Net 4801 firewall
1GB CF Card
Whitebox Linux 3.0
A working PXELinux [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running <a href="http://m0n0.ch/" target="_new">m0n0wall</a> on my <a href="http://www.soekris.com/net4801.htm" target="_new">Soekris 4801</a> for awhile now. I&#8217;ve decided that I want to get a little more control over my firewall and move back to Linux. So, I installed <a href="http://www.whiteboxlinux.org/" target="_new">WhiteBox Linux</a> on the 4801 and built a set of IPtables firewall rules.</p>
<p><span style="text-decoration: underline;">Requirements</span></p>
<ul>
<li><a href="http://www.soekris.com/" target="_new">Soekris</a> Net 4801 firewall</li>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/B00006AE3K/" target="_new">1GB CF Card</a></li>
<li><a href="http://www.whiteboxlinux.org/" target="_new">Whitebox Linux 3.0</a></li>
<li>A working <a href="http://syslinux.zytor.com/pxe.php" target="_new">PXELinux environment</a></li>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/B000083J0O/" target="_new">Null modem cable</a></li>
</ul>
<p><span style="text-decoration: underline;">Instructions</span></p>
<ol>
<li>Configure whitebox linux for a PXE based installation
<ol type="a">
<li>export the installation tree via NFS or HTTP from a server on your LAN</li>
<li>copy vmlinuz and initrd.img from the images/pxeboot/ directory to /tftpboot/ on your DHCP/PXE server</li>
<li>append this entry into your pxelinux config file:<br />
<span style="font-family: courier new,courier,fixed;">label install-wb3<br />
kernel vmlinuz<br />
append initrd=/initrd root=/dev/ram0 console=ttyS0,9600n8</span></li>
</ol>
</li>
<li>Install the 1GB CF card into the Net4801&#8217;s CF slot. This will appear as an IDE drive &#8220;hdb&#8221; to the OS. The RHEL3 install consumes about 570MB, so 1GB is the minimum card size that can be used for this.</li>
<li>Connect the soekris&#8217; eth0 port to your LAN</li>
<li>Connect the null modem between the soekris and a PC with a terminal emulator</li>
<li>Open the terminal emulator and configure it for 9600/N/8/1, no flow control</li>
<li>Apply power to the Soekris</li>
<li>When prompted, hit CTRL-P to enter the soekris&#8217; boot menu</li>
<li>To PXE boot, type boot F0 and hit ENTER</li>
<li>If your syslinux environment is properly configured, you should see a pxelinux prompt</li>
<li>At the pxelinux prompt, type install-wb3 to begin the RHEL3 installation</li>
<li>proceed through the RHEL3 installation&#8230;
<ol type="a">
<li>you must use GRUB, not LILO</li>
<li>configure the partitions by hand, with one 1GB / partition</li>
<li>do not create a swap partition, it&#8217;s bad to swap to flashdisk</li>
<li>select a &#8220;custom&#8221; installation</li>
<li>unselect all the package groups to get down to a 570MB installation</li>
</ol>
</li>
<li>when the system reboots, you&#8217;ll notice that the grub bootloader is pretty messy on the soekris&#8217; serial console. to fix this:
<ol type="a">
<li>edit /boot/grub/grub.conf using your favorite editor</li>
<li>change the &#8216;terminal&#8217; line to look like this:<br />
<span style="font-family: courier new,courier,fixed;">terminal &#8211;timeout=10 &#8211;dumb serial</span></li>
</ol>
</li>
<li>use chkconfig to disable any unneccesary services to conserve memory</li>
<li>reboot to test your new config</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.phlinux.com/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring a Linux Serial Console</title>
		<link>http://www.phlinux.com/?p=4</link>
		<comments>http://www.phlinux.com/?p=4#comments</comments>
		<pubDate>Sat, 13 Sep 2003 18:17:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-To Guides]]></category>

		<guid isPermaLink="false">http://www.phlinux.com/?p=4</guid>
		<description><![CDATA[By default, on a PC, Linux sends all bootup and login text to the VGA monitor that you may or may not have attached. It also expects all input to come from the keyboard. This is fine if you have one linux server, and it&#8217;s sitting right in front of you. However, if you need [...]]]></description>
			<content:encoded><![CDATA[<p>By default, on a PC, Linux sends all bootup and login text to the VGA monitor that you may or may not have attached. It also expects all input to come from the keyboard. This is fine if you have one linux server, and it&#8217;s sitting right in front of you. However, if you need to administrate remotely, VGA is a really tough way to do it.</p>
<p>The solution? Linux can output both kernel and login messages to the serial port on a machine, which can then be connected to either another linux box or a dedicated terminal server.</p>
<p>There are 3 steps to make a Linux server output all data to a serial line. This was tested under redhat-7.2. Small changes may need to be made for other distributions.</p>
<ol>
<li><span style="text-decoration: underline;">Setup LILO to instruct the kernel to use the serial port.</span><br />
The kernel needs to be told to send all it&#8217;s bootup output to the serial port. This can be done by adding a single line to the /etc/lilo.conf line, and running /sbin/lilo to implement the changes.</p>
<p><strong><span style="font-family: courier new,courier,fixed;">append=&#8221;console=ttyS0,9600n8&#8243;</span></strong></p>
<p>This tells the kernel to send the console to ttyS0 (the first serial port) at the speed 9600 baud, no stop bits, 8 data bits. Set your terminal to those settings too.</p>
<p>You can also put the LILO prompt itself on the serial port if you&#8217;d like. You can add the following line to the header section of the /etc/lilo.conf file:</p>
<p><strong><span style="font-family: courier new,courier,fixed;">serial=0,9600n8</span></strong></li>
<li><span style="text-decoration: underline;">Give yourself a login prompt</span><br />
Once the kernel has booted, though, you need to tell the init process to spawn a login shell on the first serial port. I added the following line to the /etc/inittab file:</p>
<p><strong><span style="font-family: courier new,courier,fixed;">S0:2345:respawn:/sbin/agetty -L ttyS0 9600 vt100</span></strong></p>
<p>This tells init to spawn the agetty process. We tell agetty to listen on ttyS0, the first serial port, at 9600 baud, and to assume a terminal type of vt100. The -L flag tells agetty that this is a direct line, not a modem.</li>
<li><span style="text-decoration: underline;">Allow root logins on the serial port</span><br />
Okay, so now (after a reboot) we have the kernel messages and a login prompt on the serial port. However, it&#8217;s not letting us login as root. We need to tell login to allow root logins on the serial port. Add the line <strong>ttyS0</strong> to the file /etc/securetty to tell login that ttyS0 is a secure login facility, and to allow root on that line.</li>
</ol>
<p>You can now use a serial crossover cable to connect another linux box to COM1 on your server. Using minicom (or the terminal app of your choice) set to 9600 baud, no stop bits, 8 data bits, you&#8217;ll be able to watch your server boot up and login as root. This is great for remote administration and debugging, such as working on network problems that have prevented you from logging in normally.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phlinux.com/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a simple Linux Home Firewall</title>
		<link>http://www.phlinux.com/?p=3</link>
		<comments>http://www.phlinux.com/?p=3#comments</comments>
		<pubDate>Sat, 13 Sep 2003 18:17:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How-To Guides]]></category>

		<guid isPermaLink="false">http://www.phlinux.com/?p=3</guid>
		<description><![CDATA[Using linux as a home firewall must be the most common use of linux in the home, and is one of the ways that many people get started with linux. A linux home firewall will run on just about any old PC hardware, so long as you can install 2 network cards in it. Firewalling [...]]]></description>
			<content:encoded><![CDATA[<p>Using linux as a home firewall must be the most common use of linux in the home, and is one of the ways that many people get started with linux. A linux home firewall will run on just about any old PC hardware, so long as you can install 2 network cards in it. Firewalling for the average home user requires very little processor power &#8212; a 486 will work just fine, although administration might be a bit sluggish.</p>
<p>All you need for a home firewall is a simple linux installation (I use redhat) to start off with. You&#8217;ll need to configure both of your network cards: eth0 with the IP address that your provider assigned to you, and eth1 as 192.168.0.1/24. The firewall consists of 2 simple pieces: keeping people out and allowing your connections through.</p>
<p><span style="text-decoration: underline;">Step 1: Keeping people out using state tracking</span><br />
State tracking allows you to only allow valid connections, identified by the correct packets originating from the correct places. Any incoming packet that is not associated with a connection that you originated will be dropped.</p>
<p>The first thing to setup is a new &#8220;chain&#8221; that we will use for both INPUT and FORWARD categories of packets. This can be done with the following commands. The first command sets up a new chain called &#8220;block&#8221;. The second command allows any state-tracked packet that is for an established connection to flow through. The third command matches anything else and drops the packet.</p>
<p><strong><span style="font-family: courier new,courier,fixed;"><br />
/sbin/iptables -N block<br />
/sbin/iptables -A block -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT<br />
/sbin/iptables -A block -j DROP<br />
</span></strong></p>
<p>We then want to add rules for our external interfaces to jump to this block table. We&#8217;ll assume that eth1 is our external interface, and eth0 is our internal (trusted) interface. We&#8217;ll also add a rule for the loopback interface, since many applications that you may have on your server will need that.</p>
<p><strong><span style="font-family: courier new,courier,fixed;"><br />
/sbin/iptables -A INPUT -i eth0 -j ACCEPT<br />
/sbin/iptables -A INPUT -i lo -j ACCEPT<br />
/sbin/iptables -A INPUT -j block<br />
/sbin/iptables -A FORWARD -i eth0 -j ACCEPT<br />
/sbin/iptables -A FORWARD -i lo -j ACCEPT<br />
/sbin/iptables -A FORWARD -j block<br />
</span></strong></p>
<p>At this point, you should be able to get out to the internet from the linux box that you setup, but you&#8217;re not yet translating traffic from your home network to use this new internet connection. This brings us to step 2.</p>
<p><span style="text-decoration: underline;">Step 2: Network Address Translation</span></p>
<p>We&#8217;re going to use &#8220;fake&#8221; 192.168.0.* addresses on the internal network, which will allow up to 253 workstations behind your firewall. If you&#8217;re running more than that, this range can be increased, but, well, if you have more than 253 workstations behind your home firewall, you&#8217;re doing something pretty special <img src='http://www.phlinux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . We&#8217;re going to use the real IP address of 4.3.2.1 as the IP address of your linux box &#8212; substitute your ip address in there.</p>
<p>We&#8217;re going to use a technology called &#8220;SNAT&#8221;, which stands for source-address network address translation. This basically means that the firewall is going to translate the fake address of workstations behind the firewall to it&#8217;s own address, which is a valid internet IP address. This is really just a simple command:</p>
<p><strong><span style="font-family: courier new,courier,fixed;">/sbin/iptables -A POSTROUTING -t nat -s 192.168.0.0/24 -j SNAT &#8211;to-source 4.3.2.1</span></strong></p>
<p>At this point, we&#8217;re ready to configure a workstation. For small networks, just configure your workstations by hand. If you have more than a few workstations, then we can use DHCP to automagically assign IP addresses to them. That&#8217;ll be covered in a seperate article.</p>
<p>For now, setup a workstation with the IP address of 192.168.0.10, a subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1. Use whatever DNS servers were assigned to you by your ISP. Once that machine is configured, you should be able to browse the internet from that machine.</p>
<p>We can then check our config with the command:</p>
<p><strong><span style="font-family: courier new,courier,fixed;">/sbin/iptables -L -n -v</span></strong></p>
<p>Which will give a verbose description of the rules that we have running. If all is working, RedHat gives us an easy way to save our active config:</p>
<p><strong><span style="font-family: courier new,courier,fixed;">/etc/rc.d/init.d/iptables save</span></strong></p>
<p>So that our rules will still be around if we have to reboot our firewall for some reason.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phlinux.com/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
