Iptables QUEUE Target and Snort

Posted by bradlis7 on Server Fault See other posts from Server Fault or by bradlis7
Published on 2010-09-02T19:14:14Z Indexed on 2010/12/22 16:56 UTC
Read the original article Hit count: 321

Filed under:
|

I'm trying to set up a firewall with support for snort, and it is dropping all of my packets when I add the QUEUE target. I've made it like this, but the QUEUE target is not allowing the packets to be processed any further:

-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT 
-A INPUT -j QUEUE 
-A INPUT -j ACCEPT

# It's not allowing anything past QUEUE, as you can see below in the count.
> iptables -I INPUT -nv
 pkts bytes target     prot opt in     out     source               destination         
 6707  395K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:22 
  933  138K QUEUE      all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           

I'm eventually going to change it to forward, but I'm just trying to get it working for now. I start snort like so:

snort -Q -D -c /etc/snort/snort.conf

EDIT: More Information

When I run it, it still sees the packets without having an iptables QUEUE target rule, but when I add a QUEUE target, it starts losing all of my packets.

# snort -Qc /etc/snort/snort.conf -N -A console
Enabling inline operation
Running in IDS mode

        --== Initializing Snort ==--
Initializing Output Plugins!
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file "/etc/snort/snort.conf"
## === CUT ===
***
*** interface device lookup found: bond0
***
Initializing Network Interface bond0
Decoding Ethernet on interface bond0
## === CUT ===
Not Using PCAP_FRAMES

So, it says inline, but the it says it's using bond0. Inline should not require an interface, right?

© Server Fault or respective owner

Related posts about iptables

Related posts about snort