Why This Matters
Cyberattacks have become more frequent and sophisticated in recent years. Attackers increasingly use automated tools and AI-powered scanners to identify vulnerable servers across the internet.
As a result, many VPS owners have experienced:
Unauthorized access to their servers
Website defacement
Malware infections
Ransomware attacks
Complete deletion of server data
If your VPS is publicly accessible, regular security maintenance is essential.
This guide explains how to review vulnerabilities, secure your server, and ensure your data can be recovered if something goes wrong.
Step 1: Review Vulnerability Reports
If you receive a vulnerability report from a security scanner, monitoring service, or security audit, review each finding carefully.
Common vulnerabilities include:
Outdated Operating System
Older operating system versions may contain known security flaws.
What to do:
Ubuntu/Debian:
apt update apt upgrade
Rocky Linux / AlmaLinux / CentOS:
dnf update
After updates, reboot the server if required.
Outdated Software Packages
Applications such as:
Apache
Nginx
PHP
MySQL/MariaDB
PostgreSQL
WordPress
Control panels
should always be kept up to date.
What to do:
Update software to the latest stable version.
Remove software that is no longer used.
Review vendor security advisories regularly.
Weak Passwords
Weak passwords are one of the most common causes of server compromise.
What to do:
Use unique passwords.
Use at least 16 characters.
Include letters, numbers, and symbols.
Never reuse passwords across services.
Consider using a password manager to generate and store credentials securely.
Open or Unnecessary Ports
Every open port increases the attack surface of your server.
What to do:
Check listening ports:
ss -tulpn
or
netstat -tulpn
Close any ports that are not required.
Configure a firewall:
Ubuntu/Debian:
ufw status
Enable only necessary services such as:
SSH (22)
HTTP (80)
HTTPS (443)
SSH Security Issues
SSH is a common target for automated attacks.
Recommended actions:
Disable root login.
Use SSH key authentication.
Change default passwords immediately.
Restrict access to trusted IP addresses when possible.
Example:
PermitRootLogin no PasswordAuthentication no
After changes:
systemctl restart sshd
Always verify access before closing your current SSH session.
Missing Security Updates
Security patches often fix vulnerabilities that are actively being exploited.
What to do:
Enable automatic security updates where appropriate.
Ubuntu:
apt install unattended-upgrades
Verify that updates are applied regularly.
Step 2: Check for Signs of Compromise
If vulnerabilities have existed for some time, verify that your server has not already been compromised.
Look for:
Unknown user accounts
Unexpected scheduled tasks (cron jobs)
Suspicious processes
Modified website files
Unusual network activity
New SSH keys that you did not add
Useful commands:
ps aux
crontab -l
last
netstat -plant
If you suspect compromise, change passwords immediately and investigate further.
Step 3: Verify Your Firewall Configuration
A firewall helps limit unauthorized access.
Review firewall rules regularly and allow only services that are actually required.
Example services:
Service | Port |
SSH | 22 |
HTTP | 80 |
HTTPS | 443 |
All other ports should be evaluated and closed if unnecessary.
Step 4: Create Reliable Backups
Even a well-secured server can be affected by:
Hardware failures
Human errors
Malware
Ransomware
Accidental deletion
Backups are your last line of defense.
Option 1: Manual Backups
You can create backups manually by:
Downloading website files
Exporting databases
Copying important configurations
Examples:
Database backup:
mysqldump -u root -p database_name > backup.sql
Website backup:
tar -czf website-backup.tar.gz /var/www/html
Store backups on a separate system whenever possible.
Do not keep your only backup on the same VPS.
Option 2: Time4VPS Backup Service (Recommended)
For better protection, use the Time4VPS Backup Service.
Benefits include:
Automated backup creation
Simplified recovery process
Protection against accidental deletion
Reduced risk of losing important data
Regularly verify that backups are being created successfully and test restoration procedures periodically.
A backup that has never been tested should not be considered fully reliable.
Step 5: Document and Track Remediation
After fixing vulnerabilities:
Record the changes made.
Document update dates.
Keep a list of installed services.
Review security settings regularly.
This helps ensure future audits are easier and security issues are addressed consistently.
Recommended Security Checklist
✓ Operating system fully updated
✓ Applications updated
✓ Strong passwords in use
✓ SSH secured
✓ Firewall configured
✓ Unused services removed
✓ Open ports reviewed
✓ Security updates enabled
✓ Backups configured
✓ Backup restoration tested
✓ Vulnerability findings resolved
Final Recommendation
Security is an ongoing process, not a one-time task. Regular updates, vulnerability reviews, and reliable backups significantly reduce the risk of data loss and server compromise.
If your VPS hosts important websites, applications, or business data, always maintain a current backup strategy and review security settings regularly.
