deployment-dcdn/bin/setup_firewall_fail2ban.sh

15 lines
300 B
Bash
Raw Permalink Normal View History

2024-05-02 23:54:06 +02:00
#!/bin/bash
. bin/variables.sh
. bin/functions.sh
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}"