Essential security measures for your VPS

When you buy a VPS or RDP server from Lurstan Host, you have full root or administrator access. This gives you freedom, but it also means you are responsible for the security of the software on your server.

Automated tools scan the internet for weak servers all the time. Follow this checklist to protect your server against malware, password-guessing attacks and unauthorised access.

1. Keep the operating system updated

Outdated software is a common way in for attackers. Security updates close the holes they use.

  • Ubuntu: run apt update && apt upgrade regularly.
  • AlmaLinux: run dnf upgrade regularly.
  • CentOS 7: it no longer receives security updates. For a new server, choose AlmaLinux or Ubuntu.
  • Windows (USA RDP): keep Windows Update switched on and set it to install security updates automatically.

2. Change the default access port

Bots attack the default ports: 22 for SSH and 3389 for Remote Desktop. Moving to another port number stops most automated attempts.

  • Linux: edit /etc/ssh/sshd_config, change Port 22 to another number, allow the new port in your firewall, then restart SSH.
  • Windows: you can change the Remote Desktop port in the Registry Editor. Allow the new port in Windows Defender Firewall before you restart, or you will lock yourself out.

3. Stop logging in as root or Administrator

Attackers already know these usernames, so they only have to guess the password.

  • Create your own user with sudo rights (Linux) or administrator rights (Windows).
  • Once the new user works, turn off direct login for root in /etc/ssh/sshd_config.

4. Use a firewall

A firewall blocks all traffic except what you allow.

  • Linux: UFW or CSF (ConfigServer Security and Firewall) both work well. With UFW, allow your SSH port first, then run ufw enable.
  • Windows: use Windows Defender Firewall, and open only the ports you need, such as web, mail and your Remote Desktop port.

5. Scan for malware

  • Linux: ClamAV and Maldet (Linux Malware Detect) are free tools that look for malicious scripts and web shells.
  • Windows: keep Microsoft Defender switched on and run a full scan from time to time. If you add another scanner, check that its vendor supports Windows Server.

6. Take regular backups

If an attacker deletes your data or ransomware locks your files, a clean backup is the surest way back.

  • Keep copies of your important files and databases somewhere other than the server, for example on another server or a cloud storage service.
  • Test a restore from time to time, so you know the backup works.

Summary

Server security is an ongoing job, not a one-off fix. Keeping the system updated, changing default ports, using a firewall and keeping backups blocks most common attacks.

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