|
|
|
@ -105,13 +105,30 @@ source ./scripts/subinstallers/platform.sh |
|
|
|
|
|
|
|
|
|
|
|
# iptables |
|
|
|
# iptables |
|
|
|
echo "Setting up firewall (iptables)" |
|
|
|
echo "Setting up firewall (iptables)" |
|
|
|
if [ ! -f "/etc/iptables/rules.v4" ]; then |
|
|
|
if [ -f "/etc/iptables/rules.v4" ]; then |
|
|
|
echo "Setting iptables rules..." |
|
|
|
echo "Caution: iptables rules exist." |
|
|
|
./scripts/subinstallers/iptables.sh |
|
|
|
|
|
|
|
else |
|
|
|
read -p "Would you like to Clear (C) existing iptables rules or Add (A) to existing rules (this may cause problems)?" MISTBORN_IPTABLES_ACTION |
|
|
|
echo "iptables rules exist. Leaving alone." |
|
|
|
echo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "${MISTBORN_IPTABLES_ACTION}" =~ ^([cC])$ ]]; then |
|
|
|
|
|
|
|
# clear |
|
|
|
|
|
|
|
sudo rm -rf /etc/iptables/rules.v4 |
|
|
|
|
|
|
|
sudo rm -rf /etc/iptables/rules.v6 || true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif [[ "${MISTBORN_IPTABLES_ACTION}" =~ ^([aA])$ ]]; then |
|
|
|
|
|
|
|
# do nothing |
|
|
|
|
|
|
|
echo "Proceeding..." |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
echo "Unrecognized action: stopping" |
|
|
|
|
|
|
|
exit 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Setting iptables rules..." |
|
|
|
|
|
|
|
source ./scripts/subinstallers/iptables.sh |
|
|
|
|
|
|
|
|
|
|
|
# SSH Server |
|
|
|
# SSH Server |
|
|
|
sudo -E apt-get install -y openssh-server |
|
|
|
sudo -E apt-get install -y openssh-server |
|
|
|
|