Update dhcp_interfaces.cfg

This commit is contained in:
Molly Lau 2023-09-29 00:28:46 +09:00 committed by GitHub
parent b93d50ad7b
commit f6333c8450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,12 +46,7 @@ runcmd:
- sed -ri 's/^#?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
- sed -ri 's/^#?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config
- systemctl enable sshd
- ssh-keygen -A
- systemctl restart sshd
- sed -i '6i \ \ <port port="sshPORT" protocol="tcp"/>' /etc/firewalld/zones/public.xml
- sed -i '7i \ \ <port port="sshPORT" protocol="udp"/>' /etc/firewalld/zones/public.xml
- systemctl enable firewalld
- firewall-cmd --reload
- systemctl stop kdump
- systemctl disable kdump
- hostnamectl set-hostname HostName
@ -60,12 +55,10 @@ runcmd:
- 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
- sed -i '6i \ \ <port port="sshPORT" protocol="tcp"/>' /etc/firewalld/zones/public.xml
- sed -i '7i \ \ <port port="sshPORT" protocol="udp"/>' /etc/firewalld/zones/public.xml
- dnf install curl dnsutils epel-release file lrzsz net-tools vim wget -y
- systemctl daemon-reload
- grub2-mkconfig
- rm -rf /etc/cloud/cloud.cfg.d/99-fake_cloud.cfg
- touch /etc/cloud/cloud-init.disabled