Created
January 9, 2021 19:02
-
-
Save oBuTr471b/273a332fd338346bb8a491bbd8d68a69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In The Name Of Allah . | |
# -- --- ---- -- ----- - | |
# Thu Nov 19 14:20:52 2020 | |
# Written By : zer0err0r . | |
# ======= == = ========= = | |
# 20, CentOS Template[Golden, Sealed] Image . | |
= The idea is to create a clean centos VM so you can test your services on it without getting interrupted . | |
= There are many steps to do, We will see here the most important one . | |
= First of all, Change into [root], Then : | |
# Keep the [root] and remove all other users : | |
$ userdel -r zer0err0r | |
# Update the system : | |
$ dnf update -y | |
# Put SELinux in the permissive mode : | |
$ vim /etc/selinux/config | |
SELINUX=permissive | |
# Disable the firewall : | |
$ systemctl stop firewalld | |
$ systemctl disable firewalld | |
# Set the machine name into the standard : | |
$ hostnamectl set-hostname localhost.localdomain | |
# Clean your dnf temporary files : | |
$ dnf clean all | |
# Remove other temporary files : | |
$ rm /var/tmp/* /etc/ssh/*key* | |
$ rm ~/.ssh | |
# Clear your command history : | |
$ unset HISTFILE | |
$ rm /root/.bash_history /root/anaconda-ks.cfg | |
# Remove [UUID, HWADDR] from the NIC : | |
$ vim /etc/sysconfig/network-scripts/ifcfg-eth0 | |
# Clear [/var/log/] files : | |
$ for i in $(find /var/log/ -type f); do cp /dev/null $i; done | |
# Execute the following [I forgot what they are about] : | |
$ touch /root/.unconfigured | |
$ rm /etc/udev/rules.d/70-* | |
# Finally : | |
= Shutdown and export the system for backup . | |
= Then clone it everytime you wanted to test something . | |
# ===== == ==== ======== = | |
# Peace Be Up0n Muhammed . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment