OSSEC Agent not works

80 views
Skip to first unread message

Руслан Аминджанов

unread,
Apr 13, 2017, 6:24:32 PM4/13/17
to ossec-list, amindzhan...@me.com
Hello!
I installed OSSEC server and client on 2 hosts whoever agent showed as "Never connected". There is no firewall between these hosts and if I use netcat to connect to server It log shows that message is not properly formated.
Output of tcpdump:

00:58:11.619862 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73

00:58:11.620415 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73

00:58:15.620201 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73

00:58:15.620618 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73

00:58:20.620619 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73

00:58:20.621167 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73

00:58:26.621162 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73

00:58:26.621703 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73

dan (ddp)

unread,
Apr 13, 2017, 6:27:06 PM4/13/17
to ossec...@googlegroups.com
On Thu, Apr 13, 2017 at 6:09 PM, Руслан Аминджанов
<thetec...@gmail.com> wrote:
> Hello!
> I installed OSSEC server and client on 2 hosts whoever agent showed as
> "Never connected". There is no firewall between these hosts and if I use
> netcat to connect to server It log shows that message is not properly
> formated.

Did you add the agent using manage_agents and then restart the OSSEC
processes on the server?
Did you export the key and add it to you agent and then start the
OSSEC processes on the agent?

> Output of tcpdump:
>
> 00:58:11.619862 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73
>
> 00:58:11.620415 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73
>
> 00:58:15.620201 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73
>
> 00:58:15.620618 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73
>
> 00:58:20.620619 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73
>
> 00:58:20.621167 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73
>
> 00:58:26.621162 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73
>
> 00:58:26.621703 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ossec-list" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ossec-list+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Руслан Аминджанов

unread,
Apr 14, 2017, 4:21:32 AM4/14/17
to ossec-list
Yes, I done it.

dan (ddp)

unread,
Apr 14, 2017, 2:44:18 PM4/14/17
to ossec...@googlegroups.com
On Fri, Apr 14, 2017 at 4:21 AM, Руслан Аминджанов
<thetec...@gmail.com> wrote:
> Yes, I done it.
>

Configure debug mode on the OSSEC server
(`/var/ossec/bin/ossec-control enable debug &&
/var/ossec/bin/ossec-control restart`).
Then check the server's ossec.log again to see if an error is produced.

Руслан Аминджанов

unread,
Apr 15, 2017, 4:57:28 AM4/15/17
to ossec-list
Reinstalled on both server and client, enabled debug mode. Still same situation.

пятница, 14 апреля 2017 г., 21:44:18 UTC+14 пользователь dan (ddpbsd) написал:

dan (ddp)

unread,
Apr 15, 2017, 1:06:38 PM4/15/17
to ossec...@googlegroups.com
On Sat, Apr 15, 2017 at 4:57 AM, Руслан Аминджанов
<thetec...@gmail.com> wrote:
> Reinstalled on both server and client, enabled debug mode. Still same
> situation.
>

Are there any relevant logs in the server's ossec.log?
Are there any relevant logs in the agent's ossec.log?
Help me help you.

Kat

unread,
Apr 15, 2017, 5:59:49 PM4/15/17
to ossec-list, amindzhan...@me.com
It really sounds like you are missing a step -- perhaps post the steps you do for the install, adding an agent etc, showing the commands and results. We need something more to help you. 

Kat

Victor Fernandez

unread,
Apr 17, 2017, 3:46:29 AM4/17/17
to ossec...@googlegroups.com, amindzhan...@me.com
Hi,

have you more than one network interface on your manager? I see your tcpdump log a bit unusual:

00:58:11.619862 IP 10.2.2.3.43453 > 10.2.2.12.fujitsu-dtcns: UDP, length 73
00:58:11.620415 IP 10.2.2.13.fujitsu-dtcns > 10.2.2.3.43453: UDP, length 73

It seems that the manager is responding (probably an ACK message) but it is doing it from a different IP (10.2.2.13 instead of 10.2.2.12).

Do you see any error at /var/ossec/log/ossec.log at the agent?

Best regards. 

--

---
You received this message because you are subscribed to the Google Groups "ossec-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ossec-list+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Victor M. Fernandez-Castro
IT Security Engineer
Wazuh Inc.

Руслан Аминджанов

unread,
Apr 17, 2017, 10:16:44 AM4/17/17
to ossec-list, amindzhan...@me.com
I am reinstalling system right now but it looks like this was the issue. Thank you very much!

понедельник, 17 апреля 2017 г., 7:01:29 UTC+5:45 пользователь Victor Fernandez написал:
To unsubscribe from this group and stop receiving emails from it, send an email to ossec-list+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Руслан Аминджанов

unread,
May 27, 2017, 5:39:36 PM5/27/17
to ossec-list, amindzhan...@me.com
Fully reinstalled system and got a new problem: still agents not connecting but now event if I send messages to ossec-remoted via netcat there is no entities in log. Checked via netstat and ossec-remoted is listening.

понедельник, 17 апреля 2017 г., 18:01:44 UTC+5:45 пользователь Руслан Аминджанов написал:

dan (ddp)

unread,
May 27, 2017, 8:38:13 PM5/27/17
to ossec...@googlegroups.com
On Sat, May 27, 2017 at 5:39 PM, Руслан Аминджанов
<thetec...@gmail.com> wrote:
> Fully reinstalled system and got a new problem: still agents not connecting
> but now event if I send messages to ossec-remoted via netcat there is no
> entities in log. Checked via netstat and ossec-remoted is listening.
>

Turn on debug mode on the manager (`/var/ossec/bin/ossec-control
enable debug`), restart OSSEC (`/var/ossec/bin/ossec-control
restart`), and try again.

Руслан Аминджанов

unread,
May 28, 2017, 6:38:40 PM5/28/17
to ossec-list
Still nothing.
https://0bin.net/paste/7rMT6xDrnBLdjAZd#HIJmfdpKt4bnGmgsV30SdbywkXSi0-pnzZ7UXZBDffw

суббота, 27 мая 2017 г., 22:38:13 UTC+5 пользователь dan (ddpbsd) написал:
Reply all
Reply to author
Forward
0 new messages