Oh good, %(_grep_logs)s looks like what I might have been looking for.

Thanks.

Ps: and yes 80100 is the correct port for their firewall api.

On 28/03/2020 23:44, Graham wrote:
On Sat, 28 Mar 2020, Philip via Fail2ban-users wrote:

Date: Sat, 28 Mar 2020 06:24:22
From: Philip via Fail2ban-users <fail2ban-users@lists.sourceforge.net>
[--- snipped ---]
I've got a curl statement that sends blocked IP's to an API, just curious if I can also send the "found" lines at the same time
(like in the email).

actionban = curl -d '{"ip":"<ip>"}' -H "Content-Type: application/json" -X POST http://localhost:80100/api/v1/networkbanip

Phil
[--- snipped ---]

Hello Phil,

    I have not tried it myself, but perhaps some variation on the theme of:-

curl ... --form data="$( grep ... )" ...

    There was an item on this mailing list on the subject of "Rearranging the action_mwl output?" from Gary Gapinski on 2020-02-24 which might give you a hint about "%(_grep_logs)s;" in your banning action.

    Incidentally, is it really port 80100?

    Hoping this helps,


_______________________________________________
Fail2ban-users mailing list
Fail2ban-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to