Everyone Has Same IP

I recently migrated my site from an Ubuntu 14.04 installation with apache2 to an Ubuntu 16.04 installation with apache2 + nginx using VestaCP. Aside from a few hiccups everything seemed to be working fine until I realized no one could register on my forums because "there has already been a new registration from your ip address". I then noticed that listed under Who's Online of the forums that everyone had the same IP, the IP of my site.

The only thing I can think of is that this is a reverse proxy problem. Since I host on Linode I have reverse proxy set up through the DNS in the dashboard, and I believe nginx is also doing a reverse proxy so I can only assume there is some sort of conflict.

How do I disable the reverse proxy of nginx to (hopefully) fix the problem? Or would it be better to disable the reverse proxy in the DNS manager of my Linode?

6 Replies

I was able to resolve the issue but using a strict IP check in the forums. It was a setting that was disabled and never needed to be on before but I guess it's needed now.

The Same Issue I also faced when I migrated from Ubuntu 14.04 to 17.04. any one has the reliable solution to this so share with detailed steps. thanks

Facing such problems is not a big deal in Ubuntu..probably when we try to migrate from one version to the other, there is some installation errors or errors that occur during updating the firmware, which automatically to this condition. I'll suggest taking help from online "how tos" and tutorials just when you're going to update or install it.

When using nginx as a reverse proxy all IP Addresses in your logs will be the same as the downstream server will only see the connection from nginx. To fix this you need to make a few changes to your nginx config.

Add the following to your nginx config for the domain/site you are using.

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;

Once the code is added nginx should pass along the IP Address of the user to your downstream server via the x-forwarded-for header as long as your downstream server supports that header.

I think the code above my comment might be useful for us.I will try and share with everyone that it is working or not.

Why do you even have a reverse proxy on a single machine? Even if it caches static content it does very little to improve performance.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct