Help - Search - Members - Calendar
Full Version: Tough APF/BFD questions..
The Planet Forums > Security > General Security
hoopscoop
Hello,
installed APF and BFD, so runnnig bfd -a at console
shows me the current list of banned ip's

my 3 questions are,
would using cron, and piping the result of bfd-a to a text file
break apf ? ever since I set cron to do this daily, apf
has acted up, like not showing new bans, ones that were
caught, and emailed to me from within bfd.

This is the script called ips.sh

cd /root
bfd -a | grep -P "[0-9]{1,3}(.[0-9]{1,3}){3}" |awk '{print $1}' >"/home/user/domains/dude.net/public_html/bans/ips.txt"

I also have another script that runs by cron,
called found.sh
cd /root
bfd -a | grep -P "[0-9]{1,3}(.[0-9]{1,3}){3}" | mail -s "Banned ips" dude@dude.net


(I thought that stdout was being changed, and not getting set back to
what ever BFD used to begin with...)

Second question
Does BFD flush its banlist by it self ??
Checked bfd -a today and 20+ bans were gone ?

Last question, does apf or bfd store its list as a file anywhere or does it
stay in iptables ?


Thanks,
HoopsCoop
eth00
Playing around with the bfd files may make bfd not work but I doubt apf. As logn as "apf -d ip" gets run you are fine.

The lists are not removed it stays in /etc/apf/deny_hosts.rules
hoopscoop
Thanks for the quick responce,

Ok I wasnt playing with the files directly, just saving the ouput in one instance
and emailing in the other.

So As far as you can see this shouldnt break anything ?

Any idea why BFD shows no bans today when there were a bunch yesterday ?

Thanks...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.