<?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>ArvinderKang.com &#187; security</title>
	<atom:link href="http://arvinderkang.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://arvinderkang.com</link>
	<description>The world is my backyard.</description>
	<lastBuildDate>Thu, 29 Jul 2010 22:58: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>Postfix install and Security talk</title>
		<link>http://arvinderkang.com/2009/03/07/postfix-install-and-security-talk/</link>
		<comments>http://arvinderkang.com/2009/03/07/postfix-install-and-security-talk/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 20:48:10 +0000</pubDate>
		<dc:creator>Arvinder Kang</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://arvinderkang.com/2009/03/07/postfix-install-and-security-talk/</guid>
		<description><![CDATA[Once your OS is grown enough to play (I mean installed), you have to sit down with it and do the SECURITY TALK. A little on the philosophical side of it, I think sense of security is just a fad &#8230; <a href="http://arvinderkang.com/2009/03/07/postfix-install-and-security-talk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://arvinderkang.com/wp-content/uploads/2009/03/father-son.jpg" alt="Father son" /></p>

<p>Once your OS is grown enough to play (I mean installed), you have to sit down with it and do the <strong>SECURITY TALK</strong>.</p>

<p>A little on the philosophical side of it, I think sense of security is just a fad and a perception. You are secure when you start feeling it, or we can keep on going paranoid tweaking it deeper and deeper, there will always exploits to to be known, more tools to be learnt, more WMDs to be discovered!</p>

<p>Always have a second plan- backup your data.</p>

<p>Lets get back to our Linux Box.</p>

<p><span id="more-185"></span>
One of the requirements that our installs are going to have is a mail server. The linux box can email me complaining it has stomach ache, or any activity that goes on it.</p>

<p>TechRepublic has an <a href="http://articles.techrepublic.com.com/5100-10878_11-5034523.html" title="Build Your Skills: Open source e-mail server setup">old, yet not obsolete article</a> for recipe indegrients of a mail server. We just need postfix.</p>

<p>After <a href="http://articles.techrepublic.com.com/5100-10878_11-5034638.html" title="Configure IT Quick: Set up a basic e-mail server with Postfix as the MTA">some reading</a> about postfix, here is the route I took</p>

<pre><code>$ sudo aptitude install postfix
</code></pre>

<p>Now head over to the <a href="http://www.postfix.org/BASIC_CONFIGURATION_README.html" title="Postfix Basic Configuration">postfix configuration documentation</a> and tweak the settings. The only change I did was to make sure that my server is relaying mail originating only from local machine.</p>

<pre><code>$ sudo vi /etc/postfix/main.cf
    mynetworks = 127.0.0.0/8
</code></pre>

<p>Save and exit. Now reload the changes.</p>

<pre><code>$ postfix reload
</code></pre>

<p><a href="http://arvinderkang.com/2009/02/27/ubuntu-install-on-xserve-g5" title="Ubuntu Install on XServe G5 | ArvinderKang.com">Remember</a>? We had put up a firewall on this box. However, nmap scan from another machine shows port 25 open (smtp being used by postfix.) Lets add some rules. User <code>--dry-run</code> to test command syntax.</p>

<pre><code>sudo --dry-run ufw deny proto tcp from 0.0.0.0/0 to xx.xx.xx.xx port 25
sudo ufw deny proto tcp from 0.0.0.0/0 to xx.xx.xx.xx port 25
</code></pre>

<p>I think, I&#8217;m not as happy with ufw. Its good for starters, however it does not have advanced flexibility. I&#8217;m going to return to <a href="http://www.shorewall.net/" title="Shoreline Firewall">Shorewall</a> within coming weeks.</p>

<p>Although linux machines hardly have the risk of being affected by viruses, still they can be threatened by trojans, worms by a vital part replaced by a <a href="http://en.wikipedia.org/wiki/Rootkit" title="Rootkit - Wikipedia, the free encyclopedia">rootkit</a>.</p>

<p><a href="http://www.chkrootkit.org/" title="chkrootkit -- locally checks for signs of a rootkit">chkrootkit</a> is a tool to locally check for signs of a rootkit.</p>

<pre><code>$ sudo aptitude install chkrootkit  
$ sudo chkrootkit
</code></pre>

<p>The run returned system not infected. Next lets install <a href="http://www.rootkit.nl/projects/rootkit_hunter.html" title="Rootkit Hunter">Rootkit Hunter</a>. .Rootkit scanner is scanning tool to ensure you for about 99.9%* you&#8217;re clean of nasty tools. This tool scans for rootkits, backdoors and local exploits.</p>

<pre><code>$ sudo aptitude install rkhunter
$ sudo rkhunter -c --skip-keypress
</code></pre>

<p>We came out clean.</p>

<p>Next I should look at <a href="http://www.novell.com/linux/security/apparmor/" title="AppArmor Linux Application Security">AppArmour</a> and <a href="http://www.grsecurity.net/" title="grsecurity">GRSecurity</a>. However there are other things crying for my attention. I&#8217;ll come back to them later.</p>

<p>The security paranoids can look at <a href="http://sectools.org/index.html" title="Top 100 Network Security Tools">top 100 security tools</a>.</p>

<p>Photo credits: GD Senior @ Flickr</p>
]]></content:encoded>
			<wfw:commentRss>http://arvinderkang.com/2009/03/07/postfix-install-and-security-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->