Skip to content
Snippets Groups Projects
Commit 05dfc6aa authored by Elian Loraux's avatar Elian Loraux
Browse files

Fail2ban for dolibarr

parent 75183448
Branches
Tags
1 merge request!3add rules of dolibarr
......@@ -441,11 +441,6 @@ port = http,https
#
#
[dolibarr]
port = http,https
logpath = /usr/share/dolibarr/documents/dolibarr.log
enabled = true
[drupal-auth]
port = http,https
......
......@@ -112,7 +112,7 @@ cat id_rsa.pub >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
#Fail 2 ban
cp ./etc/fail2ban/* /etc/fail2ban
cp ./etc/fail2ban/jail.conf /etc/fail2ban
systemctl restart fail2ban
#Ssh
......
......@@ -137,3 +137,19 @@ read -p "Hit enter when you are done with the manual upgrade step"
echo "En cas d'erreur de type The maximum column sze is 767 bytes, please adapt the following query:"
echo "ALTER TABLE llx_my_table ROW_FORMAT=DYNAMIC ;"
echo "After running it, restart the manual upgrade"
#Fail 2 ban
if [ -n "`dpkg -l | grep fail2ban`" ]
then
echo "Updating fail2ban config for dolibarr"
#Fail 2 ban
if [ -z "`grep dolibarr /etc/fail2ban/jail.conf`" ]
then
echo -e "[dolibarr] \nport = http,https \nlogpath = /usr/share/dolibarr/documents/dolibarr.log \nenabled = true"
fi
if [ -e /etc/fail2ban/filter.d/dolibarr.conf ]
then
cp ./etc/fail2ban/filter.d/dolibarr.conf /etc/fail2ban/filter.d
fi
fail2ban-client reload
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment