IPFW2 FreeBSD Dshield reporter OBJECTIVE This script was developed to increase the speed, parsing strength, and reduce complexity of configuration. IPFW2DSHIELD.PL will allow you to exlude IP's, subnets, and email the results to dshield simply. It uses the "use Net::SMTP" module to allow you to avoid having to setup or configure your own sendmail system. REQUIREMENTS FreeBSD 5.x + (works with and tested on 6.x) Perl 5 or greater "use Net::SMTP" Perl module A mail server (like "smtp.east.cox.net") An email address (optional, but without it may cause mail issues) INSTALLTION copy IPFW2DSHIELD.PL to your favorite directory cp ipfw2dshield.pl /usr/local/bin - Install Net::SMTP (if this process doesn't work see :http://www.cpan.org/modules/INSTALL.html) Example: perl -MCPAN -e shell install Net::SMTP Setup Crontab (I like mine to run ever hour) 1 * * * * root perl /usr/local/bin/ipfw2dshield.pl CONFIGURATION Before you fire the script off make sure to update the information below. Information must be included for the script to work! # Mail Setup my $mailserver="mymailserver.com"; my $smtpto='reports@dshield.org'; (DON'T TOUCH) my $smtpfrom='myemailaddress@address.com'; my ($smtp, @ok_addr); # Misc options my $data = "/var/log/security"; (LOG LOCATION THIS IS THE DEFAULT) # Make sure to include your user ID my $userID = ""; (plug in your User ID) # IP Addresses you want to exclude (single IP 10.0.10.1/32, subnet 10.0.10.0/16 (or any supported CIDR)) my @exip; push( @exip, "10.0.0.0/24" ); (INCLUDE IP OR SUBNETS) CLOSING NOTES I want to thank Mike for all the help he lended on this script. We both had a hard time with the original utility, his contributions added flexability and speed. Thanks again!