Created attachment 545 [details] guardian I have Guardian set to only block Snort Priority Level 1 alerts but it's blocking Level 2 as well. Alert: [**] [1:2402000:4623] ET DROP Dshield Block Listed Source group 1 [**] [Classification: Misc Attack] [Priority: 2] 11/11-12:18:49.554499 77.72.82.7:53790 -> myip:4569 TCP TTL:246 TOS:0x28 ID:53722 IpLen:20 DgmLen:40 ******S* Seq: 0xFBE35F5A Ack: 0x0 Win: 0x400 TcpLen: 20 [Xref => http://feeds.dshield.org/block.txt] syslog: Nov 11 12:18:49 ipfire guardian[3955]: <info> Blocking 77.72.82.7 for 86400 seconds... /var/ipfire/guardian/guardian.conf: # Autogenerated configuration file. # All user modifications will be overwritten. # Log settings. LogFacility = syslog LogLevel = info # IPFire related settings. FirewallEngine = IPtables SocketOwner = nobody:nobody IgnoreFile = /var/ipfire/guardian/guardian.ignore # Configured block settings. BlockCount = 1 BlockTime = 86400 FirewallAction = DROP # Enabled modules. Monitor_SSH = /var/log/messages Monitor_SNORT = /var/log/snort/alert Monitor_HTTPD = /var/log/httpd/error_log # Module settings. SnortPriorityLevel = 1 Does anyone know of a fix?
Hi, I took a quick look at the sources and found this in '/usr/lib/perl5/site_perl/5.12.3/Guardian/Parser.pm' (line 111-116): ... # Loop through all lines of the current alert. foreach my $line (@alert) { # Check Priority Level and skip the alert if it is to low. #if ($line =~ /.*\[Priority: (\d+)\].*/) { #return unless($1 < $priority); #} ... The IMHO critical lines are commented. Intentional? Best, Matthias
Hi I don't know why this would be commented out since Guardian has a feature to skip alerts based upon threshold.
After removing comments: user@ipfire[~]$ sudo /etc/init.d/guardian start Starting Guardian... Global symbol "$priority" requires explicit package name at /usr/lib/perl5/site_perl/5.12.3/Guardian/Parser.pm line 115. Compilation failed in require at /usr/sbin/guardian line 35.
Fixed by commit: https://git.ipfire.org/?p=people/stevee/guardian.git;a=commit;h=df8eb30562ceedfe3c042b1c124b308e6b317d42