How to Secure a VPS?

1. Set a secure and unique root password

Using easy passwords like "pass1234" or "dog" can result in unauthorized access to your server. Always make sure that you set a unique root password that is not a dictionary word or something that can be easily guessed. It is recommended to use a password of at least 8 characters and consisting of letters, numbers, and symbols.
You can generate a strong password here in this website
https://www.lastpass.com/features/password-generator

2. Use a firewall (like iptables)

A firewall acts as a barrier between your VPS and the rest of the world. With a firewall you can decide what packets do and do not get access to your server. Which ports, which IP's, etc. Using this type of access restriction can help you protect your server.

3. User accounts

Root accounts are the primary target of attackers. One method used to prevent this is to disable root login access. Users login via a seperate user account, then escalate to root level privileges after logging in.

4. Change the SSH listening port

As port 22 is the default listening port for SSH, it is a common port targeted by attackers. To prevent this, a common practice is to change the SSH port to something else.


5. Prevent brutforce attempts and ban malicious users


By running software like fail2ban, you can block off access to IP's that attempt bruteforce attacks on your server.

6. Run up to date software

As software gets updated, security holes and vunerabilities get patched. Attackers know this and will target services running outdated software. To prevent this, keep the software that you use up to date.


7. Cleaning up after an attack

It is advised to always start fresh with a clean OS install. Make sure that you have backups of your critical data first and that you have checked this data to make sure that no malicious scripts have been inserted.

  • 77 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

Why is my VPS in the wrong location?

Sometimes the IP block you are on is not geolocated to the proper location as the GEOIP sites are...

Why am I getting low speed than advertised ?

Speed of a vps and vpn depends on many factors like latency,network congestions at your ISP ends...

what is the windows 2003 password ?

After creating vps from Windows 2003 first you will need to login with blank password and then it...

How to use vnc viewer?

Many times when installing Linux or Windows OS, you will need to use VNC to finish the...

what are your speedteest network test links?

Speedtest premium Chinese optimized networks CKVM/CSSD VPS plans (cn2 GIA+china...