<?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>workblog &#187; Linux/Unix</title>
	<atom:link href="http://iandunn.name/workblog/category/linux-unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://iandunn.name/workblog</link>
	<description></description>
	<lastBuildDate>Wed, 25 Aug 2010 22:23:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Updating OpenDNS With a Dynamic IP From an Endian Firewall</title>
		<link>http://iandunn.name/workblog/updating-a-dynamic-ip-from-an-endian-firewall-to-opendns/</link>
		<comments>http://iandunn.name/workblog/updating-a-dynamic-ip-from-an-endian-firewall-to-opendns/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 15:58:45 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=312</guid>
		<description><![CDATA[The Endian router/firewall appliance comes with a Dynamic DNS client that supports the major DDNS providers, but it doesn&#8217;t support updating OpenDNS, which is necessary for any custom settings on your OpenDNS account to be applied to the traffic you pass through their servers.
It&#8217;s possible to configure this yourself, though. There&#8217;s a helpful post at [...]]]></description>
			<content:encoded><![CDATA[<p>The Endian router/firewall appliance comes with a Dynamic DNS client that supports the major DDNS providers, but it doesn&#8217;t support updating OpenDNS, which is necessary for any custom settings on your OpenDNS account to be applied to the traffic you pass through their servers.</p>
<p>It&#8217;s possible to configure this yourself, though. There&#8217;s a helpful post at the OpenDNS forums that describes <a href=" http://forums.opendns.com/comments.php?DiscussionID=1911&amp;page=1#Item_0">how to configure ddclient on an Endian</a> to automatically update an OpenDNS account whenever your dynamic IP address changes.</p>
<p>Here are a few additional notes that may help:</p>
<ul>
<li>You don&#8217;t need to query an external website for your IP address, since the Endian box already knows it. Set ddclient.conf with &#8220;use=if, if=eth0&#8243; (or whichever NIC is your red zone).</li>
<li>It won&#8217;t work if you set &#8220;ssl=no&#8221;, so you have to leave it set to yes and install the two Perl SSL modules listed in the post.</li>
<li>Endian doesn&#8217;t have an SMTP server installed, so ddclient can&#8217;t send you status e-mails. Comment out the &#8220;mail&#8221; and &#8220;mail-failure&#8221; lines to avoid errors.</li>
<li>Make sure you don&#8217;t have any spaces in the OpenDNS network label or ddclient conf file.</li>
</ul>
<p>To test if it&#8217;s working, you&#8217;ll need to get a new dynamic IP.</p>
<ul>
<li>Turn off your cable or dsl modem.</li>
<li>Spoof the MAC address on the Endian.
<ul>
<li>On your PC, open a command prompt and type &#8220;ipconfig /all&#8221;. Copy the value of the Physical Address line. It will look something like 00-4D-B7-D3-5F-03.</li>
<li>Go to the Network Configuration wizard on the Endian.</li>
<li>In step 4, enter your PC&#8217;s MAC into the &#8220;Spoof MAC address with&#8221; field. Change the dashes to colons so that it looks like 00:4D:B7:D3:5F:03.</li>
</ul>
</li>
<li>Shut down the Endian.</li>
<li>Turn the modem back on. Wait 15 seconds.</li>
<li>Turn the Endian back on.</li>
</ul>
<p>Once you&#8217;ve verified it&#8217;s working, you can remove the spoof setting by repeating the steps.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/updating-a-dynamic-ip-from-an-endian-firewall-to-opendns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firewalling an OpenVZ node and containers</title>
		<link>http://iandunn.name/workblog/firewalling-an-openvz-node-and-containers/</link>
		<comments>http://iandunn.name/workblog/firewalling-an-openvz-node-and-containers/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 17:13:31 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Virtuozzo/Plesk]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=266</guid>
		<description><![CDATA[The OpenVZ wiki has a nice script for firewalling an OpenVZ node and it&#8217;s containers. It creates a service and configures iptables to block all traffic to the node (except the ports you specify), but allow all traffic through to the containers, so that they can manage their own firewall. It also allows the container&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>The OpenVZ wiki has a nice script for <a href="http://wiki.openvz.org/Setting_up_an_iptables_firewall">firewalling an OpenVZ node and it&#8217;s containers</a>. It creates a service and configures iptables to block all traffic to the node (except the ports you specify), but allow all traffic through to the containers, so that they can manage their own firewall. It also allows the container&#8217;s firewalls to be managed on the node through a simple config file.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/firewalling-an-openvz-node-and-containers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Relaying Qmail Through a Spam Filter</title>
		<link>http://iandunn.name/workblog/relaying-qmail-through-a-spam-filter/</link>
		<comments>http://iandunn.name/workblog/relaying-qmail-through-a-spam-filter/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 01:19:47 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Virtuozzo/Plesk]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=250</guid>
		<description><![CDATA[If you&#8217;re running a mail service on a web server so it can send out e-mail from contact forms, etc then you&#8217;ll want to make sure it&#8217;s relaying outbound mail through a spam filter, or it could be used to send spam if the forms get hijacked. For qmail, you just need to create /var/qmail/control/smtproutes [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running a mail service on a web server so it can send out e-mail from contact forms, etc then you&#8217;ll want to make sure it&#8217;s <a href="http://blog.pivotalweb.com/?p=19">relaying outbound mail through a spam filter</a>, or it could be used to send spam if the forms get hijacked. For qmail, you just need to create /var/qmail/control/smtproutes and enter &#8220;:yourmailserver.com&#8221;, then restart. Make sure the spam filter is configured to allow the mail server to relay through it.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/relaying-qmail-through-a-spam-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skipping Disk Check When Rebooting Linux Server</title>
		<link>http://iandunn.name/workblog/skipping-disk-check-when-rebooting-linux-server/</link>
		<comments>http://iandunn.name/workblog/skipping-disk-check-when-rebooting-linux-server/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 00:35:31 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=246</guid>
		<description><![CDATA[If you don&#8217;t run a disk check on a Linux server in awhile and you reboot, it may force a disk check, which can take 30+ minutes, and it&#8217;ll be offline the entire time. You can reboot and skip the check with shutdown -fr now or force a check with shutdown -Fr now. (via go2linux.org)

]]></description>
			<content:encoded><![CDATA[<p class="codigo">If you don&#8217;t run a disk check on a Linux server in awhile and you reboot, it may force a disk check, which can take 30+ minutes, and it&#8217;ll be offline the entire time. You can reboot and skip the check with <strong><em>shutdown -fr now</em><span style="font-weight: normal;"> or force a check with <strong><em>shutdown -Fr now</em><span style="font-weight: normal;">. (via <a href="http://www.go2linux.org/reboot-check-disks-for-errors-avoid-force-fsck">go2linux.org</a>)</span></strong></span></strong></p>
<p class="codigo">
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/skipping-disk-check-when-rebooting-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Filenames to Lowercase on Linux</title>
		<link>http://iandunn.name/workblog/convert-filenames-to-lowercase-on-linux/</link>
		<comments>http://iandunn.name/workblog/convert-filenames-to-lowercase-on-linux/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:56:22 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=224</guid>
		<description><![CDATA[If you transfer files from a Windows server to a Linux one, you may get some broken links because Linux is case-sensative while Windows isn&#8217;t. You can rename all the files on the Linux server to their lowercase equivalents with this shell script from Linux Journal.


#!/bin/sh
# lowerit
# convert all file names in the current directory [...]]]></description>
			<content:encoded><![CDATA[<p>If you transfer files from a Windows server to a Linux one, you may get some broken links because Linux is case-sensative while Windows isn&#8217;t. You can <a href="http://www.linuxjournal.com/content/convert-filenames-lowercase">rename all the files on the Linux server to their lowercase equivalents</a> with this shell script from Linux Journal.</p>
<pre name="code" class="css">

#!/bin/sh
# lowerit
# convert all file names in the current directory to lower case
# only operates on plain files--does not change the name of directories
# will ask for verification before overwriting an existing file
for x in `ls`
do
if [ ! -f $x ]; then
continue
fi
lc=`echo $x  | tr &#039;[A-Z]&#039; &#039;[a-z]&#039;`
if [ $lc != $x ]; then
mv -i $x $lc
fi
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/convert-filenames-to-lowercase-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NTP Service Doesn&#8217;t Start Serving Until It Stablizes</title>
		<link>http://iandunn.name/workblog/ntp-service-doesnt-start-serving-until-it-stablizes/</link>
		<comments>http://iandunn.name/workblog/ntp-service-doesnt-start-serving-until-it-stablizes/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 22:30:53 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=147</guid>
		<description><![CDATA[I just spent an hour trying to figure out why the NTP service I installed wasn&#8217;t working, and then I came across this slightly important little fact:
Your internal workstation computers will not be able to use the server as a synchronisation source until the LOCAL(0) clock has stable time. This may take up to 15 minutes [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent an hour trying to figure out why the NTP service I installed wasn&#8217;t working, and then I came across this <em>slightly</em> important little fact:</p>
<blockquote><p>Your internal workstation computers will not be able to use the server as a synchronisation source until the <span>LOCAL(0)</span> clock has stable time. This may take up to 15 minutes after starting the NTP daemon.</p></blockquote>
<p>So thanks to Miles Brennan&#8217;s <a href="http://www.brennan.id.au/09-Network_Time_Protocol.html">Linux Home Server HOWTO</a>. Not sure why none of the other dozen tutorials I read failed to mention that, but it would have been nice&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/ntp-service-doesnt-start-serving-until-it-stablizes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find largest directories on a Linux box</title>
		<link>http://iandunn.name/workblog/find-largest-directories-on-a-linux-box/</link>
		<comments>http://iandunn.name/workblog/find-largest-directories-on-a-linux-box/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:06:59 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=128</guid>
		<description><![CDATA[These commands will return the largest 10 directories on a Linux box.


du -k / &#124; sort -n &#124; tail -10

via peterbe.com
]]></description>
			<content:encoded><![CDATA[<p>These commands will return the largest 10 directories on a Linux box.</p>
<pre name="code" class="css">

du -k / | sort -n | tail -10
</pre>
<p>via <a href="http://www.peterbe.com/plog/du-k">peterbe.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/find-largest-directories-on-a-linux-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find recently modified files in Linux</title>
		<link>http://iandunn.name/workblog/110/</link>
		<comments>http://iandunn.name/workblog/110/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 20:53:01 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=110</guid>
		<description><![CDATA[This will list all the files on a Linux system that were modified in the past 5 days


find /path/to/start/at -mtime -5 -print

]]></description>
			<content:encoded><![CDATA[<p>This will list all the files on a Linux system that were modified in the past 5 days</p>
<pre name="code" class="css">

find /path/to/start/at -mtime -5 -print
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/110/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding a string inside multiple files on Linux</title>
		<link>http://iandunn.name/workblog/finding-a-string-inside-multiple-files-on-linux/</link>
		<comments>http://iandunn.name/workblog/finding-a-string-inside-multiple-files-on-linux/#comments</comments>
		<pubDate>Thu, 21 May 2009 15:44:50 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=96</guid>
		<description><![CDATA[Snipplr has a good article on how to find all of the files on a Linux system that contain a specific string.


find /the/path/to/start/at &#124;xargs grep &#039;the string&#039; -sl

The search will include subfolders.
]]></description>
			<content:encoded><![CDATA[<p>Snipplr has a good article on <a href="http://snipplr.com/view/13800/linux-find-in-files/">how to find all of the files on a Linux system that contain a specific string</a>.</p>
<pre name="code" class="css">

find /the/path/to/start/at |xargs grep &#039;the string&#039; -sl
</pre>
<p>The search will include subfolders.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/finding-a-string-inside-multiple-files-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing the Oracle Library for PHP</title>
		<link>http://iandunn.name/workblog/88/</link>
		<comments>http://iandunn.name/workblog/88/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 17:36:59 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=88</guid>
		<description><![CDATA[Chris Sibert wrote a good tutorial on installing the Oracle library for PHP. If you&#8217;re running SELinux, I&#8217;d recommend temporarily turning it off to get the module setup so you don&#8217;t have to worry about problems during the install, and then turn SELinux back on after you verify the module is working. Then you can [...]]]></description>
			<content:encoded><![CDATA[<p>Chris Sibert wrote a good tutorial on <a href="http://www.chrissibert.com/blog/2008/06/18/compiling-an-oracle-instant-client-oci8-php-module-in-rhel-51/">installing the Oracle library for PHP</a>. If you&#8217;re running SELinux, I&#8217;d recommend temporarily <a href="http://www.crypt.gen.nz/selinux/disable_selinux.html">turning it off</a> to get the module setup so you don&#8217;t have to worry about problems during the install, and then turn SELinux back on after you verify the module is working. Then you can update SELinux&#8217;s policy to allow Apache and PHP to do everything they need to do.</p>
<p>After you&#8217;ve got the module working working you can just put the database server&#8217;s hostname and port in the db parameter of oci_connect(), rather than messing with a tnsnames.ora file.</p>
<pre name="code" class="php">

oci_connect(&#039;username&#039;, &#039;password&#039;, &#039;127.0.0.1:1521/dbname&#039;);
</pre>
<p><strong>Update: </strong><a href="http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf">The Underground PHP and Oracle Manual</a> has a lot of information on installation, and also a good section on tuning. oci_pconnect() can be used to create a persistent connection to the database server, rather than creating a new one during each script instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
