How to block an ip?


i am using WP and i see that there is one ip that constantely try to acess to my server admin interface…
and it getting blocked after trying to guess password ( i see it with a help of wordfence plugin…)

1 . what is the best way to block it ?

like this ?
iptables -A INPUT -s IP—ADRESS -j DROP

  1. will this stay after reboot ? i don’t remember how to save it forever :wink:

Hm, I don’t know if it’s being catched by fail2ban ? But if it is, instead of manually messing with iptables (which is a complicated tool) I would rather recommend enabling the “recidive” jail in fail2ban

Not yet, but I work on it.

nobody can reply do my question ?

Actually, it seems there’s a work to plug Wordpress to fail2ban.

You can ban the IP via fail2ban. Don’t actually know how to do this, I think we can find some tutorials about it.

You can use the script using ipset
Maybe we can implement this script with YunoHost to ease to ban ip’s and limit access.

1 Like