<?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>Inliniac &#187; load balancing</title>
	<atom:link href="http://www.inliniac.net/blog/tag/load-balancing/feed" rel="self" type="application/rss+xml" />
	<link>http://www.inliniac.net/blog</link>
	<description>Everything inline.</description>
	<lastBuildDate>Wed, 11 Jan 2012 19:09:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Snort_inline load balancing</title>
		<link>http://www.inliniac.net/blog/2008/09/18/snort_inline-load-balancing.html</link>
		<comments>http://www.inliniac.net/blog/2008/09/18/snort_inline-load-balancing.html#comments</comments>
		<pubDate>Thu, 18 Sep 2008 11:32:40 +0000</pubDate>
		<dc:creator>Victor Julien</dc:creator>
				<category><![CDATA[Snort_inline]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[nfqueue]]></category>
		<category><![CDATA[nitro security]]></category>

		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=158</guid>
		<description><![CDATA[Dave Remien of NitroSecurity created a patch that &#8220;implements a relatively simple form of (IPV4) load balancing&#8221; between multiple Snort_inline processes using Nfqueue. Here is what it does: 1. Load balancing. The bottom half of the source and dest addresses are added together, and mod&#8217;d with the number of &#8220;load-balancing&#8221; snorts you desire to run. [...]]]></description>
			<content:encoded><![CDATA[<p>Dave Remien of <a href="http://www.nitrosecurity.com/" target="_blank">NitroSecurity</a> created a patch that &#8220;implements a relatively simple form of (IPV4) load balancing&#8221; between multiple Snort_inline processes using Nfqueue. Here is what it does:</p>
<blockquote><p>1. Load balancing. The bottom half of the source and dest addresses are added together, and mod&#8217;d with the number of &#8220;load-balancing&#8221; snorts you desire to run. This means that traffic stays with a particular snort, so that state is maintained.</p>
<p>2. Because you can run many snorts (presumably on many CPUs), you can now take advantage of that super-hooty 16way box and those 10 gig NICs you just got your hands on&#8230;</p>
<p>3. The snort at the &#8220;magicqueue&#8221; is a back-up snort &#8211; normally no traffic is sent to it, but in the event that one of the &#8220;load-balancing&#8221; snorts isn&#8217;t present, the traffic for that &#8220;load-balancing&#8221; snort gets sent to the &#8220;backup&#8221; snort.</p></blockquote>
<p>And even more, read that <a href="http://snort-inline.svn.sourceforge.net/viewvc/snort-inline/trunk/doc/README.NFQUEUE?revision=89&amp;view=markup" target="_blank">here</a>.</p>
<p>I haven&#8217;t tried this myself, but it sure looks cool. Try it by checking out the latest SVN code for Snort_inline. Then follow the instructions from README.NFQUEUE.</p>
<p>Big thanks to Dave Remien &amp; NitroSecurity for this contribution!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.inliniac.net/blog/2008/09/18/snort_inline-load-balancing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple Snort_inline processes with Vuurmuur</title>
		<link>http://www.inliniac.net/blog/2007/11/12/multiple-snort_inline-processes-with-vuurmuur.html</link>
		<comments>http://www.inliniac.net/blog/2007/11/12/multiple-snort_inline-processes-with-vuurmuur.html#comments</comments>
		<pubDate>Mon, 12 Nov 2007 21:29:58 +0000</pubDate>
		<dc:creator>Victor Julien</dc:creator>
				<category><![CDATA[Snort_inline]]></category>
		<category><![CDATA[Vuurmuur]]></category>
		<category><![CDATA[connmark]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[nfqueue]]></category>

		<guid isPermaLink="false">http://www.inliniac.net/blog/2007/11/12/multiple-snort_inline-processes-with-vuurmuur.html</guid>
		<description><![CDATA[One of the cool things of the Snort_inline project is the support for NFQUEUE. NFQUEUE is the new queuing mechanism to push packets from the kernel to userspace so a userspace program can issue a verdict on it. What makes NFQUEUE cooler than it&#8217;s predecessor ip_queue is that it supports multiple queue&#8217;s. This means that [...]]]></description>
			<content:encoded><![CDATA[<p>One of the cool things of the <a href="http://snort-inline.sf.net/">Snort_inline</a> project is the support for NFQUEUE. NFQUEUE is the new queuing mechanism to push packets from the kernel to userspace so a userspace program can issue a verdict on it. What makes NFQUEUE cooler than it&#8217;s predecessor ip_queue is that it supports multiple queue&#8217;s. This means that there can be more than one Snort_inline process inspecting and judging traffic. The challenge is to make sure that each Snort_inline instance sees all traffic belonging to a certain connection so Snort_inline can do stateful inspection on it. Luckily, <a href="http://www.vuurmuur.org/">Vuurmuur</a> makes it very easy.</p>
<p>Normally an &#8216;accept&#8217; rule in Vuurmuur looks like this:</p>
<blockquote><p>accept service http from local.lan to world.inet options log</p></blockquote>
<p>The NFQUEUE equivalent of this rule is:</p>
<blockquote><p>nfqueue service http from local.lan to world.inet options log,nfqueuenum=&#8221;1&#8243;</p></blockquote>
<p>To have ftp handled by another Snort_inline instance, just add a new rule:</p>
<blockquote><p>nfqueue service ftp from local.lan to world.inet options log,nfqueuenum=&#8221;2&#8243;</p></blockquote>
<p>Easy, no? <img src='http://www.inliniac.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Vuurmuur creates the iptables rules that are required. It uses some advanced connmark-fu for it, so the right Snort_inline process receives all packets from a connection. It uses the helper match to make sure related connections are handled by the right queue, such as the ftp data channel. Of course you also need Snort_inline to be ready for it. See <a href="http://www.inliniac.net/blog/2007/06/26/compiling-snort_inline-with-nfqueue-support-on-ubuntu.html">this post</a> for more info on that.</p>
<p>The Snort_inline configuration part takes some work. You have to setup your init scripts to start all instances, setup different configs, logging to different locations. You will need multiple Barnyard&#8217;s and if using Sguil multiple snort_agent.tcl instances. When updating the rules you need to take care of the multiple processes as well. As said, it takes some work, but it&#8217;s rewarding. You can for example setup an extra Snort_inline instance for testing purposes only. Send all traffic from a certain IP to it to try out new rules, config changes, etc. I have set it up to have separate processes monitor my dmz and my lan.</p>
<p>What is possible as well, but not with Vuurmuur so far, is to have a form of poor man&#8217;s load balancing by sending new connections to one of multiple processes. This could be done by making use of the &#8216;ipt_statistics&#8217; iptables module (fmr ipt_random). This allows a rule to be activated only some percent of the time. By using some more connmark-fu it&#8217;s possible to have multiple Snort_inline instances to handle different connections of the same type of traffic. I&#8217;ll add support for that to a future Vuurmuur release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.inliniac.net/blog/2007/11/12/multiple-snort_inline-processes-with-vuurmuur.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

