• Resolved lickthespoon

    (@lickthespoon)


    Hello,
    I have a problem that is confusing me.
    I use Cloudways as a hosting platform. Suddenly yesterday my website disappeared and refused to connect with ERR_CONNECTION_REFUSED 127.0.01
    My host says “It happens when your WordPress site does not read the real Ip of the visitor and get the local host IP every time.”

    I guess what confuses me is I haven’t updated anything recently – I tend to leave things stable at busy selling times. So what could change to cause this?
    Could it be some host server update?
    Currently I have the plugin disabled with the directory renamed, but I would like to reenable it.
    I have a separate virus scan plugin and I can see that it thinks the current logged in user IP is also 127.0.0.1
    I have raised this question with my host as well but thought it might be a well known problem?
    Thank you,
    Matthew

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, please to go WP Security -> Settings -> Advanced Settings and play around with the different options from the drop down menu.

    Let me know how you go.

    Regards

    Thread Starter lickthespoon

    (@lickthespoon)

    Hello thank you for your reply. That isn’t possible as as soon as I enable the plugin I get blocked out. I know you have a reset plugin option which I guess I would need to use first.
    But my point is that I haven’t changed anything and the plugin has worked for many months. So something else must have changed to identify the IP as local host?

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, have you whitelisted your IP address?

    Thread Starter lickthespoon

    (@lickthespoon)

    Hello,
    I seem to have cured it with the help of my webhost…
    ———
    Hi,

    For localhost IP please add the following lines in wp-config.php file after the php tags.

    if(isset($_SERVER[‘HTTP_X_FORWARDED_FOR’])) {
    $xffaddrs = explode(‘,’,$_SERVER[‘HTTP_X_FORWARDED_FOR’]);
    $_SERVER[‘REMOTE_ADDR’] = $xffaddrs[0];
    }

    Please check and let us know if you need any assistance from our side, we will be glad to assist you.
    —-
    i’ll do more testing as i’m not sure why this is needed.
    Thank you,
    Matthew

    Thread Starter lickthespoon

    (@lickthespoon)

    Adding that code has resolved my problem and wp total security is back up and running.
    I’m pretty sure I added it before but it wasn’t in my wp-confong.php file, so i’m not sure if on automatic site upgrades it could get removed.
    Either way this information might help someone experiencing the same issues with Cloudways hosting.
    I would add Cloudways were extremely fast helping me to resolve once I flagged the problem. I was able to get assistance at 9pm on a Saturday night.
    Thank you for your help too,
    Matthew

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Hi Matthew,
    Instead of adding that code to your wp-config.php file you could have alternatively configured the settings for this plugin in the Settings >> Advanced Settings page by selecting the “HTTP_X_FORWARDED_FOR” from the dropdown box.

    Thread Starter lickthespoon

    (@lickthespoon)

    Ah Brilliant! Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WordPress site identifies IP as local host and refuses connection’ is closed to new replies.