Wazuh with ServerNest
Wazuh tells you when files on your websites change and when your logs show an attack. ServerNest sets up a full Wazuh server on one of your Linux servers, keeps it running, and sends you the alerts that matter.
What Wazuh is
Wazuh is a free, open-source security tool. It has two parts:
- The Wazuh server collects reports from your machines, compares them with its rules and writes an alert when something looks wrong. It keeps the alerts in a search database and shows them on its own web page, the Wazuh dashboard.
- The Wazuh agent is a small program on each machine you want to watch: Linux, Windows or Mac. It watches files and logs and sends what it sees to the Wazuh server.
ServerNest installs and runs the Wazuh server for you. Linux servers that are already in ServerNest join it in one click. On other machines, you install the agent with a command that ServerNest gives you.
You don't need Wazuh for the most common signs of a hacked website: website file alerts are built in and on by default. Wazuh is optional. It adds log checks, Windows and Mac machines, and a full history on your own Wazuh server.
Step 1: set up a Wazuh server
You need one Wazuh server for all your machines. Give it a Linux server of its own that is already connected to ServerNest. It needs at least:
- 8 GB of memory,
- 2 CPUs,
- 50 GB of free disk space (under
/var).
ServerNest checks this first. If something is missing, it says what, and installs nothing.
To set it up:
- Open Wazuh in the menu. With no Wazuh server yet, the page says No Wazuh server yet.
- Choose Set up a Wazuh server and pick the Server.
- Under Who can connect, list the addresses of the machines that will send to it (see below).
- Choose Install Wazuh server. It takes about 10 to 20 minutes. The page updates by itself.
You can also start from a server's own Wazuh tab: Make this a Wazuh server takes you to the same form. Only owners and admins can set up a Wazuh server.
What ServerNest installs
The full Wazuh server, version 4.14.11, from Wazuh's official, signed packages:
- the Wazuh manager, which checks the reports and writes the alerts,
- the search database (Wazuh indexer), which keeps the alerts,
- Filebeat, which moves new alerts from the manager to the search database,
- the Wazuh dashboard, Wazuh's own web page.
ServerNest makes the certificates and passwords on your server and replaces Wazuh's default passwords. The four parts are kept at the same version, so a system update can't move one ahead of the others. If the install fails, ServerNest removes Wazuh again and shows why.
It also uses safer settings than Wazuh's defaults: Wazuh's own API only answers on the server itself, sign-in attempts are limited, machines can't be told to run commands, and joining with a shared password is off (see below). You get an alert as soon as the Wazuh server's own settings, users or keys change.
Who can connect
Your machines send their reports to the Wazuh server on port 1514. Port 1515 is only for machines that join with the enrolment password, and it is closed unless you turn that on (see step 2). Every other port stays closed. You choose who gets through:
- Only these addresses (recommended): one IP address or range per line, up to 100, like
203.0.113.7or198.51.100.0/24. Use the public addresses of your office and your servers. - Open to all: any address on the internet can try to connect. Machines still need their own key or the enrolment password, but a list is safer. Choose this only for laptops that move between networks.
You can change the list later on the Wazuh page, under Who can connect, with Change. The list holds even when ServerNest's firewall is off.
Your two passwords, shown once
When the install is done, the page says New passwords are ready. Enter your ServerNest password and choose Show once. You see:
- the Wazuh dashboard password, for the user
admin, - the enrolment password, which only machines you connect with the install command need (Windows, Mac, and Linux outside ServerNest).
Copy both into your password manager right away. ServerNest doesn't keep them in readable form and can't show them again. If you lose the enrolment password, choose Make a new enrolment password… under Connect machines. Machines that already joined keep working; new machines need the new password.
Open the Wazuh dashboard
The Wazuh dashboard runs on your Wazuh server on port 8443. It is not open to the internet. There are three ways to reach it:
- Open it for one hour (easiest). On the Wazuh page, choose Open for 1 hour from here and enter your ServerNest password (and your second step, if you use one). Only your current address gets in. The page shows Open for your address … until … with Open Wazuh dashboard. It closes by itself after an hour, or at once with Close now. Owners and admins can do this. It doesn't work for a Wazuh server behind a home or office router.
- Through an SSH tunnel. On your computer, run the command shown on the Wazuh page, for example
ssh -L 8443:127.0.0.1:8443 you@WAZUH-SERVER, with your own SSH user. Then openhttps://localhost:8443. - From addresses you list. Under Who can connect, choose Change and fill in Wazuh dashboard: addresses that may open it (optional). From those addresses, open
https://WAZUH-SERVER:8443.
Sign in as admin with the dashboard password. The first time, your browser warns about the certificate: it was made on your server, not by a public authority.
Step 2: connect your machines
Each machine needs the Wazuh agent. There are two ways.
Linux servers in ServerNest: one click
On the Wazuh page, in the Connect machines card, under Your servers in ServerNest, tick the servers and choose Connect. That's all:
- You type nothing. Your Wazuh server makes a key for each server, and ServerNest sends it only to that server, locked so only it can open it. No password is shared, and port 1515 stays closed.
- ServerNest adds each server's address to Who can connect.
- Each server joins the group that fits what it runs:
linux-webif it has apps, elselinux-dbif it runs a database, elselinux-dockerif it runs Docker, elselinux-server(see "Groups" below). - The list shows Connecting…, then Connected. Up to 50 servers at a time.
ServerNest installs the agent from Wazuh's official packages and keeps it from updating by itself. An agent that is newer than its Wazuh server stops working, so update the Wazuh server first. Only servers in ServerNest get website watching (see below).
To connect a server to a Wazuh server that ServerNest didn't set up, use the server's own Wazuh tab: Connect to your Wazuh server, fill in its address and join password, and choose Install and connect.
Other machines: you install the agent
For Windows PCs and servers, Macs, and Linux machines that aren't in ServerNest, use Other machines in the Connect machines card. These machines join with the enrolment password, so first turn on Let machines join with the enrolment password (port 1515) under Who can connect, and put the machine's address on the list. Turn it off again when they have joined.
- Check the Wazuh server address (an IP address or host name your machines can reach).
- Pick the Machine: Linux (Debian, Ubuntu), Linux (Red Hat, Rocky, Alma, SUSE), Windows, Mac (Intel) or Mac (Apple silicon).
- Pick a Group (see "Groups" below).
- Copy the install command and run it on the machine as an administrator. It installs the official Wazuh agent, at the same version as your Wazuh server, and joins it. If the command shows
<ENROLMENT_PASSWORD>, put your enrolment password there.
You install and update these agents yourself.
The Machines list
The Machines card shows every machine the Wazuh server knows, with its system, group, status and when it was last seen. A machine whose system no longer gets free security fixes shows Out of support: upgrade it, or check for paid extended support. In each machine's menu:
- Set group… moves it to another group (only groups that fit its system are offered). Machines that joined without one show No group.
- Remove from Wazuh… takes it off. It stops sending at once and has to join again to come back.
Groups
Each group has fixed settings that the Wazuh server sends to its machines. File contents are never sent, only that a file changed.
linux-server: SSH, sudo, service, firewall and user settings; login, package and audit logs; the CIS settings check,linux-web: the same, plus website folders and Nginx or Apache logs,linux-db: the same, plus MySQL, MariaDB or PostgreSQL settings and logs,linux-docker: the same, plus Docker's settings (Docker's own logs come through the system log),windows-server: Security, System, Application, Defender and PowerShell logs; startup and service registry keys,windows-desktop: Security, System and Defender logs; startup items,macos: launch agents, launch daemons and startup items.
Owners and admins can add to the Linux groups under Your additions to each group on the Wazuh server's card: A log to read (plain lines, web access log or JSON lines), A folder to watch for changes, or A folder to ignore. Use full paths; at most 20 of each per group. System folders such as /proc and Wazuh's own folder can't be added.
What it watches
On Linux servers where ServerNest installed the agent, Website watching is on by default. The agent watches each app's files and sends an alert as soon as one changes. It skips cache, log and session folders. Once a day it also checks every file in full. It also reads each site's web server logs, to spot attacks.
ServerNest adds a few rules of its own, so the alerts say what matters for websites:
- a website file changed (level 3: kept on the Wazuh server only, not shown or emailed, so normal deploys stay quiet),
wp-config.php,.htaccessor.user.inichanged (level 8),- a PHP file appeared in an upload folder (level 10),
- ClamAV found malware in a website file (level 12).
If ClamAV is on, files that changed and can run code are checked with ClamAV every few minutes (a full ClamAV start at most every 15 minutes). It only reports; it never deletes files. You can turn website watching off for one app on the Wazuh page.
Other machines watch what their group says (see step 2). Wazuh's own checks, like the CIS settings check and its scan for known software weaknesses, stay as Wazuh ships them. You see their results in the Wazuh dashboard.
Where alerts go
- The Wazuh page shows the newest alerts of level 7 and up from all your connected machines, with filters for level 7, 10 and 12. ServerNest only shows the time, level, rule and machine name. The full details stay on your Wazuh server, in the Wazuh dashboard. Wazuh's check of each machine's settings (alerts named "CIS" or "SCA") is advice, not an attack: ServerNest leaves those alerts out of its page and emails.
- Email: under Alert emails, an owner or admin picks Which alerts are sent (level 7, 10 or 12 and up; 12, the default, is recommended) and which team members get them. ServerNest checks for new alerts every few minutes. Similar alerts from one machine within the same hour come in one email, and when it finds several problems on one server at the same time, they come together as one email ("3 problems on web-1"). A team gets at most 20 alert emails an hour.
- Per group and quiet hours (on the same card): a higher level for a noisy group (a machine in two groups uses the lower level), and quiet hours, for example 22:00 to 07:00 in your time zone. During quiet hours only critical alerts (level 12 and up) are emailed; the rest stay on the page and in the daily summary.
- A server stops reporting: tick Email when a server stops reporting to hear after 15 minutes, and again when it is back.
- From your own mail server (optional): if the Wazuh server has sending mail set up on its Mail tab, enter a From address under Alert emails from your own mail server and choose Send from my mail server. The Wazuh server then emails the same people itself. If that fails, the card says Failing and ServerNest sends the alert emails until it works again.
- Daily security summary (optional, Basic plan and up): in Settings, profile tab, tick Send me a short security summary each morning. It comes at about 07:10 UTC: yesterday's Wazuh alerts by level, and what ServerNest noticed (website file alerts, malware, failed scans, servers not reporting). Nothing is sent on a quiet day unless you also tick Also on quiet days.
- Each person's own email setting still applies (Settings): level 12 alerts count as urgent, lower levels as website file alerts. See monitoring and alerts.
- Health: the Wazuh page shows whether each part of the Wazuh server is running, how many machines are connected, the last event, free disk space and the Wazuh version.
Owners and admins can change Wazuh settings. Developers and operators can see the alerts.
Security monitoring only
If you only want Wazuh, and not websites or databases, pick Security monitoring only (Wazuh) when you sign up. An owner can change it later in Settings, under Organization → What ServerNest shows. ServerNest then shows servers, monitoring and Wazuh. Apps, databases and other web features are greyed out; nothing is removed or turned off.
What is required and what is optional
| Part | Needed? | In ServerNest |
|---|---|---|
| A Wazuh server | Required | One for all your machines, set up by ServerNest on a Linux server with 8 GB of memory, 2 CPUs and 50 GB of free disk |
| Search database and Wazuh dashboard | Included | Installed with the Wazuh server. The dashboard is not open to the internet. |
| Port 1514 (TCP) on the Wazuh server | Required | Open only to the addresses you list, unless you choose "Open to all" |
| Port 1515 (TCP, joining with the enrolment password) | Optional | Closed by default. Needed only for machines you connect with the install command |
| Port 8443 (Wazuh dashboard) | Optional | Closed. Open it for one hour from ServerNest, list addresses, or use an SSH tunnel |
| Open ports on your other machines | Not needed | The agent only connects out |
| Enrolment password | Optional | Not needed for servers in ServerNest (each gets its own key). Needed for the install command; shown once |
| Encrypted connection | Required | Wazuh encrypts agent traffic by default; nothing to set |
| Watching website files | Optional | On by default, per app, on servers where ServerNest installed the agent |
| Reading web server logs | Optional | On together with website watching, or with the linux-web group |
| ClamAV checks of changed files | Optional | When ClamAV is on (keep your server safe) |
| Automatic blocking (Wazuh "active response") | Optional | Not set up by ServerNest. ServerNest's fail2ban blocks repeated failed logins. |
Supported systems and limits
- Wazuh server: a Linux server in ServerNest, on a supported system. Not on openSUSE yet.
- A machine is either the Wazuh server or a watched machine, not both. Remove the Wazuh agent first if it is installed.
- Agent installed by ServerNest: Linux servers in ServerNest.
- Agent you install: Linux (Debian, Ubuntu, Red Hat, Rocky, AlmaLinux, SUSE), Windows and Mac.
- A Wazuh server that ServerNest set up before the search database and dashboard were included keeps working without them. To get them, remove it and set it up again. Until you save an address list, its ports 1514 and 1515 stay open to all, and the Wazuh page asks you to list addresses.
- To remove the Wazuh server, open its Wazuh tab and choose Remove Wazuh server…. The server, its search database and dashboard are removed, with all their events and the list of connected machines.
- Some buttons on this page need a recent ServerNest agent on the Wazuh server. If one is missing, or the page says Update the ServerNest agent on your Wazuh server first, update the agent on that server.
Keeping the Wazuh server up to date
- Wazuh updates: when ServerNest has tested a new Wazuh version, the Wazuh server's card says Update available. Choose Update now, then Back up and update. ServerNest first saves the Wazuh settings and keys, then updates all four parts together. It takes about 10 to 15 minutes. A newer version that isn't tested yet is shown, but can't be installed from here until it is.
- Security settings: the card shows Up to date or Out of date. If it is out of date, for example on a Wazuh server set up before the safer settings, choose Apply now, then Apply and restart.
- Backups: a server backup of the Wazuh server includes its Wazuh settings and keys, not the alerts.
Ports
Your machines connect to the Wazuh server on 1514 (reports) and 1515 (joining). ServerNest opens them on the Wazuh server only, and only for the addresses you list:
- If the server uses firewalld (Rocky, AlmaLinux, Fedora), ServerNest opens them there.
- If you use ServerNest's firewall on the Wazuh server, ServerNest adds a rule there too, and keeps it when you change your firewall rules. If it can't, the Wazuh page says so.
- Either way, a separate rule lets only your listed addresses through, and drops the rest.
- If the Wazuh server sits behind a cloud firewall (a "security group"), open 1514 and 1515 there too, for the same addresses.
Troubleshooting
A machine doesn't connect
- Is the machine's public address on the Who can connect list?
- Check that the machine can reach the Wazuh server:
nc -zv WAZUH-SERVER 1514and the same for 1515. - On Linux, look at the agent's log:
sudo tail -n 30 /var/ossec/logs/ossec.log. "Invalid password" means the enrolment password is wrong: save it again on the server's Wazuh tab, or run the install command again with the right one. "Unable to connect" means a port is closed. - Is the agent newer than the Wazuh server? Update the Wazuh server first.
Too many alerts
- Set Which alerts to a higher level (12 sends only the most serious ones).
- Turn website watching off for an app whose files change on purpose all the time, for example one that writes its own cache inside the app folder.
The Wazuh server's disk fills up
The Wazuh page shows the free disk space and marks it Low under 10 GB. Under Keep alerts on the Wazuh server's card, choose how long alerts are kept: 30, 90 or 180 days, 1 year, or Forever. Older alerts are removed every night, from the search database and from the daily files. A new Wazuh server keeps 90 days. One set up earlier keeps everything until you choose. A shorter time asks you to confirm with Delete older alerts, because it deletes them for good.
More
- Wazuh for a few Linux servers: what you really need (our hands-on guide, without ServerNest)
- Wazuh docs: how Wazuh is built, file integrity monitoring, enrolment password, installing the Wazuh agent