DNS changed for domain, now all users have server IP

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.webp
Schermafbeelding 2015-11-17 om 19.50.08.webp
 
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.
 
Ok thanks. I tried adding the code to the config file, didn't have an effect.

Our host also tried adding this:

Code:
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }

also no effect.


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

set_real_ip_from 127.0.0.1;
set_real_ip_from 89.30.162.166;
set_real_ip_from 10.0.0.38;
real_ip_header X-Forwarded-For;
real_ip_recursive on;

Any suggestions?
 
Last edited:
Our host also tried adding this:

Code:
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
also no effect.
That will only work if you use Cloudflare.
 
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.
Do they not support NGINX/Varnish? Is this fully managed?
 
Thanks, I've send these to my host. Hopefully this will work.

Do they not support NGINX/Varnish? Is this fully managed?
Yes and yes including SLA. They say it is setup correctly but are still looking for the problem.
 
The FAQ already states that the code is server specific and you need to check phpinfo for the correct variable.
Note that the exact code depends on server configuration. You can confirm whether the variable being used for the correct IP address is'HTTP_X_FORWARDED_FOR' by navigating to admin.php?tools/phpinfo when logged in to the XenForo ACP.
 
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?
 
Back
Top Bottom