Hello zwish,
I’ve checked your configuration and it looks correct.
You’ve set the frequency value to 600, this means you will get alerts every 10 minutes if the result of the commands you’ve set in the arguments option change from the last result.
If you create a new directory or file inside /etc you will be informed the next time the manager checks it.
It’s important to keep in mind the agentless device doesn’t send the logs to the manager, it is the manager who makes a new ssh connection and then it executes the commands to get the results and analyze them.
Remember you need to restart the manager every time you change your ossec.conf file in order to get the changes applied.
You can get further information about agentless monitoring here: https://documentation.wazuh.com/current/user-manual/capabilities/agentless-monitoring/index.html
You could also enable syslog in the device. This way it will forward the logs to the manager then they will be parsed by the ruleset so alerts can be triggered.
The manager has to be configured to receive these logs, you need to create a <remote> section inside your ossec.conf file in the manager.
This section should look like:
<remote>
<connection>syslog</connection>
<port>514</port>
<protocol>udp</protocol>
<allowed-ips>192.168.2.0/24</allowed-ips>
</remote>Where you have to specify the IPs you want to allow and the rest of the options like the protocol, port ...
You may check for further information about it here: https://documentation.wazuh.com/current/user-manual/capabilities/log-data-collection/how-it-works.html?highlight=syslog#remote-syslog
Hope this information helps you and don’t hesitate to ask us again.
Regards.
host smoothwall
user root
port 222
hostname 192.168.0.88chown ossec:ossec /var/ossec/.ssh -R/var/ossec/agentless/register_host.sh add smoothwall example_password
and the ossec.conf file as:
<agentless>
<type>ssh_generic_diff</type>
<frequency>600</frequency>
<state>periodic_diff</state>
<arguments>ls -al /etc; cat /etc/passwd</arguments>
</agentless>/var/ossec/bin/ossec-agentlessd -ddfand ./agent-control result is above picture.
I don' know why my agentless ID and IP are '<na>'?
I think my configuration is all right.
Can you give me a some hints for me?
Hello Zwish,
The agentless daemon is telling us he is not able to connect to the device so It’s possible there is an issue with the configuration.
Did you place your ssh config file in the path /var/ossec/.ssh/config ?
Can you check the connectivity from Wazuh to the agentless device?
It is possible to check it by calling the ssh command in your machine this way:
sudo -u ossec ssh smoothwall
If it doesn’t work check the connectivity from your machine to the agentless device this way:
sudo ssh user@hostname -p port
Keep in mind you must replace “user”, “hostname” and “port” with the values used in the config file
Regards.