• Resolved ibdb

    (@ibdb)


    I inherited maintenance of a site that was not well maintained. As a result, it was hacked, and I got the call to clean it up. I’m being particularly aggressive about blocking malicious and suspicious IPs. Is there a way to list the IPs that have been blocked on the WordfenceBlockedIPs page so that I can sort them by IP to find ranges that are repeat offenders and add them to the WordfenceRangeBlocking list, or even to a .htaccess file?

    I know I could do it manually, but with 300+ IPs currently blocked and counting, I’d like to find an easier way.

    https://wordpress.org/plugins/wordfence/

Viewing 1 replies (of 1 total)
  • wfalaa

    (@wfalaa)

    Hi,
    Sorry for the delay, just in case you still want to do that in an easier way, check this out:
    – Using phpMyAdmin -for example- back-up your database.
    – Then select your database and run this MySQL query:
    SELECT INET6_NTOA(IP) FROM wp_wfBlocks ;
    – This should list all blocked IP addresses you have.
    – If you want to get this IPs list exported in a .csv file, then you can run this query:

    SELECT INET6_NTOA(IP) FROM wp_wfBlocks
    INTO OUTFILE '/writable_directory_by_mysql/blocked_IPs.csv'
    LINES TERMINATED BY '\n';

    – Make sure to create a writable directory on your server for mysql to be able to write the exported file via the query above, most probably you will need to have mysql as the owner of this directory.

    Check this link for a reference.

    Let me know if you have any further question,
    Thanks.

Viewing 1 replies (of 1 total)

The topic ‘Listing Wordfence Blocked IPs’ is closed to new replies.