{"id":1770,"date":"2022-11-12T19:41:57","date_gmt":"2022-11-12T19:41:57","guid":{"rendered":"https:\/\/www.balajibandi.com\/?p=1770"},"modified":"2023-11-18T19:14:00","modified_gmt":"2023-11-18T19:14:00","slug":"wazuh-indexer-and-dashboard-installation","status":"publish","type":"post","link":"https:\/\/www.balajibandi.com\/?p=1770","title":{"rendered":"WAZUH (indexer and dashboard) Installation."},"content":{"rendered":"\n<p><a href=\"https:\/\/www.balajibandi.com\/?p=1766\">Part of this SIEM Build<\/a><\/p>\n\n\n\n<p>The Wazuh Security Information and Event Management (SIEM) solution provides monitoring, detection, and alerting of security events and incidents.<\/p>\n\n\n\n<p><a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/wazuh-indexer\/step-by-step.html\">Installation of WAZU<\/a> (I have followed the steps provided in the document and some references in google search)<\/p>\n\n\n\n<p>Follow the installation steps 1 to 5 from the above-mentioned installation document.<\/p>\n\n\n\n<p>Prep Work :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Setup and hostname as FQDN to generate Certs<\/li>\n\n\n\n<li>and prepare the environment for installation.<\/li>\n<\/ol>\n\n\n\n<p>I have 2 Interface on My Linux ( one is connected to external and another connected to internal for security reasons)<\/p>\n\n\n\n<p><strong>External Facing<\/strong> :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"34\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-2.png\" alt=\"\" class=\"wp-image-1774\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-2.png 626w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-2-300x16.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><figcaption class=\"wp-element-caption\"><strong>Interface Facing :<\/strong><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"38\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-1.png\" alt=\"\" class=\"wp-image-1773\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-1.png 561w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-1-300x20.png 300w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/figure>\n\n\n\n<p>setup a hostname so FQDN can resolve the domain name :<\/p>\n\n\n\n<p>edit hosts file and setup and desired name you looking to use. (my case soclab.bb.local)<\/p>\n\n\n\n<p>vi \/etc\/hosts<\/p>\n\n\n\n<p>10.10.9.1 soclab.bb.local soclab<\/p>\n\n\n\n<p>I am able to ping success :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"164\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-3.png\" alt=\"\" class=\"wp-image-1775\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-3.png 612w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-3-300x80.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/figure>\n\n\n\n<p>Step 1 &#8211; Download the&nbsp;<code>wazuh-certs-tool.sh<\/code>&nbsp;script and the&nbsp;<code>config.yml<\/code>&nbsp;configuration file. This creates the certificates that encrypt communications between the Wazuh central components.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>curl -sO https:\/\/packages.wazuh.com\/4.3\/wazuh-certs-tool.sh\ncurl -sO https:\/\/packages.wazuh.com\/4.3\/config.yml<\/strong>\n<\/code><\/pre>\n\n\n\n<p>Step 2 &#8211; edit the config.yml as per our environment :<\/p>\n\n\n\n<p>My config.yml Look as below : <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"404\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-4.png\" alt=\"\" class=\"wp-image-1776\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-4.png 463w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-4-300x262.png 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/figure>\n\n\n\n<p>Step 3 &#8211; bash .\/wazuh-certs-tool.sh -A<\/p>\n\n\n\n<p>You see the below files in the folder.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"529\" height=\"166\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-5.png\" alt=\"\" class=\"wp-image-1777\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-5.png 529w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-5-300x94.png 300w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><figcaption class=\"wp-element-caption\">Step 4: tar the files and keep them ready for future steps.<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">tar -cvf .\/wazuh-certificates.tar -C .\/wazuh-certificates\/ .<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"25\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-6.png\" alt=\"\" class=\"wp-image-1778\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-6.png 531w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-6-300x14.png 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/figure>\n\n\n\n<p>Follow the below steps to install packages and Wazuh :<\/p>\n\n\n\n<p>Installing package dependencies<a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/wazuh-indexer\/step-by-step.html#installing-package-dependencies\"><\/a><\/p>\n\n\n\n<p>Adding the Wazuh repository<a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/wazuh-indexer\/step-by-step.html#adding-the-wazuh-repository\"><\/a><\/p>\n\n\n\n<p>Installing the Wazuh indexer<a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/wazuh-indexer\/step-by-step.html#installing-the-wazuh-indexer\"><\/a><\/p>\n\n\n\n<p>Below config  &#8211; Configuring the Wazuh indexer<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"294\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-7-1024x294.png\" alt=\"\" class=\"wp-image-1779\" style=\"width:864px;height:248px\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-7-1024x294.png 1024w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-7-300x86.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-7-768x220.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-7-1536x441.png 1536w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-7-705x202.png 705w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-7.png 1906w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Deploying certificates<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">NODE_NAME=soclab.bb.local\n\nmkdir \/etc\/wazuh-indexer\/certs\ntar -xf .\/wazuh-certificates.tar -C \/etc\/wazuh-indexer\/certs\/ .\/$NODE_NAME.pem .\/$NODE_NAME-key.pem .\/admin.pem .\/admin-key.pem .\/root-ca.pem\nchmod 500 \/etc\/wazuh-indexer\/certs\nchmod 400 \/etc\/wazuh-indexer\/certs\/*\nchown -R wazuh-indexer:wazuh-indexer \/etc\/wazuh-indexer\/certs\n\nMy Cert folder have below :<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"148\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-8.png\" alt=\"\" class=\"wp-image-1780\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-8.png 674w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-8-300x66.png 300w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/figure>\n\n\n\n<p>Start the Services :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>#systemctl daemon-reload\n# systemctl enable wazuh-indexer\n# systemctl start wazuh-indexer<\/strong>\n<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"781\" height=\"129\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-9.png\" alt=\"\" class=\"wp-image-1781\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-9.png 781w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-9-300x50.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-9-768x127.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-9-705x116.png 705w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/figure>\n\n\n\n<p>Now Wazuh indexer running, later initialize cluster<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\/usr\/share\/wazuh-indexer\/bin\/indexer-security-init.sh\n\ncheck the port 9200 and 9300 Listening :\n<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"838\" height=\"181\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-11.png\" alt=\"\" class=\"wp-image-1783\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-11.png 838w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-11-300x65.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-11-768x166.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-11-705x152.png 705w\" sizes=\"auto, (max-width: 838px) 100vw, 838px\" \/><\/figure>\n\n\n\n<p>Testing : <\/p>\n\n\n\n<p>#curl -k -u admin:admin https:\/\/soclan.bb.local:9200<\/p>\n\n\n\n<p>show the results means the indexer running as expected :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"523\" height=\"258\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-10.png\" alt=\"\" class=\"wp-image-1782\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-10.png 523w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-10-300x148.png 300w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/figure>\n\n\n\n<p>Now Indexer running, now we move to dashboard installation, so it is easy to manage the config using GUI.<\/p>\n\n\n\n<p><a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/wazuh-dashboard\/step-by-step.html\">Installing the Wazuh dashboard step by step<\/a><\/p>\n\n\n\n<p>My config looks as below :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"213\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-12.png\" alt=\"\" class=\"wp-image-1784\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-12.png 772w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-12-300x83.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-12-768x212.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-12-705x195.png 705w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/figure>\n\n\n\n<p>This is straight forward installation. if you have changed the password part of the dashboard installation steps: <strong>Securing your Wazuh installation<\/strong><\/p>\n\n\n\n<p>If so please change the <strong>kibanaserver<\/strong> password in the config file.<\/p>\n\n\n\n<p>echo &lt;<strong>kibanaserver-password<\/strong>&gt; | \/usr\/share\/wazuh-dashboard\/bin\/opensearch-dashboards-keystore &#8211;allow-root add -f &#8211;stdin opensearch.password<\/p>\n\n\n\n<p>Restart the dashboard service to take effect of a new password.<\/p>\n\n\n\n<p>systemctl restart wazuh-dashboard (below you see the service is active).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"100\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-13.png\" alt=\"\" class=\"wp-image-1785\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-13.png 824w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-13-300x36.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-13-768x93.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-13-705x86.png 705w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/figure>\n\n\n\n<p>Now time to access GUI :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"684\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-14-1024x684.png\" alt=\"\" class=\"wp-image-1786\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-14-1024x684.png 1024w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-14-300x200.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-14-768x513.png 768w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-14-705x471.png 705w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2022\/11\/image-14.png 1064w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Use username: admin and password: new password generated by security wazuh.<\/figcaption><\/figure>\n\n\n\n<p>Now You have Indexer and dashboard running as expected.<\/p>\n\n\n\n<p>My Next step set up a Graylog and configured logging to collect some logs and test them.<\/p>\n\n\n\n<p>Happy Labbbinggggg!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part of this SIEM Build The Wazuh Security Information and Event Management (SIEM) solution provides monitoring, detection, and alerting of security events and incidents. Installation of WAZU (I have followed the steps provided in the document and some references in google search) Follow the installation steps 1 to 5 from the above-mentioned installation document. Prep [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,6],"tags":[],"class_list":["post-1770","post","type-post","status-publish","format-standard","hentry","category-linux","category-security"],"_links":{"self":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1770"}],"version-history":[{"count":4,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1770\/revisions"}],"predecessor-version":[{"id":1939,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1770\/revisions\/1939"}],"wp:attachment":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}