How to Secure VPS

How to Secure VPS

Apr 24, 2019
About VPS


No matter which operating system is preinstalled on your virtual machine, you should understand that security of your server is a must. Below we have listed some pieces of advice on how to keep your VPS secure and protect it from malicious activity. While some tips can differ depending on the OS you are using, most general guides are applicable both for Windows and Unix-based virtual servers.


Customize an administrator account details

Whether you are renting a Linux VPS in Netherlands or Windows VPS hosting in UK, every hoster sets up some default administrator account along with an OS. For example, in case of Linux VPS, a standard username is “root”. If you leave this unchanged, hackers who may try to attack your server have better chances to crack the password. For higher security you may consider creating a user with restricted rights or limiting root privileges. For details, see the sections below.


Create a strong password

The next step for securing your virtual server is installing a long and robust password for administrator account. Unfortunately, this crucial requirement is often neglected. To compose a good password, avoid existing words, blend smaller case and caps, numbers and special characters.


Create a user with restricted rights

Beside a standard administrator account, you can add a user with limited rights and disable direct root-user access through SSH or RDP port. Specify a custom username and password for this new user.


Modify an SSH/RDP port number

To access a virtual machine remotely, one can use either secure shell (for Linux) or remote desktop (for Windows) protocol. The standard listening port for secure shell is 22, the one for remote desktop protocol is 3389. To keep your server safe from malicious scripts, replace it with a random port number. Don’t forget to assure that your new port number is vacant.


Regularly update your system

OS, software, application and control panel developers constantly provide latest versions of their products and security patches. To avoid software vulnerabilities, keep your system up-to-date. If you don’t want to download and install updated versions manually, you can apply automatic updating. However, it doesn’t concern optional updates. Update both package lists and packages themselves.


Don’t trust random software sources

When you download some additional software and applications, apply to official repositories for their distribution. If you download a package from a third-party channel, keep it in mind that this may be risky.


Secure specific software

Whenever you install and run specific applications, take your time to thoroughly read all the security guidelines and recommendations provided by SW developers.

Install Fail2ban/Wail2ban package

If you are a user of Linux VPS in USA or any other country, it is a good idea to install Fail2ban, which is a log-parsing app meant to detect automated attacks and defend a server from brute-force attacks. There are also free analogues of this package for Windows, such as Wail2ban for example. After the app installation, backup the configuration file and customize it to your usage.


The list can go on and on. We’ve only mentioned some key points of security. If you want to further investigate the topic, wait for our forthcoming posts. If you’re still considering different hosting options, get familiar with VPS server, Sweden. Regardless of where you are and which hosting service you are using, take care of your server safety and don’t allow any intruder to interfere with your project.