Added metrics endpoint to ufw allow list

This commit is contained in:
2023-11-01 23:31:47 +01:00
parent 6dff1d4241
commit fa5a818e7f
+2 -1
View File
@@ -15,9 +15,10 @@ runcmd:
- printf "[sshd]\nenabled = true\nbanaction = iptables-multiport" > /etc/fail2ban/jail.local
- systemctl enable fail2ban
- ufw allow OpenSSH
- ufw allow 16443 comment Kubernetes
- ufw allow 16443 comment "Kubernetes API endpoint"
- ufw allow 80 comment HTTP
- ufw allow 443 comment HTTPS
- ufw allow to ${node_ip} port 9100 comment "Metrics endpoint"
- ufw enable
- sed -i -e '/^\(#\|\)PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config
- sed -i -e '/^\(#\|\)PasswordAuthentication/s/^.*$/PasswordAuthentication no/' /etc/ssh/sshd_config