I'm trying to understand how iptables
and NFQ work together with snort
.
The reason that I ask this is because from what I understand snort
can be set to IPS via NFQ but if you have iptables
there essentially firewall rules hence my question as what I'm trying to do is drop packets that match to the rule below (split for readability):
drop tcp any any -> $HOME_NET 80
(flags:S; msg:"Possible TCP Dos Be Careful !!"; flow:stateless;
detection_filter: track by_dst, count 70, seconds 10;
sid:10001;rev:1;)
The caveat to this is that iptables
also seems to be able to drop packets based on a rule, so if that's true, then what Iām asking is how does it all work together with respect to the configuration that I have when running snort (see below)?
vim /usr/local/snort/etc/snort.conf
config daq: nfq
config daq_mode: inline
config daq_var: queue=0
iptables --append FORWARD --jump NFQUEUE --queue-num 0
/usr/local/snort/bin/snort -m 027 -d -l /var/log/snort \
-u snort -g snort -c /usr/local/snort/etc/snort.conf \
-Q -S HOME_NET=[192.168.1.0/24]