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 er et populært værktøj til at sikre din VPS-server ved at blokere skadelige IP-adresser. Nogle gange skal du hvidliste bestemte IP-adresser for at forhindre dem i at blive blokeret. Her er hvordan du gør det:
Trin 1: Få adgang til din server
Log ind på din Debian VPS-server via SSH:
ssh your_username@your_server_ip
Trin 2: Åbn Fail2ban-konfigurationsfilen
Du kan tilføje IP’er til hvidlisten ved at redigere jail.local konfigurationsfilen. Brug din foretrukne teksteditor:
sudo nano /etc/fail2ban/jail.local
Trin 3: Tilføj den hvidlistede IP
Find sektionen for den specifikke jail (f.eks. sshd) og tilføj din IP til ignoreip linjen. Hvis den ikke er der, kan du oprette den:
ignoreip = 127.0.0.1/8 DIN_HVIDLISTE_IP
Erstat DIN_HVIDLISTE_IP med den IP-adresse, du ønsker at hvidliste.
Trin 4: Gem og afslut
Når du har foretaget ændringerne, skal du gemme filen og afslutte teksteditoren. I Nano kan du gøre dette ved at trykke på CTRL + X, derefter Y, og Enter.
Visual overview: Sådan hvidlistes en IP i Fail2ban på Debian Linux
Trin 5: Genstart Fail2ban
For at anvende ændringerne skal du genstarte Fail2ban-tjenesten:
sudo systemctl restart fail2ban
Konklusion
Den angivne IP-adresse skal nu være hvidlistet i Fail2ban. Hvis du leder efter en pålidelig VPS-server, kan du overveje at besøge NetCloud24 VPS-servere.
Ł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.