removed knockd ufw, added php modules
This commit is contained in:
+16
-14
@@ -33,22 +33,24 @@ echo -n "checking if ufw is installed"
|
|||||||
ufw_installed=$(apk list -I | grep "ufw")
|
ufw_installed=$(apk list -I | grep "ufw")
|
||||||
if ! $ufw_installed; then
|
if ! $ufw_installed; then
|
||||||
echo -n "ufw installed"
|
echo -n "ufw installed"
|
||||||
|
|
||||||
|
mv /etc/knockd.conf /etc/knockd.conf.ori
|
||||||
|
cp "$_assets"/knockd.conf /etc/knockd.conf
|
||||||
|
echo -n "define a sequence number for opening ssh (as 7000,8000,9000) : "
|
||||||
|
read sq
|
||||||
|
sed -i "s/7000,8000,9000/$sq/g" /etc/knockd.conf
|
||||||
|
|
||||||
|
rc-update add knockd
|
||||||
|
/etc/init.d/knockd start
|
||||||
|
|
||||||
|
ufw delete allow ssh
|
||||||
|
|
||||||
|
echo -e "knockd installed and configured"
|
||||||
|
echo -e "please note this sequence for future ssh knocking"
|
||||||
|
echo "$sq"
|
||||||
else
|
else
|
||||||
#. bin/ufw.sh
|
#. bin/ufw.sh
|
||||||
|
echo -n "ufw not installed, needed by knockd, configuration aborted"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv /etc/knockd.conf /etc/knockd.conf.ori
|
|
||||||
cp "$_assets"/knockd.conf /etc/knockd.conf
|
|
||||||
echo -n "define a sequence number for opening ssh (as 7000,8000,9000) : "
|
|
||||||
read sq
|
|
||||||
sed -i "s/7000,8000,9000/$sq/g" /etc/knockd.conf
|
|
||||||
|
|
||||||
rc-update add knockd
|
|
||||||
/etc/init.d/knockd start
|
|
||||||
|
|
||||||
ufw delete allow ssh
|
|
||||||
|
|
||||||
echo -e "knockd installed and configured"
|
|
||||||
echo -e "please note this sequence for future ssh knocking"
|
|
||||||
echo "$sq"
|
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ echo -e '
|
|||||||
'
|
'
|
||||||
echo -e "Installing PHP 7.0"
|
echo -e "Installing PHP 7.0"
|
||||||
sleep 3
|
sleep 3
|
||||||
apk add php7 php7-fpm php7-pdo_mysql php7-opcache php7-curl php7-mbstring php7-zip php7-xml php7-gd php7-mcrypt php7-imagick php7-phar php7-json php7-dom
|
apk add php7 php7-fpm php7-pdo_mysql php7-opcache php7-curl php7-mbstring php7-zip php7-xml php7-gd php7-mcrypt php7-imagick php7-phar php7-json php7-dom php7-tokenizer php7-iconv php7-xmlwriter
|
||||||
|
|
||||||
echo -e "Configuring PHP"
|
echo -e "Configuring PHP"
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ sleep 2
|
|||||||
|
|
||||||
# TODO use awall instead of ufw ?
|
# TODO use awall instead of ufw ?
|
||||||
|
|
||||||
|
# BUG
|
||||||
|
# ufw
|
||||||
|
# Traceback (most recent call last):
|
||||||
|
# File "/usr/sbin/ufw", line 25, in <module>
|
||||||
|
# import ufw.frontend
|
||||||
|
# ModuleNotFoundError: No module named 'ufw'
|
||||||
|
|
||||||
|
|
||||||
# ufw
|
# ufw
|
||||||
apk add ufw@testing
|
apk add ufw@testing
|
||||||
ufw allow ssh # knockd will open the ssh port
|
ufw allow ssh # knockd will open the ssh port
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ each alpine linux stable release has it's branch (master is a clone of the last
|
|||||||
- [x] dotfiles
|
- [x] dotfiles
|
||||||
- [x] user
|
- [x] user
|
||||||
- [x] secure openssh
|
- [x] secure openssh
|
||||||
- [x] Ufw (may be eventualy replaced by awall ?)
|
- [ ] Ufw (may be eventualy replaced by awall ?)
|
||||||
- [x] Fail2ban
|
- [x] Fail2ban
|
||||||
- [x] Knockd
|
- [ ] Knockd
|
||||||
- [x] Mariadb (bug https://bugs.alpinelinux.org/issues/9046)
|
- [x] Mariadb (bug https://bugs.alpinelinux.org/issues/9046)
|
||||||
- [x] mysql backups
|
- [x] mysql backups
|
||||||
- [x] php7-fpm (7.2)
|
- [x] php7-fpm (7.2)
|
||||||
|
|||||||
Reference in New Issue
Block a user