<?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>Brandon&#039;s Blog &#187; ebuild</title>
	<atom:link href="http://www.brandonturner.net/blog/tag/ebuild/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brandonturner.net/blog</link>
	<description>Random thoughts on web applications, software development and Linux</description>
	<lastBuildDate>Thu, 08 Apr 2010 01:47:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Gentoo ebuild for qmail with JMS1 combined patch</title>
		<link>http://www.brandonturner.net/blog/2009/04/qmail-jms1-ebuild/</link>
		<comments>http://www.brandonturner.net/blog/2009/04/qmail-jms1-ebuild/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 05:07:00 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[ebuild]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=255</guid>
		<description><![CDATA[In a previous post, I introduced a patch to add DKIM and DomainKeys support to Qmail with John Simpson&#8217;s combined patch. In this post I&#8217;ll introduce the ebuild I wrote (well, modified) to allow easily installing qmail-jms1 on a Gentoo system. Though this ebuild makes installing qmail with John&#8217;s patch a little easier, it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://www.brandonturner.net/blog/2009/03/dkim-and-domainkeys-for-qmail/">previous post</a>, I introduced a patch to add DKIM and DomainKeys support to Qmail with <a href="http://qmail.jms1.net/patches/combined.shtml">John Simpson&#8217;s combined patch</a>.  In this post I&#8217;ll introduce the ebuild I wrote (well, modified) to allow easily installing <em>qmail-jms1</em> on a Gentoo system.</p>
<p>Though this ebuild makes installing qmail with John&#8217;s patch a little easier, it doesn&#8217;t make administering a qmail system child&#8217;s play.  Before merging this ebuild, you should read through <a href="http://qmail.jms1.net">John&#8217;s website</a>.  You may also want to read about <a href="http://www.gentoo.org/doc/en/qmail-howto.xml">netqmail on Gentoo</a>.  While this ebuild has nothing to do with netqmail, it does borrow some the conventions presented in the Gentoo doc concerning starting, stopping and controlling qmail.</p>
<p>I didn&#8217;t include any of John&#8217;s run scripts or configuration files.  Only the combined patch is applied to the base qmail image.  I&#8217;ve also included some additional patches I&#8217;ve found useful.  They are described in more detail on my <a href="http://www.bltweb.net/qmail">qmail patches page</a>.  Most of my extra patches are controlled by use flags (<code>dkim, ipv6</code>) and not applied by default.</p>
<p>For the impatient, here is a direct link to the ebuild:<br />
<a href="http://svn.bltweb.net/repos/public/gentoo_overlay/mail-mta/qmail-jms1/qmail-jms1-7.08-r1.ebuild">http://svn.bltweb.net/repos/public/gentoo_overlay/mail-mta/qmail-jms1/qmail-jms1-7.08-r1.ebuild</a></p>
<h4>Install my portage overlay</h4>
<p>The easiest way to use the qmail-jms1 ebuild is to use my <a href="http://www.brandonturner.net/blog/gentoo-overlay/">Gentoo Portage Overlay</a>.  Please see the <a href="http://www.brandonturner.net/blog/gentoo-overlay/">overlay page</a> for instructions on how to set it up.</p>
<p>You will need the following ebuilds from my overlay:</p>
<ul class="noseparation">
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/virtual/qmail/">virtual/qmail</a></li>
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/mail-mta/qmail-jms1/">mail-mta/qmail-jms1</a></li>
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/sys-apps/ucspi-tcp/">sys-apps/ucspi-tcp</a></li>
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/mail-filter/libdkim/">mail-filter/libdkim</a> (only needed if using the <code>dkim</code> use flag)</li>
</ul>
<h4>Install Qmail</h4>
<p>Once the overlay is set up, installing qmail-jms1 is easy.</p>
<p>Add the following to your <code>/etc/portage/package.keywords</code> file:</p>
<div class="file">
mail-mta/qmail-jms1<br />
sys-apps/ucspi-tcp<br />
mail-filter/libdkim<br />
# You may also need these:<br />
net-mail/dot-forward<br />
sys-process/daemontools<br />
sys-apps/ucspi-ssl<br />
virtual/checkpassword<br />
net-mail/checkpassword-pam
</div>
<p>Now install qmail-jms1:</p>
<div class="prompt">
$ <span class="cmd">emerge -pv qmail-jms1</span><br />
$ <span class="cmd">sudo emerge qmail-jms1</span>
</div>
<h4>Configure Qmail</h4>
<p>Yeah right&#8230;  There is plenty of documentation elsewhere for this.  Try <a href="http://qmail.jms1.net/">John&#8217;s website</a>.</p>
<h4>Start Qmail</h4>
<div class="prompt">
# <span class="cmd">ln -s /var/qmail/supervise/qmail-send /service/qmail-send</span><br />
# <span class="cmd">ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd</span><br />
# <span class="cmd">rc-update add svscan default</span><br />
# <span class="cmd">/etc/init.d/svscan start</span>
</div>
<p>&nbsp;<br />
&nbsp;<br />
That&#8217;s all I have for now.  Installing, configuring and administering qmail should not be taken lightly.  This ebuild has made it easier for me to set up and maintain my servers, however you should only consider using it if you are already familiar with setting up a qmail server.</p>
<p>Feel free to leave any comments, suggestions or problems below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/04/qmail-jms1-ebuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scan for Conficker with Nmap 4.85 beta5 Gentoo ebuild</title>
		<link>http://www.brandonturner.net/blog/2009/03/nmap-485_beta5_ebuild/</link>
		<comments>http://www.brandonturner.net/blog/2009/03/nmap-485_beta5_ebuild/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 22:31:36 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[ebuild]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=205</guid>
		<description><![CDATA[Use this Gentoo ebuild to emerge nmap 4.85 beta5 to scan for the conficker worm on your network.]]></description>
			<content:encoded><![CDATA[<p>On Monday <a href="http://www.doxpara.com/">Dan Kaminsky</a>, along with the <a href="http://www.honeynet.org/">Honeynet Project&#8217;s</a> Tillmann Werner and Felix Lede announced they discovered the ability to detect if a machine is infected with the Conficker worm by scanning a network.  See <a href="http://www.doxpara.com/?p=1285">Dan&#8217;s post</a> for more information.  Shortly thereafter, version 4.85BETA5 of the <a href="http://nmap.org/">nmap</a> tool was released to allow remote scanning for the Conficker worm.</p>
<p>As April 1st is just a few hours away (I guess it&#8217;s already here in some parts of the world), I wanted to scan my network using the latest version of the nmap tool.  As Gentoo doesn&#8217;t have an ebuild yet, I quickly created one and thought I&#8217;d share it.</p>
<p>This file contains everything you need:<br />
<a href='http://www.brandonturner.net/blog/wp-content/uploads/2009/03/nmap-485_beta5ebuild.tgz'>Nmap 4.85BETA5 ebuild</a></p>
<h4>Installing Nmap 4.85BETA5</h4>
<div class="prompt">
$ <span class="cmd">cd ~</span><br />
$ <span class="cmd">wget <a href='http://www.brandonturner.net/blog/wp-content/uploads/2009/03/nmap-485_beta5ebuild.tgz'>http://www.brandonturner.net/blog/wp-content/uploads/2009/03/nmap-485_beta5ebuild.tgz</a></span><br />
$ <span class="cmd">sudo mkdir -p /usr/local/portage</span><br />
$ <span class="cmd">cd /usr/local/portage</span><br />
$ <span class="cmd">sudo tar -xzf ~/nmap-485_beta5ebuild.tgz</span><br />
$ <span class="cmd">echo &#39;=net-analyzer/nmap-4.85_beta5&#39; | sudo tee -a /etc/portage/package.keywords</span><br />
$ <span class="cmd">echo &#39;net-analyzer/nmap lua&#39; | sudo tee -a /etc/portage/package.use</span><br />
$ <span class="cmd">emerge -pv nmap</span><br />
<span style="color: red;">(If emerge doesn&#8217;t show that it will emerge nmap-4.85_beta5, ensure you have <code>PORTDIR_OVERLAY="/usr/local/portage"</code> in your <code>/etc/make.conf</code> file)</span><br />
$ <span class="cmd">sudo emerge nmap</span>
</div>
<h4>Scanning for Conficker</h4>
<p><a href="http://insecure.org/">insecure.org</a> has some instructions on how to scan for Conficker.  Basically, here is what I did to scan a 192.168.1.0/24 network:</p>
<div class="prompt">
$ <span class="cmd">cd ~</span><br />
$ <span class="cmd">nmap -sC &#45;&#45;script=smb-check-vulns &#45;&#45;script-args=safe=1 -p445  -d -PN -n -T4 &#45;&#45;min-hostgroup 256 &#45;&#45;min-parallelism 64 <span style="color: green;">192.168.1.0/24</span> | tee conficker_scan.txt | grep -P &#39;Host \d|Conficker&#39; | grep -B 1 &#39;Conficker&#39;</span>
</div>
<p>This stores the complete output of the nmap command in <code>conficker_scan.txt</code>, but displays a quick-and-dirty summary to <code>stdout</code>.  Your milage may vary.  Obviously you should edit the network address (in <span style="color: green;">green</span> above) for your network.</p>
<p>You should see something like:</p>
<pre>
Host 192.168.1.101 appears to be up ... good.
|  Conficker: Likely CLEAN
--
Host 192.168.1.102 appears to be up ... good.
|  Conficker: Likely CLEAN
--
Host 192.168.1.103 appears to be up ... good.
|  Conficker: Likely CLEAN
--
Host 192.168.1.104 appears to be up ... good.
|  Conficker: Likely INFECTED
--
</pre>
<p>Linux boxes usually return something like <code>Conficker: ERROR: NT_STATUS_OBJECT_NAME_NOT_FOUND</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/03/nmap-485_beta5_ebuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
