1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DNS changed for domain, now all users have server IP

Discussion in 'Server Configuration and Hosting' started by dutchbb, Nov 17, 2015.

  1. dutchbb

    dutchbb Well-Known Member

    Our host changed our DNS, it seemed to be ok, now I noticed all users and new registrations have the server IP. Any ideas why this might happen?

    Also there are no guests shown, while there should be hundreds.

    Schermafbeelding 2015-11-17 om 19.48.37.png
    Schermafbeelding 2015-11-17 om 19.50.08.png
  2. Slavik

    Slavik XenForo Moderator Staff Member

    Reverse proxy added without Forwarded IP's
    dutchbb and Tracy Perry like this.
  3. dutchbb

    dutchbb Well-Known Member

    Hosting said it's because of the fact that we are running nginx/varnish ?? They said they can't do big changes in that regard. They said they will look at it.

    Everything worked perfectly when we first moved to this VPS, then DNS change and this happened. Thanks for the answer Slavik, but what exactly can I do to fix this, I have no experience in this matter. I have access to WHM and cPanel. Any help is greatly appreciated.
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. dutchbb

    dutchbb Well-Known Member

    Ok thanks. I tried adding the code to the config file, didn't have an effect.

    Our host also tried adding this:

    also no effect.

    BTW FYI we have installed nginx with the module realip with these settings:

    real_ip_header X-Forwarded-For;
    real_ip_recursive on;

    Any suggestions?
    Last edited: Nov 18, 2015
  6. RoldanLT

    RoldanLT Well-Known Member

    That will only work if you use Cloudflare.
  7. dutchbb

    dutchbb Well-Known Member

    Still having this issue, should I open a ticket? Or can I try something else?
  8. Tracy Perry

    Tracy Perry Well-Known Member

  9. Tower

    Tower Active Member

    Do they not support NGINX/Varnish? Is this fully managed?
  10. dutchbb

    dutchbb Well-Known Member

    Thanks, I've send these to my host. Hopefully this will work.

    Yes and yes including SLA. They say it is setup correctly but are still looking for the problem.
  11. AndyB

    AndyB Well-Known Member

    Try adding this to your config.php

    if (isset($_SERVER['HTTP_X_REAL_IP']))
    eva2000 and dutchbb like this.
  12. dutchbb

    dutchbb Well-Known Member

    This seems to have solved it! Definitely one for the FAQ @Brogan . Thanks a lot AndyB.
    Tracy Perry and AndyB like this.
  13. Brogan

    Brogan XenForo Moderator Staff Member

    The FAQ already states that the code is server specific and you need to check phpinfo for the correct variable.
  14. stricq

    stricq New Member

    The remote ip and port are in the HTTP_X_FORWARDED_FOR header, but they are together in the ip:port format. I do not know PHP. How do I split them apart and set both REMOTE_ADDR and REMOTE_PORT?

Share This Page