Skip to content

Hur man lägger till en IP i vitlistan i Fail2ban på 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.

 

 

Fail2ban är ett populärt verktyg för att skydda din VPS-server genom att blockera skadliga IP-adresser. Ibland behöver du lägga till vissa IP-adresser i vitlistan för att förhindra att de blockeras. Här är hur du gör det:

Steg 1: Åtkomst till din server

Logga in på din Debian VPS-server via SSH:

ssh your_username@your_server_ip

Steg 2: Öppna Fail2ban-konfigurationsfilen

Du kan lägga till IP-adresser i vitlistan genom att redigera konfigurationsfilen jail.local. Använd din favorittextredigerare:

sudo nano /etc/fail2ban/jail.local

Steg 3: Lägg till IP-adressen i vitlistan

Hitta sektionen för den specifika jail (t.ex. sshd) och lägg till din IP-adress i ignoreip-raden. Om den inte finns kan du skapa den:

ignoreip = 127.0.0.1/8 DIN_VITLISTA_IP

Byt ut DIN_VITLISTA_IP mot den IP-adress du vill lägga till i vitlistan.

Steg 4: Spara och avsluta

Efter att ha gjort ändringarna, spara filen och avsluta textredigeraren. I Nano kan du göra detta genom att trycka CTRL + X, sedan Y och Enter.

Visual overview of Hur man lägger till en IP i vitlistan i Fail2ban på Debian Linux
Visual overview: Hur man lägger till en IP i vitlistan i Fail2ban på Debian Linux

Steg 5: Starta om Fail2ban

För att tillämpa ändringarna, starta om Fail2ban-tjänsten:

sudo systemctl restart fail2ban

Slutsats

Den angivna IP-adressen bör nu vara vitlistad i Fail2ban. Om du letar efter en pålitlig VPS-server, överväg att besöka NetCloud24 VPS-servrar.

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Key topics covered in Hur man lägger till en IP i vitlistan i Fail2ban på 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 Hur man lägger till en IP i vitlistan i Fail2ban på Debian Linux
Practical checklist for applying the guidance in this article.

Windows VPS

Hur man lägger till en IP i vitlistan i Fail2ban på Debian Linux
Hur man lägger till en IP i vitlistan i Fail2ban på Debian Linux
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.