我试图build立一个支持snort的防火墙,当我添加QUEUE目标时,它将丢弃所有的数据包。 我已经这样做了,但是QUEUE目标不允许进一步处理数据包:
-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
我最终会改变它前进,但我只是试图让它现在工作。 我开始像这样打鼾:
snort -Q -D -c /etc/snort/snort.conf
编辑:更多信息
当我运行它时,它仍然看到没有iptables队列目标规则的数据包,但是当我添加一个QUEUE目标时,它开始丢失所有的数据包。
# 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
所以它说内联,但它说它使用bond0。 内联不应该要求一个接口,对吧?
看来ip_queue模块在这里加载。 执行以下操作并检查一次:
modprobe ip_queue modprobe iptable_filter
然后添加队列规则。 检查一次,如果它的工作。