How can I tell if my IP has been blocked by my server's firewall?

Procédure

Presentation

Fail2ban is an anti-brute-force software that we install with all our ISPconfig packages.

It protects your VPS against people trying to "crack" your passwords.

By analysing your server's log files, it detects failed connection attempts on several services. Whether it's SSH, FTP, IMAP or MySQL.

The only problem is that your IP address may be blocked. It could happen that you have forgotten your MySQL password and you make several erroneous connection attempts.

Enough to get you blocked by Failban.

We'll look at how to find the list of IPs blocked by Fail2ban and how to unblock them.

Find the list of IP's blocked by Fail2ban

Go to your ISPconfig panel and under the Monitoring tab, View IPTables section:

How can I tell if my IP has been blocked by my server's firewall?

How can I tell if my IP has been blocked by my server's firewall?

You will find something like this:

How can I tell if my IP has been blocked by my server's firewall?

For the moment nothing abnormal. To find a blocked IP you will need to look for lines like :
fail2ban-SERVICE -s IP -j REJECT --reject-with icmp-port -unreachable

How can I tell if my IP has been blocked by my server's firewall?

Here we can see that the address 82.127.x.x has been blocked by Fail2ban because too many failed connection attempts have been made to the mysqlRoot service (this is a filter that we have added to Fail2ban and which checks connections to the MySQL service with the root user). This IP will therefore no longer be able to connect to the MySQL service, at least temporarily.


How to unblock an IP blacklisted by Fail2ban

For this step, you will need to connect via SSH(How to connect as root on a dedicated VPS server).

Once connected, use the following command:

fail2ban-client set SERVICE unbanip IP

In our example :

fail2ban-client set mysqlRoot unbanip 82.127.x.x


Go back to your ISPconfig panel, the IP has been unblacklisted:

How can I tell if my IP has been blocked by my server's firewall?

Rate this article :

5/5 | 1 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

3mn reading

How do I access ISPConfig on my dedicated VPS server?

0mn reading

How do I create a DNS server in ISPConfig on a dedicated VPS server?

0mn reading

How do I change the ISPConfig 3 panel password?

1mn reading

How can I secure access to my ISPconfig panel using an .htaccess file?


Ask the LWS team and its community a question