Looking for a script to aid in filtering ipsec connections

Hello,

I think what I’m trying to do seems pretty simple.

I’m having issues with random IP’s bombarding my router, trying to connect to its ipsec tunnel. I was thinking of trying to implement a script that after so many failed negotiation attempts would automatically add to a blacklist that I have created in my address list?

Currently I’m just manually adding them when they show up in the log. Just looking for a easier way of going about it.

Thanks