Press enter to see results or esc to cancel.

 

Plesk

Plesk

BotGuard provides an Plesk hosting control panel integration module. We support the following Linux operating systems:

  • Debian 10 ("buster"), 9 ("stretch")
  • Ubuntu 20.04 ("focal"), 18.04 ("bionic"), 16.04 ("xenial")
  • RHEL/CentOS 8, 7, 6

The integration procedure depends on the type of operating system used:

Web server mode

BotGuard Plesk integration extension supports Apache and Nginx web servers, working in Nginx+Apache and Nginx-only modes.

You need to install the BotGuard module for Apache as described in the Apache Integration Manual, skipping module configuration frontend. The module parameters to be configured via Plesk.

Download, unpack and install BotGuard module for Nginx following the commands listed below:

mkdir nginx
cd nginx
add-apt-repository "deb https://repo.botguard.net/debian $(lsb_release -cs) main nginx"
apt update
apt download libnginx-mod-botguard
ar x libnginx-mod-botguard*.deb
tar -xf data.tar.xz
mv usr/lib/nginx/modules/ngx_botguard_module.so /usr/share/nginx/modules/
echo "load_module nginx/modules/ngx_botguard_module.so;" >
/etc/nginx/modules.conf.d/mod-botguard.conf
mv etc/nginx/conf.d/50-botguard.conf /etc/nginx/conf.d/

Comment out the string aio threads; in the 50-botguard.conf config file and save changes.

nano /etc/nginx/conf.d/50-botguard.conf

Remove temporary files and restart Nginx:

cd ..
rm -rf nginx
service nginx restart

Download and install Plesk extension:

plesk bin extension -i botguard-plesk-1.0.1.zip

Edit the config files as follows:

  • In the /etc/passwd file replace the string
    psaadm:x:997:1000:psa user:/opt/psa/admin:/usr/sbin/nologin
    with
    psaadm:x:997:1000:psa user:/opt/psa/admin:/bin/bash
  • To the /etc/sudoers add a new string
    psaadm ALL=(ALL) NOPASSWD: /usr/sbin/service

Fix ACLs:

chown :psaadm /etc/nginx/conf.d/50-botguard.conf
chown :psaadm /etc/apache2/mods-available/botguard.conf
chmod g+rw /etc/apache2/mods-available/botguard.conf
chmod g+rw /etc/nginx/conf.d/50-botguard.conf

Web server mode

BotGuard Plesk integration extension supports Apache and Nginx web servers, working in Nginx+Apache and Nginx-only modes.

You need to install the BotGuard module for Apache as described in the Apache Integration Manual, skipping module configuration frontend. The module parameters to be configured via Plesk.

Download, unpack and install BotGuard module for Nginx using the following commands:

mkdir nginx
cd nginx
rpm --import https://repo.botguard.net/botguard.gpg
yum install yum-utils
yum-config-manager --add-repo https://repo.botguard.net/BotGuard.repo
yum-config-manager --disable botguard
yum-config-manager --enable botguard-nginx
yumdownloader nginx-mod-botguard
rpm2cpio nginx-mod-botguard-version.x86_64.rpm | cpio -idmv # используйте имя скачанного файла вместо nginx-mod-botguard-version.x86_64.rpm
mv usr/lib64/nginx/modules/ngx_botguard_module.so /usr/share/nginx/modules/
echo "load_module nginx/modules/ngx_botguard_module.so;" > /etc/nginx/modules.conf.d/mod-botguard.conf
mv etc/nginx/conf.d/50-botguard.conf /etc/nginx/conf.d/

Comment out the string aio threads; in 50-botguard.conf config file and save changes:

nano /etc/nginx/conf.d/50-botguard.conf

Set SELinux security context for the new files:

restorecon /etc/nginx/conf.d/50-botguard.conf
restorecon /usr/share/nginx/modules/ngx_botguard_module.so

Remove temporary files and restart Nginx:

cd ..
rm -rf nginx
service nginx restart

Download and install Plesk extension:

plesk bin extension -i botguard-plesk-1.0.1.zip

Edit the config files as follows:

  • In the /etc/passwd file replace the string
    psaadm:x:997:1001:psa user:/usr/local/psa/admin:/usr/sbin/nologin
    with
    psaadm:x:997:1001:psa user:/usr/local/psa/admin:/bin/bash
  • To the /etc/sudoers add a new string
    psaadm ALL=(ALL) NOPASSWD: /usr/sbin/service

Fix ACLs:

chown :psaadm /etc/nginx/conf.d/50-botguard.conf
chown :psaadm /etc/httpd/conf.d/botguard.conf
chmod g+rw /etc/httpd/conf.d/botguard.conf
chmod g+rw /etc/nginx/conf.d/50-botguard.conf

Using the extension

Authorize to Plesk as an Administrator and start typing “Botguard’ to the search form, confirm your choice. The extension is also available in the Links to Additional Services menu (when using a Service Provider view). Enter your API Key, Botguard nodes addresses and save settings:

Then, authorize to Plesk as a user and press BotGuard Settings:

Enable protection and save settings:

Go to the Rules tab to manage the protection rules: