Hi, I am doing an investigation project as a final subject to my university and I need help on this matter, I have a wazuh manager running on debian that receives logs from a mikrotik router, when someone fails 5 times trying to log in the router, it sends an alert to the manager that will act on said alert by adding the IP that tried to login to an address list in the mikrotik router that will have all its traffic blocked with a timeout set to a day. What I want to do right now is, finding out how to instantly unblock an IP who is blocked without having to wait a day for it to automatically unblock. What im trying to do is, create manually a json payload and send it to the manager using curl, the command im using works, yet the manager is not sending the output to the correct place, I also have a test-agent machine also running on debian, the manager is sending the command to that machine, that has the wazuh agent installed, yet I want it to send it to the mikrotik router who is an agentless system. Is it possible for me to do that, or it only works no agents with wazuh installed on it?
the command i used is this: "curl -k -X PUT "
https://192.168.31.179:55000/active-response" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"command":"delete","alert":{"timestamp":"2023-06-15T10:09:29.676+0100","rule":{"level":15,"description":"Mikrotik: Suspeita ataque forcabruta","id":"100102","frequency":5,"firedtimes":1,"mail":true,"groups":["mikrotik"]},"agent":{"id":"000","name":"cmanuel2"},"manager":{"name":"cmanuel2"},"id":"1686820169.2649","previous_output":"system,error,critical mikrotik_logs: login failure for user admin from 192.168.31.1 via web\nsystem,error,critical mikrotik_logs: login failure for user admin from 192.168.31.1 via web\nsystem,error,critical mikrotik_logs: login failure for user admin from 192.168.31.1 via web\nsystem,error,critical mikrotik_logs: login failure for user admin from 192.168.31.1 via web","full_log":"system,error,critical mikrotik_logs: login failure for user admin from 192.168.31.1 via web","decoder":{"parent":"mikrotik","name":"mikrotik"},"data":{"srcip":"192.168.31.1","dstuser":"admin"},"location":"192.168.31.201"}}' "
and the output is this: "{"data": {"affected_items": [], "total_affected_items": 0, "total_failed_items": 1, "failed_items": [{"error": {"code": 1707, "message": "Cannot send request, agent is not active", "remediation": "Please, check non-active agents connection and try again. Visit
https://documentation.wazuh.com/4.4/user-manual/registering/index.html and
https://documentation.wazuh.com/4.4/user-manual/agents/agent-connection.html to obtain more information on registering and connecting agents"}, "id": ["001"]}]}, "message": "AR command was not sent to any agent", "error": 1}"
I know the output gives me an error because the test-agent machine is turned off, but it shouldnt try to send the command above to it in the first place, it should do it to the mikrotik router. Thanks in advance for the help!