Bookmarked for future reference. I had been thinking about a way to "load balance" traffic across multiple Snort instances and thought about applying something like Cisco's etherchannel load-balance srt-dst-ip hashing algorithm. Lo and behold, I found this great BPF kludge! In our example, there will be four nodes monitoring traffic, so the BPF looks like this for the first node: (ip[14:2]+ip[18:2]) - (4*((ip[14:2]+ip[18:2])/4)) == 0 So, in /etc/bro/local.bro, we have this: redef cmd_line_bpf_filter="(ip[14:2]+ip[18:2]) - (4*((ip[14:2]+ip[18:2])/4)) == 0"; On the second node, we would have this: redef cmd_line_bpf_filter="(ip[14:2]+ip[18:2]) - (4*((ip[14:2]+ip[18:2])/4)) == 1"; Third: redef cmd_line_bpf_filter="(ip[14:2]+ip[18:2]) - (4*((ip[14:2]+ip[18:2])/4)) == 2"; And fourth: redef cmd_line_bpf_filter="(ip[14:2]+ip[18:2]) - (4*((ip[14:2]+ip[18:2])/4)) == 3"; Special note: If you are monitoring a link that is still vlan tagged (like from an RSPAN), then you will need to stick vlan && in front of each of the BPF's.
Multi-node Bro Cluster Setup |