Skip to main content
Fail2Ban is a powerful feature integrated with ORIV, that protects your server from unauthorized access attempts and brute-force attacks. It automatically blocks harmful IP addresses from accessing essential services such as SSH, minimizing the risk of security breaches. This proactive method helps stop brute force attacks, spamming, port scanning, and other unauthorized attempts to get into your server. ORIV has always had Fail2Ban integrated for server security. Now, with our latest update, managing security is simpler than ever. You can easily ban and unban IP addresses directly from your ORIV dashboard as well as ban new IP addresses with just a few clicks, giving you greater control over your server’s protection.

How Fail2Ban Works In ORIV

  • Automatic Blocking: Fail2Ban quickly stops harmful IP addresses from trying to break into your server.
  • SSH Hardening: ORIV secures SSH logins during server setup to stop unauthorized access.
  • View Banned IP Addresses: Easily see the list of banned IP addresses that tried to force their way into your server.
  • Ban IP: Block an IP address.
  • Unban IP: Allow a banned IP address to connect by removing it from the block list.

How To Easily Ban IP Addresses With Fail2Ban in ORIV

After successfully logging in/signing up in ORIV, go to the server page dashboard. Under the Settings tab, you will find the Security option. Click on it and then you will find the Fail2Ban management options.
[!NOTE] Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em support@oriv.cloud.
From here you can see the already Banned IP Addresses. You will have the option to Unban the IP addresses if the situation demands.
[!NOTE] Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em support@oriv.cloud.
To ban a new IP address click on Ban New IP Address, and a popup will appear. Simply write the address you want to ban and click on Ban IP, and it will be banned instantly.
[!NOTE] Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em support@oriv.cloud.

Whitelisting Trusted IP Addresses in Fail2Ban

While Fail2Ban is excellent for blocking malicious actors, you want to ensure you don’t accidentally lock yourself out of your own server. If you have a static IP address or a fixed corporate network range, you can whitelist these addresses.
Once an IP is whitelisted (added to the ignoreip list), Fail2Ban will never block it, regardless of how many failed login attempts occur.
Security Note: Only whitelist IP addresses that you fully trust. Misconfiguring this step by adding broad ranges can create a security loophole.

1. Open the Jail Configuration File

To add a whitelist, first SSH into your server using a sudo user. Then, you need to edit the jail.local file. Use the following command to open it with the Nano editor: Copy to clipboard 1

2. Add Your IP to the ignoreip Line

Locate the line starting with ignoreip. By default, Fail2Ban whitelists your local machine (127.0.0.1/8).
To add your specific IP (e.g., 192.168.1.100), append it to the end of the line, separated by a space:
Copy to clipboard 1

3. Save and Reload Fail2Ban

After adding your IP, save the file by pressing Ctrl + O, then Enter, and exit with Ctrl + X.
To apply the changes, reload the Fail2Ban service. Reloading is preferred over restarting because it refreshes the configuration without interrupting the service:
Copy to clipboard 1

4. Verify the Service Status

It is a best practice to verify that the configuration change didn’t cause any errors. Check the service status with this command: Copy to clipboard 1
If the output shows active (running), your configuration is successful, and your IP is now protected from being banned. With Fail2Ban seamlessly integrated into ORIV, you can be confident that your server is shielded from unauthorized access attempts and brute-force attacks. By utilizing this advanced security tool, you can solidify the overall security of your server and reduce the likelihood of security breaches. Still stuck? Contact our support team for any of your queries.