Skip to content

How to Whitelist an IP in Fail2ban on Debian Linux

Netcloud24
Cloud Infrastructure Expert
NetCloud24 Expert Guides Open the dedicated video page

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 of How to Whitelist an IP in Fail2ban on Debian Linux
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.

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Key topics covered in How to Whitelist an IP in Fail2ban on Debian Linux
Key topics covered in this NetCloud24 guide.

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Windows RDS (Remote Desktop Services)

Practical checklist for How to Whitelist an IP in Fail2ban on Debian Linux
Practical checklist for applying the guidance in this article.

Windows VPS

How to Whitelist an IP in Fail2ban on Debian Linux
How to Whitelist an IP in Fail2ban on Debian Linux
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.