<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=OSSEC%3A_Ubuntu_20.04</id>
	<title>OSSEC: Ubuntu 20.04 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=OSSEC%3A_Ubuntu_20.04"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=OSSEC:_Ubuntu_20.04&amp;action=history"/>
	<updated>2026-04-17T02:27:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=OSSEC:_Ubuntu_20.04&amp;diff=62807&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;Sumber: https://kifarunix.com/install-ossec-hids-agent-on-ubuntu-20-04/    Install OSSEC HIDS Agent on Ubuntu 20.04 By koromicha -June 22, 202001948 This tutorial will guide y...&quot;</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=OSSEC:_Ubuntu_20.04&amp;diff=62807&amp;oldid=prev"/>
		<updated>2021-01-10T23:14:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Sumber: https://kifarunix.com/install-ossec-hids-agent-on-ubuntu-20-04/    Install OSSEC HIDS Agent on Ubuntu 20.04 By koromicha -June 22, 202001948 This tutorial will guide y...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: https://kifarunix.com/install-ossec-hids-agent-on-ubuntu-20-04/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install OSSEC HIDS Agent on Ubuntu 20.04&lt;br /&gt;
By koromicha -June 22, 202001948&lt;br /&gt;
This tutorial will guide you on how to install OSSEC HIDS agent on Ubuntu 20.04 system from the source tarball.&lt;br /&gt;
 OSSEC is an Open Source Host based Intrusion Detection System that performs log analysis, integrity checking, Windows registry monitoring, rootkit detection, real-time alerting and active response. It runs across multiple platforms including Linux, OpenBSD, FreeBSD, Mac OS X, Solaris and Windows etc.&lt;br /&gt;
&lt;br /&gt;
Install OSSEC HIDS Agent on Ubuntu 20.04&lt;br /&gt;
Run System Update&lt;br /&gt;
To begin with, ensure that your system package cache is up-to-date.&lt;br /&gt;
&lt;br /&gt;
apt update&lt;br /&gt;
Install Required Dependencies&lt;br /&gt;
A successful build and installation of OSSEC HIDS agent on Ubuntu 20.04 from the source requires quite a number of dependencies to be installed on the system. Run the command below to install these dependencies.&lt;br /&gt;
apt install gcc make libevent-dev zlib1g-dev  libssl-dev libpcre2-dev wget tar -y&lt;br /&gt;
Download Latest OSSEC Source Code&lt;br /&gt;
OSSEC 3.6 is the latest stable release version as of this writing. Check the releases page for the latest releases.&lt;br /&gt;
&lt;br /&gt;
wget https://github.com/ossec/ossec-hids/archive/3.6.0.tar.gz -P /tmp&lt;br /&gt;
Extract OSSEC Source Code&lt;br /&gt;
Once the OSSEC source download is completed, extract it as follows;&lt;br /&gt;
cd /tmp&lt;br /&gt;
tar xzf 3.6.0.tar.gz&lt;br /&gt;
Install OSSEC HIDS Agent on Ubuntu 20.04&lt;br /&gt;
To install OSSEC agent, navigate to the source code directory and run the installation script.&lt;br /&gt;
&lt;br /&gt;
cd ossec-hids-3.6.0/&lt;br /&gt;
Execute the installation group;&lt;br /&gt;
&lt;br /&gt;
./install.sh&lt;br /&gt;
Select you installation language. In this case, we choose the default install language, English.&lt;br /&gt;
&lt;br /&gt;
Press ENTER to choose default installation options or select your language from the list.&lt;br /&gt;
(en/br/cn/de/el/es/fr/hu/it/jp/nl/pl/ru/sr/tr) [en]: ENTER&lt;br /&gt;
Again, press ENTER to continue.&lt;br /&gt;
&lt;br /&gt;
-- Press ENTER to continue or Ctrl-C to abort. --&lt;br /&gt;
Specify the type of installation. In our case, we are installing ossec-hids agent, hence select agent.&lt;br /&gt;
&lt;br /&gt;
1- What kind of installation do you want (server, agent, local, hybrid or help)? agent&lt;br /&gt;
&lt;br /&gt;
  - Agent(client) installation chosen.&lt;br /&gt;
Choose the installation path. We go with the default, /var/ossec.&lt;br /&gt;
&lt;br /&gt;
2- Setting up the installation environment.&lt;br /&gt;
&lt;br /&gt;
 - Choose where to install the OSSEC HIDS [/var/ossec]: ENTER&lt;br /&gt;
&lt;br /&gt;
    - Installation will be made at  /var/ossec .&lt;br /&gt;
Enter the OSSEC-HIDs Server IP address or hostname. Replace the IP used here accordingly.&lt;br /&gt;
&lt;br /&gt;
3- Configuring the OSSEC HIDS.&lt;br /&gt;
&lt;br /&gt;
  3.1- What's the IP Address or hostname of the OSSEC HIDS server?: 192.168.56.11                  &lt;br /&gt;
&lt;br /&gt;
   - Adding Server IP 192.168.56.11&lt;br /&gt;
Enable system integrity check&lt;br /&gt;
&lt;br /&gt;
  3.2- Do you want to run the integrity check daemon? (y/n) [y]: y&lt;br /&gt;
&lt;br /&gt;
   - Running syscheck (integrity check daemon).&lt;br /&gt;
Enable rootkit detection engine.&lt;br /&gt;
&lt;br /&gt;
  3.3- Do you want to run the rootkit detection engine? (y/n) [y]: y&lt;br /&gt;
&lt;br /&gt;
   - Running rootcheck (rootkit detection).&lt;br /&gt;
Disable active response. Otherwise, you can enable it if you an understanding of the type and number of alerts you want.&lt;br /&gt;
&lt;br /&gt;
  3.4 - Do you want to enable active response? (y/n) [y]: n&lt;br /&gt;
&lt;br /&gt;
   - Active response disabled.&lt;br /&gt;
The agent installer then displays the log files that are read by default. You can add more later on ossec.conf file.&lt;br /&gt;
  3.5- Setting the configuration to analyze the following logs:&lt;br /&gt;
    -- /var/log/messages&lt;br /&gt;
    -- /var/log/secure&lt;br /&gt;
    -- /var/log/maillog&lt;br /&gt;
...&lt;br /&gt;
Once you are done defining the default options, proceed to install OSSEC agent on Ubuntu 20.04 by pressing ENTER.&lt;br /&gt;
&lt;br /&gt;
Once the agent is installed, you will see an output similar to;&lt;br /&gt;
&lt;br /&gt;
 - System is Debian (Ubuntu or derivative).&lt;br /&gt;
 - Init script modified to start OSSEC HIDS during boot.&lt;br /&gt;
&lt;br /&gt;
 - Configuration finished properly.&lt;br /&gt;
&lt;br /&gt;
 - To start OSSEC HIDS:&lt;br /&gt;
      /var/ossec/bin/ossec-control start&lt;br /&gt;
&lt;br /&gt;
 - To stop OSSEC HIDS:&lt;br /&gt;
      /var/ossec/bin/ossec-control stop&lt;br /&gt;
&lt;br /&gt;
 - The configuration can be viewed or modified at /var/ossec/etc/ossec.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Thanks for using the OSSEC HIDS.&lt;br /&gt;
    If you have any question, suggestion or if you find any bug,&lt;br /&gt;
    contact us at https://github.com/ossec/ossec-hids or using&lt;br /&gt;
    our public maillist at  &lt;br /&gt;
    https://groups.google.com/forum/#!forum/ossec-list&lt;br /&gt;
&lt;br /&gt;
    More information can be found at http://www.ossec.net&lt;br /&gt;
&lt;br /&gt;
    ---  Press ENTER to finish (maybe more information below). ---&lt;br /&gt;
Press ENTER to close the installer.&lt;br /&gt;
&lt;br /&gt;
Connect the OSSEC Agent to OSSEC Server&lt;br /&gt;
For the agent to communicate with the server;&lt;br /&gt;
&lt;br /&gt;
You can need to first add it to the HIDS server, in our case we used AlienVault OSSIM.&lt;br /&gt;
After that extract the agent authentication key from the server.&lt;br /&gt;
Once you have extracted the key, Import the key on the agent by running the command below;&lt;br /&gt;
&lt;br /&gt;
/var/ossec/bin/manage_agents&lt;br /&gt;
Enter option I, paste the key and confirm adding the key. Then type Q and press enter to exit.&lt;br /&gt;
****************************************&lt;br /&gt;
* OSSEC HIDS v3.6.0 Agent manager.     *&lt;br /&gt;
* The following options are available: *&lt;br /&gt;
****************************************&lt;br /&gt;
   (I)mport key from the server (I).&lt;br /&gt;
   (Q)uit.&lt;br /&gt;
Choose your action: I or Q: I&lt;br /&gt;
&lt;br /&gt;
* Provide the Key generated by the server.&lt;br /&gt;
* The best approach is to cut and paste it.&lt;br /&gt;
*** OBS: Do not include spaces or new lines.&lt;br /&gt;
&lt;br /&gt;
Paste it here (or '\q' to quit): NSttstGSTsgspsgsjshsYmV5a2ktb3Blbnzk999383nndZwbiAxMC43LjMuNTggMWQyNzBjZTZlNzI2OGI2MWUzOWQ4NTg4YjgwM2ZjNDhhZWY2OTQxZTU2OWE2M2U3MjQ1N2Y1w==&lt;br /&gt;
&lt;br /&gt;
Agent information:&lt;br /&gt;
   ID:10&lt;br /&gt;
   Name:koromicha&lt;br /&gt;
   IP Address:192.168.43.17&lt;br /&gt;
&lt;br /&gt;
Confirm adding it?(y/n): y&lt;br /&gt;
2020/06/22 20:16:03 manage_agents: ERROR: Cannot unlink /queue/rids/sender: No such file or directory&lt;br /&gt;
Added.&lt;br /&gt;
** Press ENTER to return to the main menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
****************************************&lt;br /&gt;
* OSSEC HIDS v3.6.0 Agent manager.     *&lt;br /&gt;
* The following options are available: *&lt;br /&gt;
****************************************&lt;br /&gt;
   (I)mport key from the server (I).&lt;br /&gt;
   (Q)uit.&lt;br /&gt;
Choose your action: I or Q: q&lt;br /&gt;
&lt;br /&gt;
** You must restart OSSEC for your changes to take effect.&lt;br /&gt;
&lt;br /&gt;
manage_agents: Exiting.&lt;br /&gt;
manage_agents: Exiting.&lt;br /&gt;
Running OSSEC Agent&lt;br /&gt;
Once the installation completes, the installer displays how to run OSSEC agent.&lt;br /&gt;
&lt;br /&gt;
To start the agent;&lt;br /&gt;
&lt;br /&gt;
/var/ossec/bin/ossec-control start&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
systemctl start ossec&lt;br /&gt;
To stop the agent;&lt;br /&gt;
&lt;br /&gt;
/var/ossec/bin/ossec-control stop&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
systemctl stop ossec&lt;br /&gt;
Other unit service control commands;&lt;br /&gt;
&lt;br /&gt;
/var/ossec/bin/ossec-control {start|stop|reload|restart|status}&lt;br /&gt;
To check the status;&lt;br /&gt;
&lt;br /&gt;
/var/ossec/bin/ossec-control status&lt;br /&gt;
ossec-logcollector is running...&lt;br /&gt;
ossec-syscheckd is running...&lt;br /&gt;
ossec-agentd is running...&lt;br /&gt;
ossec-execd not running...&lt;br /&gt;
Check the logs to see if the agent has connected to the server;&lt;br /&gt;
&lt;br /&gt;
tail -f /var/ossec/logs/ossec.log&lt;br /&gt;
2020/06/22 20:20:54 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: '192.168.56.11'.&lt;br /&gt;
2020/06/22 20:20:56 ossec-agentd: INFO: Trying to connect to server 192.168.56.11, port 1514.&lt;br /&gt;
2020/06/22 20:20:56 INFO: Connected to 192.168.56.11 at address 192.168.56.11, port 1514&lt;br /&gt;
2020/06/22 20:20:56 ossec-agentd: DEBUG: agt-&amp;gt;sock: 14&lt;br /&gt;
...&lt;br /&gt;
You have successfully installed OSSEC agent on Ubuntu 20.04 and connected it to the HIDS server.&lt;br /&gt;
Login back to the HIDs server, restart the HIDS server service and check if the agent is active.&lt;br /&gt;
That brings us to the end of our guide on how to install OSSEC HIDS agent on Ubuntu 20.04.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://kifarunix.com/install-ossec-hids-agent-on-ubuntu-20-04/&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>