How to Install & Register Wazuh Agent on Windows and Linux (Debian-Based)

How to Install & Register Wazuh Agent on Windows and Linux (Debian-Based)

DEBIAN

Install Wazuh Agent

curl -so wazuh-agent.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.1.5-1_amd64.deb && sudo WAZUH_MANAGER='10.10.10.110' WAZUH_AGENT_GROUP='default' dpkg -i ./wazuh-agent.deb
sudo systemctl daemon-reload
sudo systemctl enable wazuh-agent
sudo systemctl start wazuh-agent

Register Wazuh Agent

/var/ossec/bin/agent-auth -m 10.10.10.110

Edit File

nano /var/ossec/etc/ossec.conf
<client>
  <server>
    <address>10.10.10.110</address>
    ...
  </server>
</client>

Restart File

systemctl restart wazuh-agent

WINDOWS

Install Wazuh Agent

Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-4.1.5-1.msi -OutFile wazuh-agent.msi; ./wazuh-agent.msi /q WAZUH_MANAGER='10.10.10.110' WAZUH_REGISTRATION_SERVER='10.10.10.110' WAZUH_AGENT_GROUP='default' 

Register Wazuh Agent

PowerShell Command

&'C:\Program Files (x86)\ossec-agent\agent-auth.exe' -m 10.10.10.110

Open File and edit

C:\Program Files (x86)\ossec-agent\ossec.conf
<client>
  <server>
    <address10.10.10.110</address>
    ...
  </server>
</client>

Restart

Restart-Service -Name wazuh