How to protect your linux VPS server centos

Hey all, not what not long ago was writing, that’s decided to do something to write) today we will talk about how to protect your VPS server. Taking into account the need to indicate that the operating system on the linux server using Centos 6 +.
CentOS linux vps
This article will probably consist of several, as each statement in one article does not fit. Every system administrator takes measures to protect its virtual server, those measures that it considers necessary and suitable for the tasks.
Therefore, when reading this article, keep in mind that all of these measures had been taken by me only for server security, by Brutus force SYNFLOOD attacks, PORTFLOOD and even against light ddos’a🙂. Just try to take protective measures against various DNS cache injection.
If you need something more serious, you need to perform more complex actions, such as ordering various services, such as DDOS filter, or services from companies that optimize your server so that it will be optimized and protected by the new technologies, but it is worth remembering that no one had come up with the perfect protection for anything, so to ensure fully the security of your server is quite the challenge.
How to protect your VPS server
Rasplaniruem plan to start their action, in order to do not forget there is no Miss)
Completely, if possible, update the software on the server before the new stable releases.
Install additional patches, components, modules for protection for your server.
Optimize and configure all settings of the server for our purposes.
Monitor and observe the situation on the server.
Then we will optimize and donastraivaem🙂
So the plan of action identified, drove.
First of all, let’s check that with the deal, will learn the OS version:
Just learn the core
Update to the latest version, but before that you should consider many things when you upgrade, it is worth remembering that we can easily update our software on the server, but you do it to us and will work with new versions of websites, whether the various conflicts, it is necessary to consider first of all.
If the server version of php 5.2 + you should consider that for this version too strong variations in the syntax of the code, in contrast to more recent versions of php, it’s the same for mysql, pgsql and other software on the server.
Just before it is best to remember the settings that were set prior to, so look carefully what modules, version and config files, to make backup copies of all important server configs.
If the server uses fcgi can still copy the conf, and possibly other important that you have installed on the server, all are situational.
The database should also make actual copies, you can make a script, the script when I found on one of the sites, for which he thanks a lot.
How to make sql dump all databases in one scenario:
for i in ‘ mysql-p VAŠ_PAROL′e’show databases; | grepv information_schema | grep-v Database ; do mysqldump-p VAŠ_PAROL′ $i > date +% Y% m% d ‘$i; gzip date +% Y% m% d ‘$i;d one
for i in ‘ mysql-p VAŠ_PAROL′e’show databases; | grepv information_schema | grep-v Database ; do mysqldump-p VAŠ_PAROL′ $i > date +% Y% m% d ‘$i; gzip date +% Y% m% d ‘$i;d one
After you run the command, the folder/backup/mysql/will be all our dumps🙂
Look and remember to worry that it is running on the server and a port:
If we do not want to update mysql, pgsql or php to newer versions, let’s add a line to the file yum.conf, so party yum.conf exclude:
In the opened file to the end of that line, add the values:
for example, php *, kernel, mysql *, * etc.
In this case, I do not want to upgrade the version of php and mysql so:
exclude = php * php *, * 5.3 5.4 *, mysql
Well travelled:
yum update
And another, it seems to me the right information for those who have decided to buy a vacuum cleaner with all modern twists, to do this just go to the site and more details please read the proposals and technical capabilities.