Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud.
Cloud and VPS expertise, security, performance, and step-by-step tutorials.
Learn, deploy, and keep building with NetCloud24.
How to Whitelist an IP in Fail2ban on Debian Linux
Fail2ban is a popular tool for securing your VPS server by blocking malicious IPs. Sometimes, you may need to whitelist certain IP addresses to prevent them from being banned. Here’s how to do it:
Step 1: Access Your Server
Log in to your Debian VPS server via SSH:
ssh your_username@your_server_ip
Step 2: Open the Fail2ban Configuration File
You can add IPs to the whitelist by editing the jail.local configuration file. Use your preferred text editor:
sudo nano /etc/fail2ban/jail.local
Step 3: Add the Whitelisted IP
Find the section for the specific jail (e.g., sshd) and add your IP to the ignoreip line. If it’s not present, you can create it:
ignoreip = 127.0.0.1/8 YOUR_WL_IP
Replace YOUR_WL_IP with the IP address you want to whitelist.
Step 4: Save and Exit
After making the changes, save the file and exit the text editor. In Nano, you can do this by pressing CTRL + X, then Y, and Enter.
Visual overview: How to Whitelist an IP in Fail2ban on Debian Linux
Step 5: Restart Fail2ban
To apply the changes, restart the Fail2ban service:
sudo systemctl restart fail2ban
Conclusion
Your specified IP address should now be whitelisted in Fail2ban. If you’re looking for a reliable VPS server, consider checking out NetCloud24 VPS Servers.
Łukasz Bodziony is the CEO and founder of NETCLOUD24, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance Windows VPS and Remote Desktop Services (RDS) solutions to clients across Europe, North America, and beyond.
His expertise covers a wide range of technologies, including Microsoft Azure, Proxmox VE, Amazon Web Services (AWS), and numerous other virtualization and cloud platforms.
Beyond running his hosting business, Łukasz also provides professional paid server configuration and optimization services for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.
If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via Windows VPS.
How to Whitelist an IP in Fail2ban on Debian Linux