icon-zcspm.svg
ZCSPM

CentOS Linux 7 OS Hardening Scripts for Azure Virtual Machines

ZCSPM offers bash scripts for hardening the CentOS 7 OS on your Microsoft Azure Virtual Machine. Make sure you test the scripts on a testing environment before running them on a production environment.

Hardening Script for ZCSPM supported Security Policies

Azure_CSBP_CentOS_Linux7_Remediation.sh: ZCSPM can remediate about 27 security policies to harden CentOS 7 on an Azure virtual machine.

  • Close

To run the Zscaler-recommended hardening script:

  1. Make sure you are logged in to the virtual machine as a root user.
  2. Open the bash terminal and download the script from GitHub using the following command:
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/CentOS7/Azure_CSBP_CentOS_Linux7_Remediation.sh -O Azure_CSBP_CentOS_Linux7_Remediation.sh
  1. Switch to root using the following command:
sudo su
  1. Run the script using the following command:
bash Azure_CSBP_CentOS_Linux7_Remediation.sh

You can scan the relevant cloud account in the ZCSPM Admin Portal and view the security policy results.

Hardening script for CIS Compliance

CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh: ZCSPM offers a more extensive script which remediates 142 out of 223 security policies for the CIS CentOS 7 Benchmark.

ZCSPM cannot remediate 81 security policies because either the appropriate APIs and commands are unavailable for automatic remediation, or they need user inputs and have to be manually remediated.

  • Close
  • Close

To run the CIS compliance hardening script:

  1. Make sure you are logged in to the virtual machine as a root user.
  2. Open the terminal and download the script from GitHub using the following command::
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/CentOS7/CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh -O CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh
  1. Switch to root using the following command::
sudo su
  1. Run the script using the following command:
bash CIS_CentOS_Linux7_Benchmark_v2_2_0_Remediation.sh
Related Articles
CentOS Linux 7 OS Hardening Scripts for Azure Virtual MachinesRed Hat Enterprise Linux 7 OS Hardening Scripts for AWS EC2 InstancesUbuntu 18.04 OS Hardening Scripts for Azure Virtual MachinesWindows Server 2019Windows Server 2016Windows Server 2012 R2