From a208690520ea300cf0e9e111a6001660cd4ff1da Mon Sep 17 00:00:00 2001 From: Nitescu Lucian Date: Wed, 29 Mar 2017 10:22:18 +0300 Subject: [PATCH] Create ufw_reset.sh --- tools/ufw_reset.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tools/ufw_reset.sh diff --git a/tools/ufw_reset.sh b/tools/ufw_reset.sh new file mode 100644 index 00000000..4843a28f --- /dev/null +++ b/tools/ufw_reset.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +#Root needed +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + +#Color code +yellow=`tput setaf 3` + +echo "${blue}Checking local firewall status.${reset}" +ufw status verbose + +#UFW CONFIGURATION +echo "${yellow}Would you like to reconfigure ufw settings? (y/n)${reset}" +read foa +if [ "$foa" = "y" ]; then +ufw allow 22 +ufw allow 25 +ufw allow 53 +ufw allow 80 +ufw allow 443 +ufw allow 587 +ufw allow 993 +ufw allow 995 +ufw allow 4190 +ufw enable +fi