deployment_ddcdn_multisite/bin/first-install/setup_firewall_fail2ban.sh

12 lines
261 B
Bash

#!/bin/bash
echo -e "${PURPLE}${BOLD}Setup Firewall and Fail2ban${RESET}"
install_pkg ufw
install_pkg fail2ban
systemctl enable fail2ban
get_ssh_port
ufw allow $SSH_PORT
ufw allow http
ufw allow https
echo -e "${PURPLE}Firewall and Fail2ban are setup${RESET}"