From 3147ad82b5fb386479dcd28dce128c5f11c526dc Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Tue, 26 Sep 2023 22:15:58 +0900 Subject: [PATCH] Update ipv4_dhcp_ipv6_static_interfaces.cfg --- .../RedHat/CloudInit/ipv4_dhcp_ipv6_static_interfaces.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Linux_reinstall/RedHat/CloudInit/ipv4_dhcp_ipv6_static_interfaces.cfg b/Linux_reinstall/RedHat/CloudInit/ipv4_dhcp_ipv6_static_interfaces.cfg index c8d88ba..8c76d6d 100644 --- a/Linux_reinstall/RedHat/CloudInit/ipv4_dhcp_ipv6_static_interfaces.cfg +++ b/Linux_reinstall/RedHat/CloudInit/ipv4_dhcp_ipv6_static_interfaces.cfg @@ -57,11 +57,17 @@ runcmd: - systemctl stop kdump - systemctl disable kdump - hostnamectl set-hostname HostName + - fallocate -l 512M /swapspace + - chmod 600 /swapspace + - mkswap /swapspace + - swapon /swapspace + - echo '/swapspace none swap sw 0 0' >> /etc/fstab - yum install dnf epel-release -y - dnf install curl dnsutils fail2ban file lrzsz net-tools vim wget -y - sed -i '/^\[Definition\]/a allowipv6 = auto' /etc/fail2ban/fail2ban.conf - sed -ri 's/^backend = auto/backend = systemd/g' /etc/fail2ban/jail.conf - systemctl enable fail2ban - systemctl restart fail2ban + - grub2-mkconfig - rm -rf /etc/cloud/cloud.cfg.d/99-fake_cloud.cfg - touch /etc/cloud/cloud-init.disabled