🐧 Block IP address once they access certain pages?
Nachrichtenbereich: 🐧 Linux Tipps
🔗 Quelle: reddit.com
I see a ton of shit in my acccess log about
- /wp-login.php
- /sqladmin/index.php
- /php2MyAdmin/index.php
etc There's no PHP on my server. I want to outright block people who try to get any pages that has "/wp-" or ".php" in it. How do I do this? I once tried fail2ban but it was complicated and didn't end up working (or I needed to write a script for it to work or something)
I was thinking of scanning the log files and automatically adding the IP address to iptables. Is that a good idea? Maybe iptables -A INPUT -s THEIR_IP -j DROP
but I haven't tested if this is the right command.
[link] [comments] ...