Securing your VPS is important, even for basic use cases. These quick steps help reduce common risks while keeping things simple.

Disclaimer: These are basic suggestions to help improve the security of your VPS. Enviroweb provides unmanaged VPS hosting and is not responsible for the security, configuration, or maintenance of your server.

1. Update your system

sudo apt update && sudo apt upgrade -y

This command refreshes the list of available packages and applies all available updates, including security patches.

2. Enable the firewall

sudo ufw allow OpenSSH
This allows SSH connections to your VPS so you don’t lock yourself out when enabling the firewall.

sudo ufw enable
This turns on the firewall and starts blocking any traffic not explicitly allowed.

sudo ufw status
This shows the current list of firewall rules and confirms whether it’s active.

3. Install fail2ban (optional)

sudo apt install fail2ban -y
Installs fail2ban, a tool that helps protect your server by blocking repeated failed login attempts.

sudo systemctl enable fail2ban --now
This command ensures fail2ban is started immediately and enabled to run on boot.

4. Use a strong password

Make sure the password for your login user is secure and unique. Avoid using common words or easily guessable combinations. You can update your password using:

passwd

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 specific needs and applications.

For more advanced security practices, we recommend reviewing the official Ubuntu server security documentation

Was this answer helpful? 0 Users Found This Useful (0 Votes)