Hi @18tommyboy, thanks for your question.
Wordfence doesn’t currently have the inbuilt ability to import IP addresses to the blocklist. This is because Wordfence references extensive IP blocklists that our team check and maintain so that our customers don’t need to employ a similar time-consuming strategy themselves. IPs that may appear appropriate for blocking won’t necessarily be that way forever.
I will say that 5000 is a lot of IPs to block manually and can in some cases decrease performance, so I’d first recommend checking if any of those are in wider ranges that can be blocked instead.
If you do wish to import them yourself, the IP addresses are stored in?IPv4-mapped IPv6 format. Within MySQL, you can get the right format using?inet6_aton()
?like:?inet6_aton('::ffff:127.0.0.1')
. The?::ffff:
?is what allows IPv4 addresses to be stored in the same table as IPv6 addresses.
You can also read IPs back from the table using a query like?SELECT inet6_ntoa(ip) FROM wp_wfblocks7 WHERE...
?to confirm that an import worked. However, as we can’t support all custom actions and scripts people may wish to perform on WordPress/Wordfence, remember to take a backup of your site and tables beforehand in case something goes wrong.
Thanks,
Peter.