Bug #228
closedSuricata can't drop or reject in bridge mode
Description
Hello,
i have problemas with Suricata when i use a bridge in Linux Debian Squeeze.
Configuration:
- brctl addbr br0
- brctl addif br0 eth1 eth2
- ifconfig br0 up
- ifconfig eth1 up
- ifconfig eth2 up
- iptables -A INPUT -j NFQUEUE --queue-num 0
- suricata -c suricata.yaml -l /var/log/suricata/ -q 0
With this rule suricata can log the alert:
alert tcp any any -> any 80 (msg:"/etc/passwd"; content:"/etc/passwd";
nocase; sid:9900005; rev:2;)
But when i change "alert" to "drop" or "reject", Suricata failure with error code: SC_ERR_LIBNET_WRIT.
If i enable the log in iptables:
- iptables -F
- iptables -A FORWARD -j LOG
- iptables -A INPUT -j NFQUEUE --queue-num 0
- suricata -c suricata.yaml -l /var/log/suricata/ -q 0
Iptables said this error:
[ 1675.365811] IN=br0 OUT=br0 PHYSIN=eth2 PHYSOUT=eth1 SRC=192.168.2.1 DST=192.168.2.104 LEN=64 TOS=0x00 PREC=0x00 TTL=64 ID=24988
[2407] 2/1/2000 -- 02:45:36 - (respond-reject-libnet11.c:172) <Error> (RejectSendLibnet11L3IPv4TCP) -- [ERRCODE: SC_ERR_LIBNET_WRIT)
Suricata hunt the alert but it can't drop or reject the packet.
Thx you and sorry for my english :'(