Cart 0 Cart
🌐
Language & Currency
Langue & Devise
Language & Currency
← Retour à la base de connaissance
Article

Fail2ban: automatically block SSH attacks

Bots scan and attack your SSH 24/7 — Fail2ban automatically bans IPs that fail too many logins. Install apt install -y fail2ban systemctl enable --now fail2ban SSH config nano /etc/fail2ban/jail.local [sshd] enabled = true port = ssh…

🛡️ Gaming Anti-DDoS ⚡ NVMe 🇨🇦 100% Canadian ↩️ 7-day guarantee 🖥️ Pterodactyl ⚙️ AMD Ryzen 7 9800X3D
📚 Base de connaissance

Bots scan and attack your SSH 24/7 — Fail2ban automatically bans IPs that fail too many logins.

Install

apt install -y fail2ban
systemctl enable --now fail2ban

SSH config

nano /etc/fail2ban/jail.local
[sshd]
enabled = true
port = ssh
maxretry = 5
bantime = 1h
findtime = 10m
systemctl restart fail2ban

5 failures within 10 min → 1 hour ban.

Check banned IPs

fail2ban-client status sshd

Unban an IP: fail2ban-client set sshd unbanip 1.2.3.4

Combined with SSH keys and a sudo user, Fail2ban makes your SSH nearly bot-proof.

Tu n'as pas trouvé ta réponse ?

Notre équipe canadienne répond en moins d'une heure, 7j/7.

Cet article t'a été utile ?

Powered by WHMCompleteSolution

Servers online

Launch your server
in 60 seconds.

Plans from $CA6.99 · Anti-DDoS Protection · 100% Canadian

NordikServer — Game Panel
$ server start
✔ Online in 2.4s — ready
[INFO] Panel ready · Resources allocated
[DDoS] Anti-DDoS shield: ACTIVE
Gaming Anti-DDoS
7-Day guarantee
Online in 60s
🇨🇦 Canadian host
99.99% Uptime
Loading