LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-24-2010, 11:57 AM   #1
yngmike
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Rep: Reputation: 2
Question bridge layer 2 issues with iptables (using snort on CentOS 5.4)


OK let me start off with thanks for checking my post.

I am running snort in a single process to monitor a software bridge (br0) interface. I am receiving data that is being read fine by snort and being inserted into my database. I am however concerned that all data might not be getting into snort, because iptables might be dropping most of the layer2 packets. Eth1-5 do not have IP addresses assigned to them. I'm not seeing the throughput I would expect given the amount of traffic on the wire. Does anybody have any idea if I'm doing this wrong? "ifconfig" doesn't report any drops and snort is running happily along at about %20 cpu usage on a dual core 3GHZ XEON @ 800MHZ bus speed.

I'm not an iptables guy but I have added the following to the ACCEPT Chain. I read somewhere that IPTABLES blocks layer 2 by default but I can't figure out where to turn it off.


Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
220 22180 ACCEPT all -- lo any anywhere anywhere
0 0 ACCEPT all -- br0 any anywhere anywhere
0 0 ACCEPT all -- eth5 any anywhere anywhere
0 0 ACCEPT all -- eth4 any anywhere anywhere
0 0 ACCEPT all -- eth3 any anywhere anywhere
0 0 ACCEPT all -- eth2 any anywhere anywhere
0 0 ACCEPT all -- eth1 any anywhere anywhere



OS: Centos 5.4 i386 2.6.18-194.3.1.el5
iptables-1.3.5-5.3.el5_4.1
bridge-utils-1.1-2

NICS 2x embedded, 1x Intel Quad port PCIe card (6x NICS total)

I am currently running snort Version 2.8.5.1 (Build 114)

I have installed bridge-utils and added NIC Eth1-5 to the bridge (Eth0 is management)

used brctl to add nics to to the bridge.
bridge name bridge id STP enabled interfaces
br0 xxxx.xxxxxxxxxxxx no eth5
eth4
eth3
eth2
eth1



My NICS are connected to cisco switches using the monitor mode to place the ip packets on the wire. (disallowing the switch to read packets back).




THANKS!!!!!!!!!!!!
 
Old 05-24-2010, 12:48 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You would want to check ebtables to filter L2. Iptables only deals with L3 and slightly upwards.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Snort on Centos 5.2 osix Linux - Security 2 01-27-2009 12:34 PM
LXer: How To Set Up A Linux Layer 7 Packet Classifier On CentOS 5.1 LXer Syndicated Linux News 0 08-01-2008 07:10 PM
Problems compiling iptables 1.4.0 with layer 7 patch NX-01 Slackware 0 07-04-2008 01:47 AM
help me... centos 5.1 on xen bridge yjj3019 Linux - Enterprise 1 03-24-2008 11:59 PM
Snort on a transparent bridge? kemplej Linux - Security 2 09-15-2004 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration