Hi Khul Sat,
Thanks for using Wazuh.
The
agent_control tool is showing
any in the IP because it was not set from the agent when it registered to the manager did not pass the IP, so it is automatically set as needed by the manager. To fix this, what you need to do is:
- Re-register your agent's using the agent_auth tool with: # /var/ossec/bin/agent-auth -m <Manager-IP> -A <Agent-Name> -I <Agent-IP>
Example: # /var/ossec/bin/agent-auth -m 192.168.56.10 -A testAgent -I 10.0.10.2 - After registering this way, you will see the IP in the agent's information using agent_control
Example: # /var/ossec/bin/agent_control -l
Wazuh agent_control. List of available agents:
ID: 000, Name: c3 (server), IP: 127.0.0.1, Active/Local
ID: 001, Name: WIN-JLGVA4CR4VI, IP: any, Disconnected
ID: 002, Name: testAgent, IP: 10.0.10.2, Never connected
As you can see, the testAgent, shows the IP that was passed in.
Agent control does not allow filtering by IP, you can filter by ID, but having the IPs and Names on display will allow you to easily identify each agent. If you really want to filter the response, uou could grep the output of
agent_control so it only prints the lines with the IPs you are looking for. Example: # /var/ossec/bin/agent_control -l | grep 10.0.10.2
ID: 002, Name: testAgent, IP: 10.0.10.2, Never connected
I hope this clears your question.
Cheers
On Thursday, February 16, 2023 at 1:43:36 AM UTC-3 Khul Sat wrote: