<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Jabablog &#187; linux</title>
	<atom:link href="http://blog.jabawoki.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jabawoki.com</link>
	<description>Nothing to see here, Move along...</description>
	<lastBuildDate>Fri, 05 Mar 2010 13:17:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>2006-2010 </copyright>
		<managingEditor>jay@jabawoki.com (Jabawoki)</managingEditor>
		<webMaster>jay@jabawoki.com (Jabawoki)</webMaster>
		<category>music</category>
		<ttl>1440</ttl>
		<itunes:keywords>House,electro,hard,mix,dj,hardcore,hardstyle,trance, progressive, house, music, hardcore, handbag, happy, tech, deep, security, infosec, itsec, jay, abbott, jay abbott, jabawoki</itunes:keywords>
		<itunes:subtitle>Jabawoki Presents: </itunes:subtitle>
		<itunes:summary>House Music Mixes, everything from electro to hard, from 2000 onwards, courtesy of Jabawoki.</itunes:summary>
		<itunes:author>Jabawoki</itunes:author>
		<itunes:category text="Music"/>
<itunes:category text="Games &amp; Hobbies">
	<itunes:category text="Hobbies"/>
</itunes:category>
<itunes:category text="Technology"/>
		<itunes:owner>
			<itunes:name>Jabawoki</itunes:name>
			<itunes:email>jay@jabawoki.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://blog.jabawoki.com/wp-content/plugins/podpress/images/SubSide-Large.jpg" />
		<image>
			<url>http://blog.jabawoki.com/wp-content/plugins/podpress/images/SubSide-small.jpg</url>
			<title>Jabablog</title>
			<link>http://blog.jabawoki.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Architecures RISC or x86?</title>
		<link>http://blog.jabawoki.com/2008/07/13/architecures-risc-or-x86/</link>
		<comments>http://blog.jabawoki.com/2008/07/13/architecures-risc-or-x86/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 18:59:46 +0000</pubDate>
		<dc:creator>Jabs</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.jabawoki.com/?p=53</guid>
		<description><![CDATA[I have been working with a large retailer of late who is a heavy user of Sun &#38; Solaris. As you can imagine, this is perfectly normal, and in fact, considered best practice for what they are doing. That said though, in an area such as retail, with low margins and profits based on sheer [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with a large retailer of late who is a heavy user of Sun &amp; Solaris. As you can imagine, this is perfectly normal, and in fact, considered best practice for what they are doing. That said though, in an area such as retail, with low margins and profits based on sheer quantity, surely a leap of faith into the &#8220;dark side&#8221; or as we prefer to call it, Linux, would be a better option?<span id="more-53"></span></p>
<p>Once upon a time the argument was simple, RISC architecture was simply ahead of the game, by a long way, but guess what, x86 grew up, caught up, and overtook. These days, the performance you get out of multi-core x86 is significantly more than it&#8217;s RISC based equivalent. I realise that point could be considered contentious by the purists out there, but for mainstream computing in a world that is ever more cost concious, I struggle see how any argument for RISC can win over x86.</p>
<p>Once you have your x86 base, you can go with an x86 version of Solaris (not that you would) or thanks to Sun not playing silly games, you can actually use something useful, such as Redhat, Suse, Ubuntu or if you so desire, Novell.This additional flexibility is core to getting the base of your platform right. Large scale architectures need solid foundations to remain stable, perform and scale as desired.</p>
<p>Lets consider it for a moment. Sparc vs x86 &amp; Solaris vs Linux, well to be honest, there is barley anything in the comparison except cost. Sun make x86 hardware based on multi-core AMD processors which are blisteringly fast and being manufactured by Sun, they are rock solid.</p>
<p>Now. If I were that retailer, I know where I would be looking to spend my money, but thats not what I am there to talk to them about, so I&#8217;ll keep it for my blog and not overstep my scope.</p>
<div class='wp_likes' id='wp_likes_post-53'><a class='like' href="javascript:wp_likes.like(53);" title='' ><img src="http://blog.jabawoki.com/wp-content/plugins/wp-likes/images/like.png" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(53);">Unlike</a></div>
</div>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F&amp;title=Architecures+RISC+or+x86%3F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F&amp;title=Architecures+RISC+or+x86%3F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F&amp;title=Architecures+RISC+or+x86%3F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F&amp;headline=Architecures+RISC+or+x86%3F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Architecures+RISC+or+x86%3F&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Architecures+RISC+or+x86%3F&amp;u=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Architecures+RISC+or+x86%3F&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Architecures+RISC+or+x86%3F&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Architecures+RISC+or+x86%3F&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F&amp;title=Architecures+RISC+or+x86%3F&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F13%2Farchitecures-risc-or-x86%2F&amp;title=Architecures+RISC+or+x86%3F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	Tags: <a href="http://blog.jabawoki.com/tag/linux/" title="linux" rel="tag">linux</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.jabawoki.com/2008/07/02/snort-rocks/" title="Snort Rocks! (July 2, 2008)">Snort Rocks!</a> (2)</li>
	<li><a href="http://blog.jabawoki.com/2008/07/06/linux-defence-tweaks/" title="Linux Defence Tweaks (July 6, 2008)">Linux Defence Tweaks</a> (0)</li>
	<li><a href="http://blog.jabawoki.com/2008/07/05/free-security-for-all/" title="Free Security for All! (July 5, 2008)">Free Security for All!</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.jabawoki.com/2008/07/13/architecures-risc-or-x86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Defence Tweaks</title>
		<link>http://blog.jabawoki.com/2008/07/06/linux-defence-tweaks/</link>
		<comments>http://blog.jabawoki.com/2008/07/06/linux-defence-tweaks/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 19:13:11 +0000</pubDate>
		<dc:creator>Jabs</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[InfoSec]]></category>

		<guid isPermaLink="false">http://blog.jabawoki.com/?p=52</guid>
		<description><![CDATA[If your planning on using Linux in a hostile environment, i.e. the Internet! then its worth thinking about some simple little tweaks to the TCP/IP stack in conjunction with some funky firewall madness to keep your box your own, and not end up &#8220;owned&#8221; too quickly!
Lets start with the TCP/IP stack. There are a number [...]]]></description>
			<content:encoded><![CDATA[<p>If your planning on using Linux in a hostile environment, i.e. the Internet! then its worth thinking about some simple little tweaks to the TCP/IP stack in conjunction with some funky firewall madness to keep your box your own, and not end up &#8220;owned&#8221; too quickly!</p>
<p>Lets start with the TCP/IP stack. There are a number of quick easy wins here that can help defend against attacks through making the default behaviours of the stack more in-line with what we would like:<span id="more-52"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>eth0<span style="color: #000000; font-weight: bold;">/</span>rp_filter
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>lo<span style="color: #000000; font-weight: bold;">/</span>rp_filter
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>all<span style="color: #000000; font-weight: bold;">/</span>log_martians
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>lo<span style="color: #000000; font-weight: bold;">/</span>log_martians
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>icmp_ignore_bogus_error_responses
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>icmp_echo_ignore_broadcasts
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>icmp_echo_ignore_all
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>all<span style="color: #000000; font-weight: bold;">/</span>accept_source_route
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>all<span style="color: #000000; font-weight: bold;">/</span>send_redirects
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>all<span style="color: #000000; font-weight: bold;">/</span>accept_redirects
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>all<span style="color: #000000; font-weight: bold;">/</span>secure_redirects
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>ip_dynaddr
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_fin_timeout
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1800&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_keepalive_time
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;15&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>ipfrag_time
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;2048&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_max_syn_backlog
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;32768 61000&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>ip_local_port_range
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_synack_retries</pre></div></div>

<p>Now, that little lot above needs some caveats. Firstly, use at your own risk! Secondly, As per usual, you often get a small performance hit when you start getting more secure, so test each tweak fully before you go into production. Once your happy with the ones you like, add then to your /etc/rc.local or other start up file of your choice.</p>
<p>The next step is to use iptables to help deal with dodgy looking traffic.</p>
<p><strong>Step 1</strong>, set-up a bunch of new chains:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-N</span> CHECK_FLAGS
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-N</span> ALLOW_ICMP
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-N</span> SRC_EGRESS
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-N</span> DST_EGRESS</pre></div></div>

<p><strong>Step 2</strong>, now lets get those chains to do something useful:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> CHECK_FLAGS <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--tcp-flags</span> ALL FIN,URG,PSH <span style="color: #660033;">-m</span> limit
        <span style="color: #660033;">--limit</span> <span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">/</span>minute <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-level</span> <span style="color: #007800;">$LOG_LEVEL</span> <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">&quot;NMAP-XMAS:&quot;</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> CHECK_FLAGS <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--tcp-flags</span> ALL FIN,URG,PSH <span style="color: #660033;">-j</span> DROP
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> CHECK_FLAGS <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--tcp-flags</span> SYN,RST SYN,RST <span style="color: #660033;">-m</span> limit
        <span style="color: #660033;">--limit</span> <span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">/</span>minute <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-level</span> <span style="color: #007800;">$LOG_LEVEL</span> <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">&quot;SYN/RST:&quot;</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> CHECK_FLAGS <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--tcp-flags</span> SYN,RST SYN,RST <span style="color: #660033;">-j</span> DROP
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> CHECK_FLAGS <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--tcp-flags</span> SYN,FIN SYN,FIN <span style="color: #660033;">-m</span> limit
        <span style="color: #660033;">--limit</span> <span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">/</span>minute <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-level</span> <span style="color: #007800;">$LOG_LEVEL</span> <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">&quot;SYN/FIN:&quot;</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> CHECK_FLAGS <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--tcp-flags</span> SYN,FIN SYN,FIN <span style="color: #660033;">-j</span> DROP
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> ALLOW_ICMP <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">--icmp-type</span> echo-reply <span style="color: #660033;">-j</span> ACCEPT
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> ALLOW_ICMP <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">--icmp-type</span> destination-unreachable
        <span style="color: #660033;">-j</span> ACCEPT
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> ALLOW_ICMP <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">--icmp-type</span> echo-request <span style="color: #660033;">-j</span> ACCEPT
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> ALLOW_ICMP <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">--icmp-type</span> time-exceeded <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
        <span style="color: #000000; font-weight: bold;">for</span> SRCNET <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$EGRESS_NETS</span>; <span style="color: #000000; font-weight: bold;">do</span>
                <span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> SRC_EGRESS <span style="color: #660033;">-s</span> <span style="color: #007800;">$SRCNET</span> <span style="color: #660033;">-j</span> DROP
        <span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">for</span> DSTNET <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$EGRESS_NETS</span>; <span style="color: #000000; font-weight: bold;">do</span>
                <span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> DST_EGRESS <span style="color: #660033;">-d</span> <span style="color: #007800;">$DSTNET</span> <span style="color: #660033;">-j</span> DROP
        <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p><strong>Step 3</strong>, Apply the prior two steps to your input, forward and output chains as needed:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> <span style="color: #007800;">$CHAIN</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$EXT_INT</span> <span style="color: #660033;">-j</span> SRC_EGRESS
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> <span style="color: #007800;">$CHAIN</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$EXT_INT</span> <span style="color: #660033;">-j</span> DST_EGRESS
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> <span style="color: #007800;">$CHAIN</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$EXT_INT</span> <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-j</span> ALLOW_ICMP
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> <span style="color: #007800;">$CHAIN</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$EXT_INT</span> <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-j</span> CHECK_FLAGS</pre></div></div>

<p>Variables. In all of the above, variables are used to save typing!, here are some of the important variables, the rest are fairly self explanatory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">EGRESS_NETS</span>=<span style="color: #ff0000;">&quot;
        172.16.0.0/12
        224.0.0.0/4
        240.0.0.0/5
        14.0.0.0/8
        169.254.0.0/16
        172.16.0.0/12
        192.0.2.0/24
        192.88.99.0/24
        192.18.0.0/15
        0.0.0.0/8
        &quot;</span></pre></div></div>

<p>What we have just done is setup some new chains, apply some filters that can identify dodgy looking traffic and do something useful with it (limit it rather than drop it, as we don&#8217;t want to arouse suspicion with our attackers). Then apply all that nice Packet Mangling to each of our primary chains.</p>
<p>I provide all of this advice for free, with no guarantees, any use of the above code should be with full testing prior to its use in a production environment. Enjoy!</p>
<div class='wp_likes' id='wp_likes_post-52'><a class='like' href="javascript:wp_likes.like(52);" title='' ><img src="http://blog.jabawoki.com/wp-content/plugins/wp-likes/images/like.png" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(52);">Unlike</a></div>
</div>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F&amp;title=Linux+Defence+Tweaks"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F&amp;title=Linux+Defence+Tweaks"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F&amp;title=Linux+Defence+Tweaks"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F&amp;headline=Linux+Defence+Tweaks"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Linux+Defence+Tweaks&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Linux+Defence+Tweaks&amp;u=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Linux+Defence+Tweaks&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Linux+Defence+Tweaks&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Linux+Defence+Tweaks&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F&amp;title=Linux+Defence+Tweaks&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.jabawoki.com%2F2008%2F07%2F06%2Flinux-defence-tweaks%2F&amp;title=Linux+Defence+Tweaks"><img class="lightsocial_img" src="http://blog.jabawoki.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	Tags: <a href="http://blog.jabawoki.com/tag/infosec/" title="InfoSec" rel="tag">InfoSec</a>, <a href="http://blog.jabawoki.com/tag/linux/" title="linux" rel="tag">linux</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.jabawoki.com/2008/07/02/snort-rocks/" title="Snort Rocks! (July 2, 2008)">Snort Rocks!</a> (2)</li>
	<li><a href="http://blog.jabawoki.com/2008/07/05/free-security-for-all/" title="Free Security for All! (July 5, 2008)">Free Security for All!</a> (0)</li>
	<li><a href="http://blog.jabawoki.com/2008/11/26/the-asymmetry-of-security/" title="The Asymmetry of Security (November 26, 2008)">The Asymmetry of Security</a> (0)</li>
	<li><a href="http://blog.jabawoki.com/2008/11/19/security-as-a-career/" title="Security as a Career (November 19, 2008)">Security as a Career</a> (0)</li>
	<li><a href="http://blog.jabawoki.com/2010/01/17/press-coverage-january-2010/" title="Press Coverage &#8211; January 2010 (January 17, 2010)">Press Coverage &#8211; January 2010</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.jabawoki.com/2008/07/06/linux-defence-tweaks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
