Hi,
I am getting some malicious IP's spamming my FusionPBX Freeswitch server with inbound call attempts.
I'd like to ban the IP automatically via Fail2Ban but ....the offending IP (HOST) is on another line and not in the same line as the "indicator" - I'm not really familiar how I can work with multiple lines in the same regex.
Freeswitch log lines
My current filter
Any help would be appreciated.
I am getting some malicious IP's spamming my FusionPBX Freeswitch server with inbound call attempts.
I'd like to ban the IP automatically via Fail2Ban but ....the offending IP (HOST) is on another line and not in the same line as the "indicator" - I'm not really familiar how I can work with multiple lines in the same regex.
Freeswitch log lines
Code:
7b383019-b74c-4ae0-bc9f-aa102e5622c3 2018-03-22 17:17:04.657702 [DEBUG] sofia.c:9248 sofia/External_NAT/95917@MY.IP.HERE receiving invite from MALICIOUS.IP.HERE:5070 version: 1.6.6 -13-d2d0b32 64bit
...some other lines here
7b383019-b74c-4ae0-bc9f-aa102e5622c3 EXECUTE sofia/External_NAT/95917@MY.IP.HERE log(WARNING Accountcode is not authenticated!!)
7b383019-b74c-4ae0-bc9f-aa102e5622c3 2018-03-22 17:17:04.737681 [WARNING] mod_dptools.c:1692 Accountcode is not authenticated!!
My current filter
Code:
failregex = ^\.\d+ \[WARNING\] mod_dptools.c:\d+ Accountcode is not authenticated!!$
Any help would be appreciated.