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 12. 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
