Monday, August 2, 2021

How To Manually Remove CPanel-Provided Hardened Kernel

 The information that is being provided here is regarding the way by which cPanel-provided hardened kernel can be manually replaced with a standard kernel. It needs to be mentioned that the cPanel-provided hardened kernel was deprecated in cPanel & WHM version 68. Hence, updates to this kernel are not provided any more. It is strongly recommended that the hardened kernel be removed. It also needs to be mentioned that the server will need to be rebooted during this procedure. Hence, the downtime needs to be planned accordingly.

To digress, cPanel is a popular web hosting control panel software. It offers a graphical interface as well as automation tools, and administration is enabled in it via a standard web browser through the aid of a three-tier structure. Web hosting is a service that is provided by web hosting companies for the purpose of ensuring that websites are continuously accessible over the Internet. Server space, necessary technologies, and services are provided in web hosting through various web hosting plans to keep websites continuously accessible. Shared hosting, dedicated hosting, reseller hosting, cloud hosting, VPS hosting and WordPress hosting are some of the main types of web hosting services that are offered by most of the web hosting companies. The “Best Windows Hosting Company”, the “Best Cloud Hosting Company”, etc. are the terms with which the most efficient web hosting companies are usually referred to.

How to Manually Remove the Kernel?

The below-mentioned steps need to be carried out for manually replacing the cPanel-provided hardened kernel with a standard kernel.

1: Log in to your server. This has to be done vis SSH.

2: The following commands need to be run:

  • rm /etc/yum.repos.d/cPkernel.repo
  • yum list --showduplicates kernel

A list of available kernels is returned by the system. These kernels can be installed.

  • [root@c6 ~]# yum list --showduplicates kernel
  • Loaded plugins: fastestmirror
  • Loading mirror speeds from cached hostfile
  • * base: reflector.westga.edu
  • * epel: mirror.compevo.com
  • * extras: ftp.osuosl.org
  • * updates: dallas.tx.mirror.xygenhosting.com
  • Installed Packages
  • kernel.x86_64  

 3If a specific kernel needs to be installed, then the following command needs to be run:

yum install KERNELNAME 

In it “KERNELNAME” represents the desired kernel. Alternatively, the command, yum install kernel-2.6.32 needs to be run for installing the latest kernel.

  • [root@c6 ~]# yum install kernel-2.6.32
  • Loaded plugins: fastestmirror
  • Setting up Install Process
  • Loading mirror speeds from cached hostfile
  • * base: reflector.westga.edu
  • * epel: mirror.compevo.com
  • * extras: ftp.osuosl.org
  • * updates: dallas.tx.mirror.xygenhosting.com
  • Resolving Dependencies
  • --> Running transaction check
  • ---> Package kernel.x86_64 0:2.6.32-696.16.1.el6 will be installed
  • --> Finished Dependency Resolution
  • Dependencies Resolved
  • Package   Arch           Version                                                  Repository     Size
  • Installing:
  • Kernel     x86_64        2.6.32-696.16.1.el6                                 updates        32M
  • Transaction Summary
  • Install       1 Package(s)
  • Total download size: 32 M
  • Installed size: 131 M
  • Is this ok [y/N]: y
  • Downloading Packages:
  • kernel-2.6.32-696.16.1.el6.x86_64.rpm                                       |  32 MB     00:11
  • Running rpm_check_debug
  • Running Transaction Test
  • Transaction Test Succeeded
  • Running Transaction
  • Installing : kernel-2.6.32-696.16.1.el6.x86_64                             1/1
  • Verifying  : kernel-2.6.32-696.16.1.el6.x86_64                            1/1
  • Installed:
  • kernel.x86_64 0:2.6.32-696.16.1.el6
  • Complete!

4: The reboot command needs to be run to reboot the server.

5: Once the server reboots, you need to log in once again to your server via SSH. Then the command, uname -r needs to be run.

The output is supposed to resemble the following:

2.6.32-696.13.2.el6.x86_64

It is recommended that you navigate to the Security Advisor interface in WHM, after the hardened kernel has been replaced. Post that, install the KernelCare’s free symlink protection from CloudLinux.

Source: https://www.htshosting.org/knowledge-base/cpanel/247/process-to-manually-remove-cpanel-provided-hardened-kernel

No comments:

Post a Comment

Cloud Hosting Service from HTS Data Centre

  HTS Hosting is a globally renowned service provider of all types of web hosting services, including its highly specialized Cloud hosting ...