2026年8月28日 星期五

[研究]Wazuh Server v4.14 安裝

[研究]Wazuh Server  v4.14 安裝

2026-08-27、2026-08-28

Wazuh Server (Ubuntu) 常用 Port

Port Protocol 用途 必要性
1514 TCP/UDP Wazuh Agent → Manager,傳送事件/Log ⭐⭐⭐ 必要
1515 TCP Agent enrollment / registration ⭐⭐⭐ 初次註冊必要
55000 TCP Wazuh API ⭐⭐ Dashboard/API
443 TCP Wazuh Dashboard HTTPS ⭐⭐⭐ 從瀏覽器登入必要
9200 TCP Wazuh Indexer API ⚠️ 通常不需要對外開
9300 TCP Indexer cluster communication ⚠️ 多節點才需要

如果要複製指令,貼到 Ubuntu (VM) 中,請參考下篇安裝 Open VM Tools

[研究]VMware Workstation Pro 於 Ubuntu 26.04 VM 安裝 Open VM Tools方法
https://shaurong.blogspot.com/2026/08/vmware-workstation-pro-ubuntu-2604-vm.html

一、先確認 Ubuntu UFW

sudo ufw status

如果:Status: inactive,表示 UFW 沒有啟用,不用新增 Port。

如果:Status: active,才需要設定。

ufw /?  可以查指令,enable 啟用,disable 停用。

二、開放 Wazuh Port

sudo ufw allow 1514/tcp

sudo ufw allow 1514/udp

sudo ufw allow 1515/tcp

sudo ufw allow 55000/tcp

sudo ufw allow 443/tcp

sudo ufw reload

sudo ufw status numbered

三、比較推薦:只允許內網

sudo ufw allow from 192.168.128.0/24 to any port 1514 proto tcp

sudo ufw allow from 192.168.128.0/24 to any port 1514 proto udp

sudo ufw allow from 192.168.128.0/24 to any port 1515 proto tcp

sudo ufw allow from 192.168.128.0/24 to any port 443 proto tcp

sudo ufw allow from 192.168.128.0/24 to any port 55000 proto tcp


********************************************************************************

Windows Wazuh Agent 需要開哪些 Port?(理論上不用特別處理)

Port Protocol 用途
1514 TCP/UDP Wazuh Agent → Manager
1515 TCP Agent registration
55000 TCP Wazuh API
443 TCP Dashboard HTTPS

********************************************************************************

安裝基本套件 sudo apt install -y curl unzip wget gnupg


看 IP 是甚麼:ip addr

看 主機名稱 (hostname) 是甚麼:hostnamectl

安裝:

curl -sO https://packages.wazuh.com/4.14/wazuh-install.sh

sudo bash ./wazuh-install.sh -a

安裝程式會自動處理:

Wazuh Indexer => Wazuh Manager => Filebeat => Wazuh Dashboard

不需要一個一個手動安裝。


訊息最後有 Wazuh Dashboard 管理員帳號

User: admin

Password: SjB01?PP1ZhH50u?XUYzuTzZAS?ysnLK

    User: admin

    Password: iB??XPusjGDVQg.2iySsco6CjqQgNl3i

從 Windows PC 開瀏覽器:https://192.168.128.134

若想確認狀態,Ubuntu 執行:
sudo systemctl status wazuh-manager
sudo systemctl status wazuh-indexer
sudo systemctl status wazuh-dashboard
sudo systemctl status filebeat

或可以一次執行:
sudo systemctl status wazuh-manager wazuh-indexer wazuh-dashboard filebeat

應該會看到
Active: active (running)

確認 Wazuh 實際有 Listen
sudo ss -lntup | grep -E '1514|1515|443|55000'



按下 Deploy new agent 按鈕

填好資訊,到 Windows Agent  ( 例如 Windows Server 2019) 上執行指令

WAZUH_MANAGER 是 Wazuh Server 的 IP (Ubuntu)




貼到 Windows Server 2019 ( Agent) 的 PowerShell上執行




Server 端 (PC Windows 瀏覽器 Dashboard 畫面)





成功。

(完)

沒有留言:

張貼留言