mirror of
https://github.com/tommytran732/Pterodactyl-Script
synced 2024-11-22 10:31:34 -05:00
Update install.sh
This commit is contained in:
parent
f44f777660
commit
40570e60bd
24
install.sh
24
install.sh
@ -826,8 +826,6 @@ firewall(){
|
||||
yum -y install iptables
|
||||
fi
|
||||
|
||||
block_icmp
|
||||
|
||||
output "Setting up Fail2Ban..."
|
||||
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
||||
apt -y install fail2ban
|
||||
@ -889,28 +887,6 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
block_icmp(){
|
||||
output "Block ICMP (Ping) Packets?"
|
||||
output "You should choose [1] if you are not using a monitoring system and [2] otherwise."
|
||||
output "[1] Yes."
|
||||
output "[2] No."
|
||||
read icmp
|
||||
case $icmp in
|
||||
1 ) if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
||||
sed -i '/ufw-before-input.*icmp/s/ACCEPT/DROP/g' /etc/ufw/before.rules
|
||||
sudo ufw reload
|
||||
elif [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" = "rocky" ]; then
|
||||
firewall-cmd --permanent --add-icmp-block-inversion
|
||||
firewall-cmd --reload
|
||||
fi
|
||||
;;
|
||||
2 ) output "Skipping rule..."
|
||||
;;
|
||||
* ) output "You did not enter a valid selection."
|
||||
block_icmp
|
||||
esac
|
||||
}
|
||||
|
||||
database_host_reset(){
|
||||
SERVER_IP=$(curl -s http://checkip.amazonaws.com)
|
||||
adminpassword=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`
|
||||
|
Loading…
Reference in New Issue
Block a user