HestiaCP: updates, firewall, Fail2Ban, two-factor and tested backups
HestiaCP is light and it ships with a firewall and Fail2Ban, but a default install leaves port 8083 open to the world and relies on you to update. These steps tighten that.
Update the system and Hestia
Hestia is updated through the package manager. Run the update and read the output for any service restarts.
sudo apt update && sudo apt upgrade v-list-sys-infoCheck the firewall and Fail2Ban
Both should be on. List the rules and the banned addresses, and close ports you do not use.
sudo v-list-firewall sudo fail2ban-client statusLimit port 8083
Allow the panel port only from your addresses if you can, and keep a second way in before you close it.
sudo v-add-firewall-rule ACCEPT YOUR_IP 8083 TCP sudo v-list-firewallEnable two-factor for users
Turn on two-factor authentication in the user settings for the administrator and every user with panel access.
Harden SSH
Use keys and disable password login for root.
sudo sshd -T | grep -Ei 'permitrootlogin|passwordauthentication'Check backups and restore one
Make sure backups also go to a second location, then restore a test user to confirm that it works.
sudo v-list-backups
Common mistakes
- Panel port open to everyone with only a password.
- Updates never run on a server that works.
- Backups only in /backup on the same disk.
How to undo it
Delete a firewall rule you added with the v-delete-firewall-rule command (list rules first with v-list-firewall), or remove it from the host console if you lose access.
Sources
Commands are for Debian and Ubuntu unless noted. Test on a copy first and keep a backup: you are responsible for changes on your own systems.