From 485b22a6b604ef6dd9697e6c51198f551eef465b Mon Sep 17 00:00:00 2001 From: TommyTran732 <57488583+tommytran732@users.noreply.github.com> Date: Thu, 2 Jan 2020 17:27:00 -0500 Subject: [PATCH] Update cloudflare.sh --- cloudflare.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cloudflare.sh b/cloudflare.sh index 1874080..adf0562 100644 --- a/cloudflare.sh +++ b/cloudflare.sh @@ -6,6 +6,13 @@ output(){ if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then apt -y install ufw + # Opening Port 22 just in case so that we do not lose the internet connection when the rules are applied. + ufw allow 22 + ufw allow from 173.245.48.0/20 to any proto tcp port 80 + ufw allow from 103.21.244.0/22 to any proto tcp port 80 + ufw allow from 103.22.200.0/22 to any proto tcp port 80 + ufw allow from 103.31.4.0/22 to any proto tcp port 80 + elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" = "centos" ]; then yum -y install firewalld else