Skip to content
Tutorial emka
Menu
  • Home
  • Debian Linux
  • Ubuntu Linux
  • Red Hat Linux
Menu

Cara Setting Fail2Ban SSH Server di Ubuntu 24.04/Ubuntu 24.10/Linux Mint

Posted on October 23, 2024

Keamanan server Ubuntu 24.04 Anda sangat penting, terutama jika server tersebut terhubung ke internet. Salah satu ancaman umum adalah upaya akses tidak sah, khususnya melalui SSH. Fail2ban adalah alat yang ampuh yang dapat membantu melindungi server Anda dengan secara otomatis memblokir aktivitas yang mencurigakan.

Langkah 1: Memperbarui Sistem Anda

Sebelum menginstal apa pun, sebaiknya perbarui sistem Anda untuk memastikan semua paket Anda sudah diperbarui. Buka terminal Anda dengan menekan Ctrl + Alt + T dan masukkan perintah berikut:

      sudo apt update && sudo apt upgrade -y
    

Perintah ini akan memperbarui daftar paket Anda dan menginstal versi terbaru dari paket yang terinstal pada sistem Anda.

      sudo apt install fail2ban
    

Perintah ini menginstal Fail2ban pada sistem Anda. Setelah instalasi selesai, Fail2ban akan siap untuk dikonfigurasi./etc/fail2ban/jail.confjail.local

      sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
    

Sekarang, buka file untuk diedit:

      sudo nano /etc/fail2ban/jail.local
    

Langkah 4: Mengamankan SSH dengan Fail2ban

Untuk melindungi layanan SSH Anda, cari bagian di file . Berikut ini adalah contoh sederhana tentang cara mengonfigurasinya:

[sshd]
enabled  = true
port     = ssh
logpath  = /var/log/auth.log
maxretry = 3
    

  • enabled = true

  • port = ssh

  • logpath = /var/log/auth.log

  • maxretry = 3

  • Langkah 5: Merestart Fail2ban

    Setelah membuat perubahan, restart Fail2ban untuk menerapkan pengaturan baru:

          sudo systemctl restart fail2ban
        

    Anda dapat memeriksa status Fail2ban untuk memastikan bahwa ia berjalan dengan benar:

          sudo systemctl status fail2ban
        

    Langkah 6: Memantau Fail2ban

    Untuk melihat alamat IP mana yang saat ini diblokir, gunakan perintah berikut:

          sudo fail2ban-client status sshd
        

    Perintah ini menunjukkan jumlah IP yang saat ini diblokir dan informasi terkait lainnya.

    Recent Posts

    • Linux News Roundup February 2026
    • How to Install JellyFin Media Server on Samsung TV with TizenOS
    • Why OneNote Clears Your Notes
    • AMD NPU Monitoring on Linux: A Beginner’s Guide to AI Chip Tracking!
    • How to Fix AMD Adrenalin’s Game Detection Issues on Windows
    • Greg Kroah-Hartman Wins Multiple Award at European Open Source Awards!
    • What are Microsoft Copilot Reminders?
    • What’s New in Plasma 6.7? Quick Notification History Clear-Up!
    • Awesome Alternatives to Microsoft Defender Application Guard (MDAG)
    • How tto Enable DLSS 4 & 5 for Your GPU
    • Backlinks: Why They’re Super Important for Your Website!
    • Gnome’s Smart Windows: Tiling Shell 17.3 Makes Organizing Your Screen Easier!
    • How to Replace Notepad with Microsoft Edit
    • What’s New in Shotcut 26.1?
    • Spotify Introduces Group Chat Feature: Sharing Music and Podcasts with Friends Directly
    • Microsoft Will Fix Windows 11 Performance and User Experience Issues in 2026
    • Windows 11 KB5074105 Update Explained
    • Windows 11 Start Menu Resize Issues Explained
    • Definitely Not Fried Chicken Game Explained
    • What is Windows 11 Cross Device Resume?
    • Google Chrome Gemini Integration Explained
    • Microsoft Launches Maia 200: The New 3nm AI Accelerator Outperforming Google and Amazon
    • How to Secure Your Moltbot (ClawdBot): Security Hardening Fixes for Beginners
    • Workflows++: Open-source Tool to Automate Coding
    • MiroThinker-v1.5-30B Model Explained: Smart AI That Actually Thinks Before It Speaks
    • Apa itu Apple iPhone Lipat ‘Clamshell’?
    • ToonMe, Cara Ubah Foto Jadi Kartun Disney Gemoy
    • Apa itu Apple CarPlay Ultra?
    • Steam Wallet Pending Setelah Jual Barang? Ini Dia Penyebab & Cara Mengatasinya!
    • Apakah Lowongan PT Rifan Financindo Asli atau Modus Penipuan?
    • Cara Membuat Podcast dari PDF dengan NotebookLlama dan Groq
    • Tutorial Membuat Sistem Automatic Content Recognition (ACR) untuk Deteksi Logo
    • Apa itu Google Code Wiki?
    • Cara Membuat Agen AI Otomatis untuk Laporan ESG dengan Python dan LangChain
    • Cara Membuat Pipeline RAG dengan Framework AutoRAG
    • Apa itu Spear-Phishing via npm? Ini Pengertian dan Cara Kerjanya yang Makin Licin
    • Apa Itu Predator Spyware? Ini Pengertian dan Kontroversi Penghapusan Sanksinya
    • Mengenal Apa itu TONESHELL: Backdoor Berbahaya dari Kelompok Mustang Panda
    • Siapa itu Kelompok Hacker Silver Fox?
    • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025
    ©2026 Tutorial emka | Design: Newspaperly WordPress Theme