• Resolved fabio.vito83

    (@fabiovito83)


    Dear Support,

    I am experienceing an odd behaviour of the plugin. For some reasons although i configured the settings in order to block an entire country, i have noticed the following:
    1) some specific pages (2-3 category pages) of the website are not blocked while the rest of pages are
    2) sometimes the entire website becomes visible in the blocked country despite no changes were implemented in the blocking settings

    Could you please help me to troubleshoot and solve the problem?

    Thanks!

    Fabio

    • This topic was modified 2 years, 1 month ago by fabio.vito83.
    • This topic was modified 2 years, 1 month ago by fabio.vito83.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ip2location

    (@ip2location)

    Can you please enable the “Debugging Log” option in the plugin settings, then check the “debug.log” generated in the plugin folder for the details?

    Thread Starter fabio.vito83

    (@fabiovito83)

    Dear Support,

    I have implemented your suggestion and you find below the result:

    {"time":"2022-10-19 18:49:20","client_ip":"193.186.4.55","country":"US","is_proxy":"","proxy_type":"","lookup_by":"BIN","cache":false,"uri":"https:\/\/www.muranoglassitaly.com\/fr\/categorie-produit\/objets-en-verre-de-murano\/vase-de-murano\/","message":"Access is allowed.","action":"ABORTED"}
    {"time":"2022-10-19 18:49:20","client_ip":"37.160.57.65","country":"IT","is_proxy":"","proxy_type":"","lookup_by":"??","cache":true,"uri":"https:\/\/www.muranoglassitaly.com\/home\/customer\/www\/staging25.muranoglassitaly.com\/public_html\/wp-content\/fonts\/arvo\/tDbD2oWUg0MKqScQ657o_vo.woff","message":"Country is in the list.","action":"BLOCKED"}
    {"time":"2022-10-19 18:49:20","client_ip":"37.160.57.65","country":"IT","is_proxy":"","proxy_type":"","lookup_by":"??","cache":true,"uri":"https:\/\/www.muranoglassitaly.com\/home\/customer\/www\/staging25.muranoglassitaly.com\/public_html\/wp-content\/fonts\/arvo\/tDbD2oWUg0MKqScQ657o_vo.woff","message":"Access denied.","action":"ABORTED"}
    {"time":"2022-10-19 18:49:20","client_ip":"37.160.57.65","country":"IT","is_proxy":"","proxy_type":"","lookup_by":"??","cache":true,"uri":"https:\/\/www.muranoglassitaly.com\/?wc-ajax=get_customer_location","message":"Country is in the list.","action":"BLOCKED"}
    {"time":"2022-10-19 18:49:20","client_ip":"37.160.57.65","country":"IT","is_proxy":"","proxy_type":"","lookup_by":"??","cache":true,"uri":"https:\/\/www.muranoglassitaly.com\/?wc-ajax=get_customer_location","message":"Access denied.","action":"ABORTED"}

    As you can see there pages that are correctly blocked, others like the homepage and request of 18:49:20 which is not blocked, the action is aborted and the page is visible to me.

    Additionally, for some reasons i do not understand why in some cases there is a reference to staging25.

    Could you please help me to understand what’s going on.

    Thanks,

    F.

    Plugin Author ip2location

    (@ip2location)

    It seems like you are allowing visitors from the US by the log.

    You may need to check your WordPress settings to see why you are loading staging assets on your live website too.

    Thread Starter fabio.vito83

    (@fabiovito83)

    Hi,

    Thanks for your reply.

    Please note that my intention is to block IT, visitors from US are allowed. For US visitors the plugin works fine, while it does not work properly for IT. As I explained earlier there are some pages that are not properly blocked.

    Please check the last line of log:

    {“time”:”2022-10-19 18:49:20″,”client_ip”:”37.160.57.65″,”country”:”IT”,”is_proxy”:””,”proxy_type”:””,”lookup_by”:”??”,”cache”:true,”uri”:”https:\/\/www.muranoglassitaly.com\/?wc-ajax=get_customer_location”,”message”:”Access denied.”,”action”:”ABORTED”}`

    This page was supposed to be blocked instead it is aborted.

    Could you please help me to understand what is going on?

    Thanks,

    F

    Plugin Author ip2location

    (@ip2location)

    I apologized that it looks like there is a typo in the debug.log. The result should show “BLOCKED” instead of “ABORTED”. That request is actually being blocked with the return 403 error page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘country blocking not working in a consistent way’ is closed to new replies.