<?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>King of the Potato People &#187; Linux</title>
	<atom:link href="http://www.potato-people.com/blog/category/geek/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.potato-people.com/blog</link>
	<description>Code, photos and ramblings of Rick Hodger</description>
	<lastBuildDate>Thu, 12 Jan 2012 15:27:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Postfix Mail Queue statistics via SNMP</title>
		<link>http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/</link>
		<comments>http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 16:30:21 +0000</pubDate>
		<dc:creator>rick</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.potato-people.com/blog/?p=55</guid>
		<description><![CDATA[<a href="http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/" title="Postfix Mail Queue statistics via SNMP"></a>This post documents a small shell script designed to provide basic mail queue statistics via SNMP for Postfix. Requirements Postfix Net-SNMP Installation The code can be downloaded here. To install, place the script anywhere in your system and edit it &#8230;<p class="read-more"><a href="http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/" title="Postfix Mail Queue statistics via SNMP"></a><p>This post documents a small shell script designed to provide basic mail queue statistics via SNMP for Postfix.</p>
<p><strong>Requirements</strong></p>
<ul>
<li><a href="http://www.postfix.org/">Postfix</a></li>
<li><a href="http://www.net-snmp.org">Net-SNMP</a></li>
</ul>
<p><strong>Installation</strong></p>
<p>The code can be downloaded <a href="http://www.potato-people.com/code/misctools/snmpqshape.sh.gz">here</a>.</p>
<p>To install, place the script anywhere in your system and edit it to provide the correct path to the &#8220;qshape&#8221; perl script that comes with Postfix.</p>
<p><em>Note: Under openSUSE qshape.pl is part of the postfix-docs package and is not installed by default.</em></p>
<p>To configure net-snmp, edit your snmpd.conf line and add a line as follows:</p>
<p><code>pass [oid-of-choice] /bin/snmpqshape.sh [oid-of-choice]</code></p>
<p>For example, due to a quirk in a paticular SNMP monitoring package I use, I had to use an OID belonging to Motorola:</p>
<p><code>pass .1.3.6.1.4.1.17713.2 /bin/snmpqshape.sh .1.3.6.1.4.1.17713.2</code></p>
<p>Net-SNMP will return 3 OIDs on query:</p>
<p><code>.0 :: Incoming<br />
.1 :: Active<br />
.2 :: Deferred</code></p>
<p><strong>MRTG / RRDTool</strong></p>
<p>Since the setup of monitoring / statistics tools such as MRTG or RRDTool is site-specific, no provisions are made on this page to provide a complete usage example. A minimal example for RRDTool:<br />
<code>#! /bin/sh<br />
STR="`snmpwalk -OvQ -r 10 -t 5 -v 2c -c publicommunity hostname.site.com \<br />
.1.3.6.1.4.1.17713.2 | perl -ne 's/^/:/;s/\n//;print'`"<br />
rrdtool update /path/to/rr-database.rrd -t incoming:active:deferred N${STR}</code></p>
<p><strong>DISCLAIMER</strong><br />
This code is free to use and distribute, and the author offers no liability or warranty for it&#8217;s misuse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.potato-people.com/blog/2009/06/postfix-mail-queue-statistics-via-snmp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Limit total bandwidth on Linux</title>
		<link>http://www.potato-people.com/blog/2008/11/limit-total-bandwidth-on-linux/</link>
		<comments>http://www.potato-people.com/blog/2008/11/limit-total-bandwidth-on-linux/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 11:35:29 +0000</pubDate>
		<dc:creator>rick</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[bits]]></category>
		<category><![CDATA[bytes]]></category>

		<guid isPermaLink="false">http://www.potato-people.com/blog/?p=29</guid>
		<description><![CDATA[<a href="http://www.potato-people.com/blog/2008/11/limit-total-bandwidth-on-linux/" title="Limit total bandwidth on Linux"></a>Want to limit the total bandwidth available to a Linux server, and don&#8217;t want to do it at the switch or router? Here&#8217;s how! Simply use the Linux traffic control tools as follows. First enter: tc qdisc add dev eth0 &#8230;<p class="read-more"><a href="http://www.potato-people.com/blog/2008/11/limit-total-bandwidth-on-linux/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.potato-people.com/blog/2008/11/limit-total-bandwidth-on-linux/" title="Limit total bandwidth on Linux"></a><p>Want to limit the total bandwidth available to a Linux server, and don&#8217;t want to do it at the switch or router? Here&#8217;s how!</p>
<p><span id="more-29"></span></p>
<p>Simply use the Linux traffic control tools as follows. First enter:</p>
<p><code>tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 100mbit</code></p>
<p>Now enter the following line. This line sets the bandwidth rate; note the &#8220;256kbit&#8221;. This will limit our server to 256Kbps.</p>
<p><code>tc class add dev eth0 parent 1: classid 1:1 cbq rate 256kbit allot 1500 prio 5 bounded isolated</code></p>
<p>And lastly:</p>
<p><code>tc filter add dev eth0 parent 1: protocol ip prio 16 u32 match ip dst 0/0 flowid 1:1</code></p>
<p>For more informtation on how this works, type &#8216;man tc&#8217; at your console.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.potato-people.com/blog/2008/11/limit-total-bandwidth-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making your webserver a little bit more secure.</title>
		<link>http://www.potato-people.com/blog/2008/04/making-your-webserver-a-little-bit-more-secure/</link>
		<comments>http://www.potato-people.com/blog/2008/04/making-your-webserver-a-little-bit-more-secure/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 09:39:14 +0000</pubDate>
		<dc:creator>rick</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[loopback]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.potato-people.com/blog/?p=3</guid>
		<description><![CDATA[<a href="http://www.potato-people.com/blog/2008/04/making-your-webserver-a-little-bit-more-secure/" title="Making your webserver a little bit more secure."></a>The most common attack vector on Linux web servers, is to get something uploaded onto the server that can then be executed. Most of these automated attacks try to put their payload into /tmp, which is universally writable by any &#8230;<p class="read-more"><a href="http://www.potato-people.com/blog/2008/04/making-your-webserver-a-little-bit-more-secure/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.potato-people.com/blog/2008/04/making-your-webserver-a-little-bit-more-secure/" title="Making your webserver a little bit more secure."></a><p>The most common attack vector on Linux web servers, is to get something uploaded onto the server that can then be executed. Most of these automated attacks try to put their payload into /tmp, which is universally writable by any user, and then execute it.</p>
<p>But what if they couldn&#8217;t execute it?</p>
<p><span id="more-3"></span></p>
<p>This is an easy way to beef up your webserver server security a little. Create a 1GB partition on your system, and in your fstab file, add a &#8220;noexec flag&#8221; like so:</p>
<p><code>/dev/sda3 /tmp ext3 acl,user_xattr,<strong>noexec</strong> 1 1</code></p>
<p>Now, the system will prevent any executable in /tmp from being executed and thus sealing off the most common flaw that allows for most automated attacks to work.</p>
<p>No unallocated space on your disk and don&#8217;t want to risk resizing? Use a <a href="http://www.faqs.org/docs/Linux-mini/Loopback-Root-FS.html" target="_blank">loopback filesystem</a>.</p>
<p><code>/dev/loop0 /tmp ext3 acl,user_xattr,<strong>noexec</strong> 1 1</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.potato-people.com/blog/2008/04/making-your-webserver-a-little-bit-more-secure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

