Even a minimal AlmaLinux VPS should be secured shortly after deployment. The steps below help reduce exposure to common threats and require minimal configuration.
Disclaimer:
These are general suggestions to help improve the security of your VPS. Enviroweb provides unmanaged VPS hosting and does not configure, manage, or audit the security of your server. You are responsible for securing and maintaining your system.
1. Keep your system updated
sudo dnf update -y
This command installs security updates and system enhancements.
2. Enable the firewall
sudo systemctl enable firewalld --now
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
This starts the firewall and ensures SSH access remains available.
3. Install fail2ban (optional)
sudo dnf install epel-release -y
sudo dnf install fail2ban -y
sudo systemctl enable fail2ban --now
Fail2ban helps protect against brute-force login attempts over SSH and other services.
4. Set a strong password
passwd
Use a unique, secure password to protect your login user.
These steps provide a basic layer of protection without altering critical system settings. You can expand on them as your server setup grows based on your needs and use case.
For further security guidance, refer to the official AlmaLinux documentation: