Critical root vulnerability on server [CVE-2019-10149 Exim <4.92]

Today I received an email from Linux Malware Detect Software on the vulnerability of my server and would like to share with you how to resolve this issue. Below is the content an email.

Important security notice,
The Linux Malware Detect installation running on server has
detected that you may be vulnerable to a critical remote code execution
vulnerability. The currently installed version of Exim MTA v4 improperly
validates recipient addresses and can allow malicious code execution to
take place. This may provide a path for malicious actors to gain root
access, remotely, to this system. This vulnerability currently has known
exploits circulating with both targeted and automated compromises taking
place against vulnerable systems.

Please upgrade Exim to version 4.92 or a known patched earlier version
immediately. Alternatively, if upgrading is not an immediate option,
consider disabling the Exim MTA service as soon as possible.

Disable Exim:

touch /etc/eximdisable
service exim stop
systemctl disable exim
chkconfig exim off

Upgrade Exim:
1. DirectAdmin:

cd /usr/local/directadmin/custombuild
./build update
./build set exim yes
./build set eximconf yes
./build update
./build exim
./build exim_conf

2. cPanel https://documentation.cpanel.net/display/CKB/CVE-2019-10149+Exim

RedHat / CentOS
https://pkgs.org/download/exim

Further reading:
https://blog.cpanel.com/exim-cve-2019-10149-protect-yourself/
https://documentation.cpanel.net/display/CKB/CVE-2019-10149+Exim
https://www.exim.org/static/doc/security/CVE-2019-10149.txt
https://access.redhat.com/security/cve/cve-2019-10149

How to install WordPress, Linux, Nginx, MariaDB 10.3, PHP 7.3 (LEMP stack) on CentOS 7

LEMP (also known as LNMP) is a group of open-source software which enable a server to host dynamic websites and web applications. It consists of the Linux operating system, the (E)Nginx web server (which replaces the Apache component of a LAMP stack), the MySQL relational database management system, and the PHP programming language.

Continue reading “How to install WordPress, Linux, Nginx, MariaDB 10.3, PHP 7.3 (LEMP stack) on CentOS 7”

How to set up master slave replication in MySQL

MySQL replication is a process that enables data from one MySQL database server (the master) to be copied automatically to one or more MySQL database servers (the slaves). Replication is asynchronous by default. Slaves do not need to be connected permanently to receive updates from the master. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.

Continue reading “How to set up master slave replication in MySQL”

How to disable Let’s Encrypt for the hostname

If you want to replace the certificate for your hostname with a custom certificate but you had enabled Let’s Encrypt, you will need to disable Let’s Encrypt for the hostname first. The following command let’s DirectAdmin know that it does not need to renew the Let’s Encrypt certificate. This is required as DirectAdmin will renew the certificate +/- 60 days after the last renewal, even when the Let’s Encrypt certificate is not installed.

rm -rf /usr/local/directadmin/data/users/user_name/domains/domain_name.lt.san_config
rm -rf /usr/local/directadmin/data/users/user_name/domains/domain_name.lt.cert.creation_time