To keep Mikiri WAF up to date, it is recommended to install updates in a timely manner. In addition to the system environment, the agents require auxiliary pip dependencies.
Mikiri WAF is updated from the repository using the package manager installed in the system (apt, yum, or another). Before updating the agents, we recommend reviewing the list of changes in the Release Notes section.
Before updating, it is recommended to back up the main configuration files:
/etc/nginx/mikiri-waf/filter/global/waf.conf
/etc/mikiri-waf-mlc/mlc.conf
/etc/mikiri-waf-mlc/conf/*.conf
/var/www/mikiri-waf-api/settings.py
/var/www/mikiri-waf-wmc/.env
/etc/mikiri-waf-scanner/scanner.conf
Before updating, back up the main configuration files.
apt update && apt upgrade -y
dnf update && dnf upgrade -y
If you are using a distribution version whose support has ended, follow the steps in the Upgrading from outdated OS versions section.
apt update
apt install --only-upgrade mikiri-waf-api mikiri-waf-wmc mikiri-waf-mlc mikiri-waf-scanner
dnf upgrade mikiri-waf-api mikiri-waf-wmc mikiri-waf-mlc mikiri-waf-scanner
Specify only the packages that are actually installed on the server. The mikiri-waf-filter-nginx package is bound to a specific Nginx version and is updated according to the instructions below.
Filter is linked to a specific version of Nginx, so when updating the web server to the latest version (for example, when updating the Nginx version from 1.28.1 to 1.30.5), the mikiri-waf-filter-nginx package needs to be reinstalled. To update, you need to:
Remove the mikiri-waf-filter-nginx package:
apt remove mikiri-waf-filter-nginx-1.28.1
Update the Nginx version:
apt update
apt install nginx
Install the mikiri-waf-filter-nginx package according to the installed Nginx version:
apt install mikiri-waf-filter-nginx-1.30.5
Remove the mikiri-waf-filter-nginx package:
dnf remove mikiri-waf-filter-nginx-1.28.1
Update the Nginx version:
dnf update
dnf install nginx
Install the mikiri-waf-filter-nginx package in accordance with the installed Nginx version:
dnf install mikiri-waf-filter-nginx-1.30.5
/etc/nginx/mikiri-waf/venv/pip_update.sh
/etc/mikiri-waf-mlc/venv/pip_update.sh
/var/www/mikiri-waf-api/pip_update.sh
/var/www/mikiri-waf-wmc/pip_update.sh
/etc/mikiri-waf-scanner/venv/pip_update.sh
After the update, it is recommended to restart the server and check the status of the agents:
systemctl status nginx mikiri-waf-mla mikiri-waf-af rabbitmq-server memcached
systemctl status mikiri-waf-mlc memcached
systemctl status mikiri-waf-api mikiri-waf-api-aux nginx memcached
systemctl status mikiri-waf-wmc mikiri-waf-wmc-aux nginx memcached
systemctl status mikiri-waf-scanner
We always recommend installing the latest version of Mikiri WAF packages, which require compatible OSes for installation. If Mikiri WAF is installed on unsupported OS versions, follow these steps to upgrade:
Before updating, back up the main configuration files.
apt remove mikiri-waf-filter-nginx-1.3x
rm -rf /etc/nginx/mikiri-waf/venv/
1.3x - the version of the installed package.
apt remove mikiri-waf-mlc
rm -rf /etc/mikiri-waf-mlc/venv/
apt remove mikiri-waf-api
rm -rf /var/www/mikiri-waf-api/venv/
apt remove mikiri-waf-wmc
rm -rf /var/www/mikiri-waf-wmc/venv/
apt remove mikiri-waf-scanner
rm -rf /etc/mikiri-waf-scanner/venv/
rm /etc/apt/sources.list.d/mikiri-waf.list
Perform a full system update in accordance with the instructions for updating the OS and environment, or transfer the agent to a new server with the latest distribution version;
Add information about the Mikiri WAF repository in accordance with the OS version.
Install the required Mikiri WAF package in accordance with the guide.
dnf remove mikiri-waf-filter-nginx-1.3x
rm -rf /etc/nginx/mikiri-waf/venv/
1.3x is the version of the installed package.
dnf remove mikiri-waf-mlc
rm -rf /etc/mikiri-waf-mlc/venv/
dnf remove mikiri-waf-api
rm -rf /var/www/mikiri-waf-api/venv/
dnf remove mikiri-waf-wmc
rm -rf /var/www/mikiri-waf-wmc/venv/
dnf remove mikiri-waf-scanner
rm -rf /etc/mikiri-waf-scanner/venv/
rm /etc/yum.repos.d/mikiri-waf.repo
Perform a full system update in accordance with the instructions for updating the OS and environment;
Add information about the Mikiri WAF repository in accordance with the OS version;
Install the required Mikiri WAF package in accordance with the guide.
In the event of errors in the operation of the agents, it is recommended to revert to the Python3 pip dependencies versions supplied with the distribution as follows:
/var/www/mikiri-waf-api/venv/bin/python3 -m pip install --no-cache-dir -r /var/www/mikiri-waf-api/requirements.txt
/var/www/mikiri-waf-wmc/venv/bin/python3 -m pip install --no-cache-dir -r /var/www/mikiri-waf-wmc/requirements.txt