phpBB. How to remove all IP addresses from banlist

One day I needed to clear all IP addresses and subnets from the banlist, and there were about 20,000 of them, so I decided to run an SQL query.

Since it was impossible to specify a subnet mask in phpbb, but for example just 10.32.*.*, moderators indicated subnets with a hyphen, for example 10.32.0.0 – 10.63.255.255, and in this case many subnets were added to the banlist.

Using the CTRL or SHIFT key, you can select dozens of addresses with the mouse, but there is a limitation; if there are thousands of them, it will be faster to delete by executing an SQL query:

DELETE FROM phpbb_banlist WHERE ban_ip != '';

As we can see in the request, all rows are deleted from the phpbb_banlist table, except those with an empty ban_ip, since they contain email addresses, not IPs, so I did not touch them.

Leave a comment

Leave a Reply