• Resolved Peter Smits

    (@psmits1567)


    Hi
    One of my sites reported that 127.0.0.1 was blocked (very odd)
    But I found this in my WordPress debug

    [17-Sep-2022 02:08:41 UTC] PHP Notice:  Undefined index: HTTP_HOST in /var/www/vhosts/psmits.net/httpdocs/mySite/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 2958
    [17-Sep-2022 02:08:41 UTC] PHP Notice:  Trying to access array offset on value of type bool in /var/www/vhosts/psmits.net/httpdocs/mySite/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 2968
    [17-Sep-2022 02:08:41 UTC] PHP Notice:  Trying to access array offset on value of type bool in /var/www/vhosts/psmits.net/httpdocs/mySite/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 2968

    I am using the latest version of the plugin 2.28.1

    This was found in the plugin debug log

    {"time":"2022-09-17 02:08:35","client_ip":"127.0.0.1","country":"-","is_proxy":"","proxy_type":"","lookup_by":"BIN","cache":false,"uri":":\/\/\/","message":"Country not in the list.","action":"BLOCKED"}
    {"time":"2022-09-17 02:08:35","client_ip":"127.0.0.1","country":"-","is_proxy":"","proxy_type":"","lookup_by":"BIN","cache":false,"uri":":\/\/\/","message":"Send notification email.","action":"ABORTED"}
    {"time":"2022-09-17 02:08:35","client_ip":"127.0.0.1","country":"-","is_proxy":"","proxy_type":"","lookup_by":"BIN","cache":false,"uri":":\/\/\/","message":"Redirected to: \"http:\/\/127.0.0.1\".","action":"REDIRECTED"}

    What is wrong here, the site is running on https
    I also have All in One WP security running that redirects to 127.0.0.1 when a visitor is blocked after to many attempts

    • This topic was modified 2 years, 2 months ago by Peter Smits.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Peter Smits

    (@psmits1567)

    Can you please remove the site address from the message or delete it, because it is obviously abused!!!

    Plugin Author ip2location

    (@ip2location)

    Please make sure your reverse proxy is forwarding the correct IP address to your web server or this will not be working.

    Thread Starter Peter Smits

    (@psmits1567)

    Hi,

    Thanks for your reply
    My site is hosted externally, so I cannot change its configuration.
    What about this error in your code:Undefined index: HTTP_HOST in /var/ ??
    The only thing I probably could do is add this into the .htaccess, so the site will be forced to use https
    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘IP 127.0.0.1 blocked’ is closed to new replies.