service rsyslog stop
service auditd stop
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
sed -i 's/rhgb quiet/net.ifnames=0 biosdevname=0 ipv6.disable=1/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
echo 'TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
NAME="eth0"
DEVICE="eth0"
ONBOOT="yes"' > /etc/sysconfig/network-scripts/ifcfg-eth0
yum update -y
yum install -y open-vm-tools bash-completion yum-utils
package-cleanup -y --oldkernels --count=1
yum -y install iptables-services
systemctl enable iptables.service
systemctl stop firewalld
systemctl start iptables
systemctl disable firewalld
systemctl mask firewalld
Configuring iptables to allow all connection
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
service iptables save
systemctl disable NetworkManager.service
systemctl stop NetworkManager.service
systemctl mask NetworkManager
logrotate -f /etc/logrotate.conf
rm -f /var/log/*-???????? /var/log/*.gz
rm -f /var/log/dmesg.old
rm -rf /var/log/anaconda
rm -rf /var/cache/yum
cat /dev/null > /var/log/audit/audit.log
cat /dev/null > /var/log/wtmp
cat /dev/null > /var/log/lastlog
cat /dev/null > /var/log/grubby
rm -f /etc/ssh/ssh_host_*
yum clean all
rm -rf /root/.ssh/
rm -f /root/anaconda-ks.cfg
rm -rf /tmp/*
cat /dev/null > ~/.bash_history && history -c
sys-unconfig