Update dapostinstall.sh
This commit is contained in:
+6
-9
@@ -135,21 +135,18 @@ sed -i "s/,22,/,22,10022,/g" /etc/csf/csf.conf
|
|||||||
|
|
||||||
echo "Ustawienie dodatkowych zabezpieczen SSH"
|
echo "Ustawienie dodatkowych zabezpieczen SSH"
|
||||||
|
|
||||||
tee -a /etc/ssh/sshd_config > /dev/null <<EOT
|
if ! grep -q '^Match User root' /etc/ssh/sshd_config; then
|
||||||
Match User root Address 185.242.134.0/24,185.242.133.37,185.242.134.92,185.242.134.93,193.177.165.192,193.177.165.193,193.177.165.194,193.177.165.195,193.177.165.196
|
daupdate secssh
|
||||||
PubkeyAuthentication yes
|
fi
|
||||||
PasswordAuthentication yes
|
|
||||||
PermitRootLogin yes
|
|
||||||
EOT
|
|
||||||
|
|
||||||
echo "Ustawienie kluczy logowania do DirectAdmina i kluczy SSH hitme"
|
echo "Ustawienie kluczy logowania do DirectAdmina i kluczy SSH hitme"
|
||||||
|
|
||||||
daupdate klucze
|
if ! grep -Fq '185.242.134.92' /root/.ssh/authorized_keys; then
|
||||||
|
|
||||||
if ! grep -q '^Match User root' /etc/ssh/sshd_config; then
|
|
||||||
daupdate keyput
|
daupdate keyput
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
daupdate klucze
|
||||||
|
|
||||||
cd $DAPOSTINSTALL_DIR
|
cd $DAPOSTINSTALL_DIR
|
||||||
|
|
||||||
echo "Instalacja Modsecurity i regułek malware experts"
|
echo "Instalacja Modsecurity i regułek malware experts"
|
||||||
|
|||||||
Reference in New Issue
Block a user