• Hi, I was adding cloudflares IP ranges to my wordfence IP whitelist. They all work really good except the last CIDR range for IPv6.

    2400:cb00::/32
    2405:8100::/32
    2405:b500::/32
    2606:4700::/32
    2803:f800::/32
    2c0f:f248::/32

    These all work fine, when converted to the standard wordfence format which is:

    2400:CB00:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]
    2405:8100:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]
    2405:B500:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]
    2606:4700:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]
    2803:F800:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]
    2C0F:F248:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]

    However the very last Cloudflare IP:

    2a06:98c0::/29

    2A06:[98C0-98C7]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]

    Is a different CIDR (/29) and requires a range in the 2nd set of numbers/letters. This range is range is correct and even lets me save, but upon examining my error logs I am seeing an error being thrown for this address.

    inet_pton(): Unrecognized address 2A06:[98C0-98C0]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]

    Error message
    E_WARNING: inet_pton(): Unrecognized address 2A06:[98C0-98C0]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]

    Stack trace
    …inet_pton called at /var/www/html/wp-content/plugins/wordfence/lib/wfUtils.php (256)
    …::inet_pton called at /var/www/html/wp-content/plugins/wordfence/lib/wfLog.php (1323)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (295)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (221)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (181)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (433)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (65)
    in wfActivityReport::outputDashboardWidget called at ? (?)
    in call_user_func called at /var/www/html/wp-admin/includes/template.php (1045)
    in do_meta_boxes called at /var/www/html/wp-admin/includes/dashboard.php (227)
    in wp_dashboard called at /var/www/html/wp-admin/index.php (136)

    I even attempted to change the 2nd set of numbers to the full range of IPs, allowing more than just cloudflare (dangerous I know), and that didn’t even fix the error. It still kept throwing the error at me. Log here:

    Error message
    E_WARNING: inet_pton(): Unrecognized address 2A06:98C0:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]

    Stack trace
    …inet_pton called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfUtils.php (256)
    …::inet_pton called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfLog.php (1323)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (295)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (221)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (181)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (433)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (65)
    in wfActivityReport::outputDashboardWidget called at ? (?)
    in call_user_func called at /var/www/html/wp-admin/includes/template.php (1045)
    in do_meta_boxes called at /var/www/html/wp-admin/includes/dashboard.php (227)
    in wp_dashboard called at /var/www/html/wp-admin/index.php (136)

    So long story short. Can you guys figure out what is going on with this IP? I know the range is correct, any response would be nice 🙂

    • This topic was modified 7 years, 7 months ago by MLG Smokers.
    • This topic was modified 7 years, 7 months ago by MLG Smokers.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi nick2bad4u,

    We are looking into this. It might be a bug. Hopefully we will get this worked out in the near future or let you know a work around.

    Thanks for the feedback and detailed information. That helps us a lot with troubleshooting.

    Hey nick2bad4u,

    Try using lowercase and see if that fixes the error for you.

    2a06:[98c0-98c7]:[0000-ffff]:[0000-ffff]:[0000-ffff]:[0000-ffff]:[0000-ffff]:[0000-ffff]

    We will get that worked out in a future release.

    Thread Starter MLG Smokers

    (@nick2bad4u)

    Hey wflandon,

    thanks for the responses and suggested fixes. I tried the fix and it seems to have worked! But I think all my IPv6 IPs are due for the lowercase treatment, because as soon as that error subsided another one jumped up from the other IP.

    Error message
    E_WARNING: inet_pton(): Unrecognized address 2C0F:F248:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]:[0000-FFFF]
    
    Stack trace
    …inet_pton called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfUtils.php (256)
    …::inet_pton called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfLog.php (1323)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (295)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (221)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (181)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (433)
    … called at /var/www/html/wp-content/plugins/wordfence/lib/
    wfActivityReport.php (65)
    in wfActivityReport::outputDashboardWidget called at ? (?)
    in call_user_func called at /var/www/html/wp-admin/includes/template.php (1045)
    in do_meta_boxes called at /var/www/html/wp-admin/includes/dashboard.php (227)
    in wp_dashboard called at /var/www/html/wp-admin/index.php (136)

    I supposed changing all my IPV6 range IPs to lowercase will fix the issue for now.

    I also want to report another issue, that I think is semi-related to another IPv6 whitelisting issue.

    I attempted to whitelist my server’s own IP “2604:a880:0:1010::e19:8001” (This is the format provided me by my host)

    Although I woke up to a notification showing that WordFence had blocked that address from the site.

    I cleared it and yet again it was blocked.

    It wasn’t until I added the full uncompressed address for my IPv6 address was it able to stay whitelisted.

    That address was “2604:a880:0:1010:0:0:e19:8001”

    So even though, 2604:a880:0:1010::e19:8001 = 2604:a880:0:1010:0:0:e19:8001, Wordfence would only take the 2nd IPv6. Even though the hits in the live activity show the first address as well.

    Is this working as intended or is “::” in Ipv6 just not supported yet by wordfence?

    Sorry if I’m unclear, feel free to ask questions I can clear stuff up.

    -Nick

    Hey Nick,

    Thanks for the info.

    2604:a880:0:1010::e19:8001 = 2604:a880:0:1010:0:0:e19:8001

    This seems to be a logic issue on our side and will be resolved in the future. We will also address the letter casing. The bug is in the system with an internal case number of FB928.

    Thread Starter MLG Smokers

    (@nick2bad4u)

    Wflandon,

    Thanks for the quick and professional responses.

    I’ll let you know if I discover any further bugs but hopefully it’s smooth sailing from here on out.

    Thanks again,

    Nick

    • This reply was modified 7 years, 7 months ago by MLG Smokers.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug report about “inet_pton(): Unrecognized address”’ is closed to new replies.