How can I blacklist IP addresses from accessing any web sites?
I’m getting tired (as I’m sure everyone else is) of getting spammed thru our contact forms for various sites; mostly Joomla, even though it has a CAPTCHA form.
What I’ve like to do is just do a redirect for all know spammers to keep them from posting to any of my sites.
There’s various tools and methods you can use to block hosts, IP’s, and the like.
A nice and simple one you can use on the command line that would completely block them from your server would be to use the nifty iproute2 tools, and run this command:
ip ro add blackhole IP.ADDRESS.TO.BLACKLIST
To later remove it, you can type:
ip ro del IP.ADDRESS.TO.BLACKLIST
There’s also some Joomla and Apache tools for doing that too, some examples are here:
Note that step 5 should include “set selector to 'Equals”".
This is obvious in hindsight, but I had never done this before with Webmin and followed it step by step without really thinking about it too much, and the result was getting locked out of the server.
I have a script I use that blocks IP addresses listed on stopforumspam, After moving a WP site to my server, in May, these were the Askimet stats
March 2015 38,101 spam stopped
April 2015 48,458 spam stopped
May 2015 2,992 spam stopped
June 2015 9 spam stopped
Whilst Askimet was doing a great job stopping spam posts the script saved Askimet the work by blocking the ip address as soon as it connected to the server
This same script could be used for any ip blacklist you can import, I will be working on improving it
You need to have root access to install / set it up
wordfence does not do it for joomla
…
I’m getting tired (as I’m sure everyone else is) of getting spammed thru our contact forms for various sites; mostly Joomla, even though it has a CAPTCHA form.
…
But I agree if you have WP then install Wordfence,
How do we add a commercial IP address to a blacklist from displaying on the web or YouTube for instance.
This person has over 1.3M subscribers and she blocks every single person that doesn’t completely fit the bill with her or lasts too long in her courses.
Yet she’s making money off of her YouTube and her coursework.
Id like to know how to block her ads.
IP address: 198.185.159.144.
What i would recommend to start is for you to setup fail2ban and have it scanning you apache/ngnix logs.
With fail2ban, what I’m doing IP that have been ban 2 times in a week get then banned for a year.
Then you can also use fail2ban in combination with abuseipdb.com to verify if the ip is known for abuse and the have it banned if it’s the case.