- Issue created by @aaronpinero
Is there any interest in an extension to this module for bulk banning IP ranges?
I have a large number of IP ranges that I wanted to ban. This comes from using another method to ban IP ranges and I want to convert to using the Advanced Ban module. However, I don't want to be required to enter several dozen start and end IP addresses for these ranges.
As a solution, I've created what is, for now, a custom module. I have essentially duplicated the AdvbanAdmin form from the Advanced Ban module and modified it to accept a line break-separated list of IP ranges in CIDR format. The submitForm function separates the list into individual IP ranges. It then identifies the start and end IP number for each range and uses the ipManager from the Advanced Ban module to add the range to the ban list.
To quickly build this, I removed the form validation function when creating the new form. Instead, I added some of the validation functionality to the loop that processes each individual IP range.
I'm happy to share my code if anyone is interested.
Active
1.7
Code