Add 'CoreModules/generic/conf.sh'
This commit is contained in:
27
CoreModules/generic/conf.sh
Normal file
27
CoreModules/generic/conf.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
##------------##
|
||||
# Fail2Ban #
|
||||
##------------##
|
||||
|
||||
sed -i 's/root@localhost/'$email'/g' /etc/fail2ban/jail.conf
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/sshd.local -O /etc/fail2ban/jail.d/sshd.local
|
||||
if [[ $CMS == "Nextcloud" ]]; then
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/nextcloud.conf -O /etc/fail2ban/filter.d/nextcloud.conf
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/nextcloud.local -O /etc/fail2ban/jail.d/nextcloud.local
|
||||
fi
|
||||
if [[ $CMS == "Wordpress" ]]; then
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/wordpress.conf -O /etc/fail2ban/filter.d/wordpress.conf
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/config/fail2ban/wordpress.local -O /etc/fail2ban/jail.d/wordpress.local
|
||||
fi
|
||||
|
||||
|
||||
##-------##
|
||||
# UFW #
|
||||
##-------##
|
||||
|
||||
sed -i '/IPV6=/c\IPV6=yes' /etc/default/ufw
|
||||
ufw default deny incoming > $OUTPUT 2>&1
|
||||
ufw default allow outgoing > $OUTPUT 2>&1
|
||||
ufw allow 80/tcp > $OUTPUT 2>&1
|
||||
ufw allow 443/tcp > $OUTPUT 2>&1
|
||||
ufw limit 4242/tcp > $OUTPUT 2>&1
|
||||
echo "y" | ufw enable > $OUTPUT 2>&1
|
||||
Reference in New Issue
Block a user