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