Wazuh with WebPortico: set up, test, unblock
On your QNAP NAS, Wazuh checks logs from WebPortico, supported apps and your router. When Wazuh adds an IP address to its list of blocked addresses, your protected sites can block it for 24 hours. This guide shows you how to set up blocking with Wazuh 4.14.10.5 and WebPortico 0.41.2, test it and unblock an address.

How Wazuh and WebPortico work together
Wazuh reads logs on the NAS and checks each line against its rules. For example, five failed WebPortico panel sign-ins from one IP address within 5 minutes can raise a level 10 alert. Wazuh can add the address to its list of blocked addresses for 24 hours when a blocking rule triggers. The table below shows which events can trigger a block.
While CrowdSec runs, WebPortico checks Wazuh’s list about every 30 seconds. CrowdSec adds the addresses as blocks with the reason Wazuh, except for addresses you allow. Sites with CrowdSec enabled return error 403 to blocked visitors. WebPortico also uses the list to protect its panel and phone app. Turn on Block on the router to extend blocking to a connected UniFi or MikroTik router.
| Wazuh reads | Wazuh does not read |
|---|---|
failed WebPortico panel sign-ins and blocks on the phone port, both recorded in logs/panel.log in WebPortico’s data folder | your sites’ access logs: CrowdSec reads them and blocks web scanners by itself |
| security events from Rtorrent 16, Bucket & Code, MailServerPro, TurboDNS and LinkDrop when installed on your NAS | CrowdSec’s own blocks, so a block never comes back to Wazuh as a new alert |
These events can put an address on the list:
| Where | What happens |
|---|---|
| WebPortico’s panel, Rtorrent 16, Bucket & Code, MailServerPro’s panel, TurboDNS | 5 failed sign-ins from one address within 5 minutes |
| MailServerPro’s mail sign-ins | 8 refused sign-ins from one address within 5 minutes, or 8 failed sign-ins for sending mail from one address within 2 minutes |
| WebPortico’s phone port, Bucket & Code, Rtorrent 16 | the app blocked the address itself |
| LinkDrop | 5 wrong share passwords or link keys from one address within 5 minutes, or the last attempt from an address that triggers a share lock |
| UniFi or MikroTik router | From one address: 5 failed sign-ins within 5 minutes, 15 firewall events for different destination ports within a minute (dropped connections on UniFi, logged connections on MikroTik), or 3 threats detected by UniFi’s intrusion prevention within 10 minutes |
Wazuh keeps private IPv4 and IPv6 addresses (including fc00::/7), link-local and loopback addresses, and carrier-grade NAT addresses (100.64.0.0/10) off its list of blocked addresses. It also skips Cloudflare’s addresses. If Wazuh blocks a public IPv6 address, the block covers its whole /64 network, even on your home network.
Wazuh’s built-in rules, for SSH and for computers with an agent too, only raise alerts. Only this package’s rules and the series of failed mail sign-ins block. A sign-in name with somebody else’s address in it no longer gets that address blocked.
What you need
- An x86_64 QNAP NAS with at least 8 GB of RAM and 25 GB free on the volume where you install Wazuh. Allow 3.5 GB for the program and up to 16 GB for data in the first few minutes. We tested the package on QTS 6.1, not on QuTS hero.
- WebPortico 0.40.0 or later and Wazuh 4.14.10.5 or later. You can install both from this site’s repository in App Center.
- SSH access to your NAS as
adminto run Test 2, check the router log port or set up folder monitoring.
We measured the sizes, times and counts in this guide with Wazuh 4.14.10.4 and WebPortico 0.41.1. The NAS was a QNAP with an Intel Core i5-1235U and 16 GB of RAM. This is what Wazuh uses:
| What | How much |
|---|---|
| Memory at rest | 2.3 to 2.4 GB; the indexer’s Java takes about 1.5 GB of it |
| Download | 1.8 GB |
| Program | 3.5 GB on the install volume |
| Data after the first start | Up to 16 GB in the Wazuh folder on the install volume at first, then 12 GB after 20 minutes. The vulnerability database takes 9.9 GB. |
| Alerts | Wazuh deletes each alert index 90 days after it creates it. To change how long it keeps alerts, open Indexer management > Index Management > State management policies > wazuh-alerts-retention in the dashboard. |
Install Wazuh and sign in
Skip step 1 if you already have the repository. The Wazuh card describes the package.
Set the password as soon as Wazuh starts. Until you do, anyone on your home network can set it at the NAS’s IP address or name. Wazuh creates its own certificate, so your browser warns you the first time you open the page.
- In App Center, choose ⚙ Settings > App Repository > Add. Name it
QNAP Utilitiesand pastehttps://www.qnaputilities.com/repo.xml. - Open QNAP Utilities in App Center and install Wazuh.
- On your home network, click Open or visit
https://<NAS>:9330/. Accept the certificate for this address. - If you see Wazuh is starting, wait a minute or two. The page reloads every 10 seconds.
- On Set a password for admin, enter a password of at least 8 characters twice, then click Set password.
- Click Open Wazuh and sign in as
adminwith the password you just set.

In the first few minutes, the dashboard shows about 200 alerts from Wazuh’s Linux configuration check and its rootkit scan of the system folders. These are checks of the NAS. Wazuh monitors the NAS itself without an agent, so it’s normal for AGENTS SUMMARY to show no registered agents. To change the password later, run wazuh setup-again over SSH, then reopen Wazuh to set the password.
Connect WebPortico
Hover over an icon in WebPortico’s side menu to see the page name. The apps connect automatically. Wazuh finds WebPortico’s log at startup, and WebPortico finds Wazuh’s list through QTS’s package settings. If you install WebPortico after Wazuh, restart Wazuh once in App Center (Stop, then Start) so it finds the log.
To use Wazuh’s list on your sites, turn on CrowdSec for each site you want to protect. CrowdSec starts off for every site.
- In WebPortico open the CrowdSec page.
- In the Sites card, turn on the switch for each site you want to protect.
- Click Preview changes, then Apply changes.

CrowdSec looks at Wazuh’s list while at least one site has CrowdSec on. The CrowdSec page’s Status card shows Running about half a minute after Apply changes, once you open the page again. As the Sites card explains, CrowdSec shares blocks from this NAS’s logs with CrowdSec’s central API and receives the community blocklist when connected. The Status card shows whether the community blocklist is connected. WebPortico uses Wazuh’s list to protect its panel and phone app even with CrowdSec off.
Test it safely
Test 1: wrong passwords from a computer at home
Use a computer with a private IPv4 address. App Center’s Open opens WebPortico, or you can visit https://<NAS>:9541/ using your NAS’s IPv4 address. Stop after five attempts. WebPortico locks you out for 15 minutes after 10 failed sign-ins from one address within 15 minutes.
- Submit a wrong password on WebPortico’s sign-in page five times, about 3 seconds apart.
- In Wazuh, open Threat Hunting > Events. Enter
rule.id:(109230 or 109231)in the search field and press Enter. - Look for four level 5 alerts and one level 10 alert for your computer’s IP address.
- Open Routers and apps at
https://<NAS>:9330/wz-gate/network(section 6). Check that your address stays off the list.
For example, with 192.168.1.30, the level 5 alerts say WebPortico: a failed sign-in from 192.168.1.30. The level 10 alert says WebPortico: repeated failed sign-ins from 192.168.1.30.

Test 2: block a documentation address and unblock it
192.0.2.50 is reserved for documentation, so you can test blocking without cutting off an internet user. The test adds five entries to WebPortico’s log in the same format as real failed sign-ins. First, enable CrowdSec for at least one site and apply the changes.
- Open an SSH session on the NAS as
adminand paste:
D=$(cat "$(getcfg WebPortico Install_Path -f /etc/config/qpkg.conf)/etc/data-dir") for i in 1 2 3 4 5; do echo "webpanel: $(date '+%Y/%m/%d %H:%M:%S') 192.0.2.50 failed to sign in" >> "$D/logs/panel.log" sleep 3 done
- Reload Routers and apps a few seconds after the fifth line. Look for 192.0.2.50 with the source WebPortico.
- Wait 30 seconds, then open or reload CrowdSec in WebPortico. Check that Blocked addresses includes your test address.
- On Routers and apps, click Unblock next to your test address and confirm.
If the address is missing in step 2, rerun the loop with 192.0.2.51 and use that address for the remaining steps. In step 3, CrowdSec shows the reason Wazuh and the source Added with cscli. Within about a minute of the block, Phone app shows Wazuh: WebPortico. Wazuh immediately confirms that your test address is unblocked. For 192.0.2.50 it shows 192.0.2.50 is unblocked. CrowdSec removes its Wazuh block within a minute.



In our test runs with Wazuh 4.14.10.4 and WebPortico 0.41.1, the address appeared on Wazuh’s list 1 to 2 seconds after the fifth line. CrowdSec blocked it 6 to 25 seconds later and removed the block 10 to 24 seconds after the click on Unblock. Wazuh does not block an address again for 24 hours after Unblock. To repeat the test within that time, use another address from 192.0.2.1 to 192.0.2.254.
See blocked addresses and unblock one
Wazuh keeps its list on the page Routers and apps, https://<NAS>:9330/wz-gate/network. Sign in to the dashboard first. The dashboard’s menu has no link to the page, so keep the address as a bookmark. The page uses Polish if it’s your browser’s first language and English otherwise.
| Column | What it shows |
|---|---|
| Address | the IPv4 address, or the IPv6 /64 network |
| Source | the log the alert came from: an app, UniFi or MikroTik; Wazuh stands for a series of failed sign-ins for sending mail |
| Reason | the description of the rule; the package’s rules are in English |
| Blocked until | 24 hours after Wazuh last adds or renews the block |
Unblock takes the address off the list at once. Your apps and routers usually lift Wazuh’s block within a minute. Other blocks on the address can still apply. Wazuh keeps the address off its list of blocked addresses for 24 hours. If you leave the block in place, it expires 24 hours after Wazuh last adds or renews it.
To lift a Wazuh block, use Routers and apps. Unblock on WebPortico’s CrowdSec page adds the address to Allowed addresses. That lets it reach your protected sites until you remove it from that list. Wazuh’s block can still apply in other apps and on the router. The Phone app page has no Unblock for Wazuh’s addresses and says where to unblock them.
Add a UniFi or MikroTik router
When your router sends its logs, Wazuh can detect failed router sign-ins, port scans and threats flagged by UniFi’s intrusion prevention. You can also set up your router to drop traffic from blocked addresses before it reaches the NAS.
Send the router’s logs to Wazuh
Routers and apps shows the steps for both routers with your NAS’s address and port filled in. The port is one UDP port from 9335 to 9349, which Wazuh chose at its first start; wazuh syslog-port prints it in an SSH session.

- In UniFi Network 9.3 or later, open Settings > Control Plane > Integrations and choose SIEM Server. Select all log categories, enter the NAS address and UDP port, then apply the changes. For port scans and dropped connections, open Settings > CyberSecure > Traffic Logging. Set Activity Logging (Syslog) to SIEM Server with the same address and port. Turn on Syslog Logging in the firewall policies that block internet traffic.
- For a MikroTik router running RouterOS 7, paste the five commands from the page into the router’s terminal. On versions before 7.18, replace
remote-log-format=syslogwithbsd-syslog=yesin the first command. To detect port scans, turn onlog=yesin the firewall rules that drop internet traffic.
Name the routers that may send logs
- On Routers and apps, under Routers that may send logs, enter your router’s address on your network. Put each router on its own line.
- Click Save.
- Restart Wazuh in App Center (Stop, then Start).

With the list, Wazuh ignores router logs from other devices, and the page shows how many lines it ignored today. While the list is empty, Wazuh accepts router logs from every device with a private IPv4 address (10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16). The list takes up to 32 IPv4 addresses or networks, with networks of /16 or smaller. Wazuh tells routers apart by their address only, so keep the list as short as your network allows.
Check that Wazuh reads the router
Sign in to your router. In the dashboard open Threat Hunting > Events, enter rule.groups:(unifi or mikrotik) in the search field and press Enter. Your sign-in appears as an alert of level 3.
To see how Wazuh reads one line, copy it from the router’s log with the date and the router’s name in front. Open Ruleset Test (https://<NAS>:9330/app/ruleset-test), paste the line and click Test. Without a router, paste Nov 24 14:00:00 MikroTik login failure for user admin from 192.0.2.71 via ssh. Phase 2 names the decoder: nas-unifi, nas-unifi-fw or nas-mikrotik. Ruleset Test shows no router rule because it labels the source logtest. The router rules expect the sender’s IP address. The test never blocks an address.
Wazuh 4.14.10.5 does not recognize two forms of firewall lines with the date and the router’s name in front: a UniFi line with kernel: before [WAN_…], and a MikroTik line without topics, which starts with the chain (input:). For those lines Phase 2 names none of the three decoders, so Wazuh does not count them toward a port scan.
Blocking on the router in WebPortico
For UniFi you need UniFi Network 10.1.84 or later. In UniFi, open Settings > Control Plane > Integrations and choose Create API Key.
- In WebPortico open Front server and ports. In the card Port forwarding on the router, find the section UniFi console.
- Fill in Console address and API key, then click Connect. Leave the address empty to use this network’s gateway.
For MikroTik you need RouterOS 7.1 or later and the www-ssl service with a certificate. The API user’s group needs the read, write, api and rest-api policies.
- In WebPortico open Phone app. In the card Blocking on the router, find the section MikroTik router.
- Open How to prepare the router. Copy the commands, replace the password placeholder, then run them in the router’s terminal.
- Fill in Router address, API user and Password, then click Connect.
Once the router is connected, turn on blocking.
- On the Phone app page, in the card Blocking on the router, turn on Block on the router and click Save.

When WebPortico adds a router block from Wazuh’s list, it uses Everything from that address regardless of your What the router blocks setting. On UniFi, WebPortico adds one rule per firewall zone. If another app on the NAS already blocks the address entirely on that router, WebPortico skips it. WebPortico’s rules appear under Rules on the router as NASBAN WebPortico <address> all until <time> <zone>. On MikroTik, WebPortico adds addresses to NASBAN WebPortico, with separate IPv4 and IPv6 lists and a drop rule for each list. WebPortico skips addresses you put under Never block, Cloudflare’s addresses, addresses a paired phone used in the last 30 days and blocks with less than 10 minutes left. On UniFi, it also skips the gateway’s own networks. WebPortico adds up to 50 rules on UniFi or 50 address entries on MikroTik.
Watch a site’s folder
By default, Wazuh checks QTS settings and system folders every 12 hours and watches /share/Public in real time. To watch a site’s files in real time, add one line to Wazuh’s settings file.
For a site you added, append /public to the path shown in WebPortico. For Default site, use the path as shown. Your folder may be on another volume, such as CACHEDEV2_DATA. The commands back up the settings as ossec.conf.bak.
- Open your site in WebPortico. On the Overview tab, copy the path under Folder.
- Replace the example path below with the full path you want to watch, then paste the commands into SSH.
WZ="$(dirname "$(dirname "$(getcfg Wazuh Install_Path -f /etc/config/qpkg.conf)")")/Wazuh/ossec/etc/ossec.conf" cp "$WZ" "$WZ.bak" sed -i '/<\/syscheck>/i\ <directories realtime="yes">/share/CACHEDEV1_DATA/WebPortico/www/www.example.com/public</directories>' "$WZ"
- In App Center, restart Wazuh with Stop, then Start. Sign back in to the dashboard.
- Add a file to the watched folder. Open File Integrity Monitoring > Events and look for rule 554.
The restart takes 35 to 45 seconds. After you add the file, Wazuh shows File added to the system. within about 10 seconds. File changes trigger rule 550 and deletions trigger rule 553. Choose folders that change infrequently to keep the alerts manageable. By default, Wazuh watches up to 100,000 files and skips the rest.
What Wazuh does not do
- Its built-in rules, for SSH and for agents too, only raise alerts. The one exception is the series of failed mail sign-ins.
- It is not a firewall and does not change QTS’s firewall. Your apps and the router do the blocking.
- It does not read QTS’s own sign-ins (SSH, QTS’s web page, SMB, FTP): QTS keeps them in QuLog Center’s database. For those, use QTS’s own IP Access Protection.
- It does not block private addresses, so it does not stop an infected computer at home. That computer’s failed sign-ins still appear as alerts.
- It does not read your sites’ access logs. CrowdSec reads them.
- It sees a port scan of the NAS only in a router’s log.
- It reads Rtorrent 16’s log only in Rtorrent 16’s install folder. With Rtorrent 16’s files in a folder of your own, its blocks do not reach Wazuh.
- It finds no vulnerabilities in QTS: QTS is not in Wazuh’s vulnerability feeds. It finds them on computers with Wazuh’s agent.
- It does not always count failed sign-ins as one attack when they are written 1 second apart. In our tests the block was missing in 4 of 20 runs with 1-second pauses, and in none of 38 runs with pauses of 2 seconds or more.
- It does not open its dashboard to the internet: port 9330 answers private, link-local and loopback addresses only. If your computer uses public IPv6 at home, open the dashboard at the NAS’s IPv4 address.
- It sends no email by default. Email alerts need
email_notificationturned on and the SMTP server, sender and recipient set inossec.conf.
Something does not work
No alerts after wrong passwords
- WebPortico was installed after Wazuh: restart Wazuh in App Center, so it finds WebPortico’s log.
- In the dashboard open Server management > Status. Check that wazuh-analysisd, -execd, -logcollector, -remoted, -syscheckd, -modulesd, -monitord, -db, -authd and -apid are green. With the default settings wazuh-agentlessd, -csyslogd, -integratord, -maild, -reportd and -clusterd stay red. If one from the first list is red, restart Wazuh in App Center with Stop, then Start.
- Check that WebPortico writes the lines:
grep "failed to sign in" "$(cat "$(getcfg WebPortico Install_Path -f /etc/config/qpkg.conf)/etc/data-dir")/logs/panel.log" | tail -3
Five alerts of level 5, but no alert of level 10
- Check that all five alerts name the same address and fall within 5 minutes. If they do, Wazuh did not count them as one attack. Run the loop of Test 2 again with another 192.0.2.x address and keep the 3-second pause.
The address is on Routers and apps, but not on WebPortico’s CrowdSec page
- Turn on CrowdSec for at least one site and apply the changes. Check that Status shows Running. If the address appears under Allowed addresses, remove it there to let CrowdSec block it again.
- Wait 30 seconds. Each time WebPortico adds a block from Wazuh’s list to CrowdSec or removes one, it writes a line to its
logs/agent.log:crowdsec: Wazuh's hostile addresses: 1 in the set, 1 decisions added, 0 removed.
I blocked myself
- At home over a private address, Wazuh never blocks you. If your computer uses public IPv6 at home, open the NAS at its IPv4 address.
- If Wazuh blocks your mobile data or office address, open Routers and apps from a computer at home. Click Unblock next to that address. Your apps and router usually lift Wazuh’s block within a minute.
- WebPortico says Too many failed sign-ins from this address; try again in 15 minutes. WebPortico locks panel sign-ins for 15 minutes after 10 failures from one address within 15 minutes, even at home. Wait 15 minutes before trying again.
The router sends no logs
- Compare the router’s port with
wazuh syslog-portand check that the router sends over UDP. - If Routers that may send logs is filled in, check that it holds your router’s address, and restart Wazuh after a change. If the ignored count grows, check the last sender’s address on the page.
- If the list is empty, the router must send from a private IPv4 address (10.x.x.x, 172.16.x.x to 172.31.x.x, 192.168.x.x).
- Send to Wazuh’s port (9335 to 9349), not to QTS’s syslog port 514 or QuLog Center’s 1514.
- If Routers and apps says Wazuh hasn't chosen a port for router logs yet. Restart Wazuh in App Center, then open this page again., follow that instruction.
- Paste one router line into Ruleset Test. If Phase 2 names none of the three decoders, the line may be one of the two forms above.