Skip to content

Sådan hvidlistes en IP 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 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 of Sådan hvidlistes en IP i Fail2ban på Debian Linux
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.

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Key topics covered in Sådan hvidlistes en IP 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 Sådan hvidlistes en IP i Fail2ban på Debian Linux
Practical checklist for applying the guidance in this article.

Windows VPS

Sådan hvidlistes en IP i Fail2ban på Debian Linux
Sådan hvidlistes en IP i Fail2ban på Debian Linux
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.