I've always used route add to instantly BLACKHOLE malicious incoming IP addresses, which works fine (apache's not installed....so I don't believe .htaccess is an option):
But the BLACKHOLING only lasts 'til the next reboot and/or network restart. In addition, I need a way to BLACKHOLE new IPs daily and, aside from it's being a temporary remedy, route add is also rather labour intensive.
Question: Is there a way to enter all of the day's IP addresses into, say, a text file (e.g., list.txt) and, then, export the IPs from list.txt via route add or some other simpler option to automate and simplify the process of BLACKHOLING numbers of new IP addresses?
p.s. I apologize if there's an existing solution, but I didn't see this answered previously and I've been out of the BSD world for some time. I'm trying to assist some friends who run an old UK music site. Thanks in advance for any useful assistance!
# route add -net 123.456.789.0/24 127.0.0.1 -blackhole
But the BLACKHOLING only lasts 'til the next reboot and/or network restart. In addition, I need a way to BLACKHOLE new IPs daily and, aside from it's being a temporary remedy, route add is also rather labour intensive.
Question: Is there a way to enter all of the day's IP addresses into, say, a text file (e.g., list.txt) and, then, export the IPs from list.txt via route add or some other simpler option to automate and simplify the process of BLACKHOLING numbers of new IP addresses?
p.s. I apologize if there's an existing solution, but I didn't see this answered previously and I've been out of the BSD world for some time. I'm trying to assist some friends who run an old UK music site. Thanks in advance for any useful assistance!