Hi Victor,<div><br></div><div>I think this is not necessarily because of Suricata itself, but by the use of iptables/NFQUEUE in a purely bridged environment. (The Suricata IPS does not have an IP address for the bridge).  I used the very simple NFQUEUE user space handler <a href="http://www.netfilter.org/projects/libnetfilter_queue/doxygen/nfqnl__test_8c_source.html">http://www.netfilter.org/projects/libnetfilter_queue/doxygen/nfqnl__test_8c_source.html</a>, stopped Suricata, and kept the following iptables entry</div>
<div><br></div><div>$ sudo iptables -A FORWARD -j NFQUEUE --queue-num 0</div><div><br></div><div>and used the above program (which just puts the packet back out) on my bridge machine, and observed the same throughput speeds (~ 400 Kbps) using iperf. (Only a single connection activated)</div>
<div><br></div><div>Interestingly, when I used ebtables, and its handler (ulog) <a href="http://ebtables.sourceforge.net/examples/basic.html#ex_ulog">http://ebtables.sourceforge.net/examples/basic.html#ex_ulog</a>, with the ebtables FORWARD chain I observed near line rate speeds (> 9Gbps)</div>
<div><br></div><div>$sudo ebtables -A FORWARD --ulog-nlgroup 1</div><div><br></div><div>The major difference that I can see between the two handlers, is that in the case of NFQUEUE, the whole packet payload is actually copied into user space, while for the test_ulog it isn't. I tried with the NFQNL_COPY_META as well, and the speeds for that was ~ 2Mbps.</div>
<div><br></div><div>I know this isn't an iptables/ebtables forum, but wondering if anyone can throw some light on this? I read this document here: <a href="http://ebtables.sourceforge.net/br_fw_ia/br_fw_ia.html">http://ebtables.sourceforge.net/br_fw_ia/br_fw_ia.html</a>, and this figure here <a href="http://ebtables.sourceforge.net/br_fw_ia/PacketFlow.png">http://ebtables.sourceforge.net/br_fw_ia/PacketFlow.png</a> seems to suggest that the bridged packets do indeed go through the iptables filter table FORWARD chain...., so clearly, there is something that I don't have a handle on. My CPU utilization is pretty low ( ~ 8%), so that clearly isn't the issue here....</div>
<div><br></div><div>Thanks,</div><div>Hari</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Mon, Nov 21, 2011 at 10:37 AM, Victor Julien <span dir="ltr"><<a href="mailto:victor@inliniac.net">victor@inliniac.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 11/21/2011 09:00 AM, Hariharan Thantry wrote:<br>
> When I turn on Suricata (latest 1.1 release version), with the defaults,<br>
> the speeds range between 350kbps-1Mbps (using emerging threats ruleset).<br>
<br>
</div>Those numbers are way to low. I run a 8k ruleset in nfq mode on an Atom<br>
N270 and it easily keeps up with 12mbit (which is my internet<br>
connection). So on that hardware you should see much better speeds.<br>
<br>
Do you see one of the threads hit 100% all the time?<br>
<br>
How many rules are you using? And are you using the specific Suricata ET<br>
version?<br>
<font color="#888888"><br>
--<br>
---------------------------------------------<br>
Victor Julien<br>
<a href="http://www.inliniac.net/" target="_blank">http://www.inliniac.net/</a><br>
PGP: <a href="http://www.inliniac.net/victorjulien.asc" target="_blank">http://www.inliniac.net/victorjulien.asc</a><br>
---------------------------------------------<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Oisf-users mailing list<br>
<a href="mailto:Oisf-users@openinfosecfoundation.org">Oisf-users@openinfosecfoundation.org</a><br>
<a href="http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users" target="_blank">http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
</div></div></blockquote></div><br></div>