Lodestone Knowledgebase
Go to websiteCreate a ticket
  • Introduction
  • FAQ
  • Price Comparison
  • Account & Billing
    • Open a support ticket
  • Upgrade a service
  • Cancel an active service
  • Request a refund
  • Resolve pending status
  • Game Panel
    • Change server name
    • Change server version
    • Install plugins
    • Install modpacks
    • Create a subdomain
    • Create server backups
    • Invite subusers
    • Create MySQL databases
    • View assigned ports
    • Create schedules
    • Enable health monitoring
    • Use SFTP with FileZilla
  • Minecraft Java
    • Make a player an operator
    • Add a player to the whitelist
    • Change server world seed
    • Add a server icon
    • Customise server properties
    • Connect a custom domain
    • Reduce memory usage
    • Configure GeyserMC
    • Analyse timings with Spark
    • Using Minehut external
    • Configure Dynmap
    • Delete player data
  • Minecraft Bedrock
  • Connect to a server on PS4/5
  • Connect to a server on XBOX
  • Connect to a server on Switch
  • Add a player to the allowlist
  • Grant operator privileges
  • Enable cheats
  • Enable experimental mode
  • Dedicated Hosting
    • Connect through SSH
    • Change default SSH port
    • Connect through FTP
    • Configure Fail2Ban
Powered by GitBook
On this page
  1. Dedicated Hosting

Configure Fail2Ban

How to install and configure Fail2Ban for added security on a dedicated server.

Fail2Ban is a daemon that can be used to monitor the logs of services and ban clients that repeatedly fail authentication checks.

You will need to be using a Unix-based operating system such as Ubuntu.

Log in to your server as root and execute apt install fail2ban to install Fail2Ban. You can then execute systemctl start fail2ban to enable the service.

To configure Fail2Ban, create local configuration files by executing cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local and then cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local.

Creating local files is important to avoid overwriting data when you upgrade Fail2Ban.

Execute nano /etc/fail2ban/jail.local to edit the local configuration file. You can then adjust the configuration accordingly, such as changing the maximum number of attempts or default ban time.

Once done, save the file and exit the editor.

Execute systemctl restart fail2ban to apply the changes.

You can check the status of Fail2Ban by executing systemctl status fail2ban and view the current jails by executing fail2ban-client status.

PreviousConnect through FTP

Last updated 2 months ago