Why does all my users have 127.0.0.1 seen last Ip addres


(Admir Hodzic) #1

I am running discource on standard install.
I did install that long time ago.
Now I am on 1.8.0.beta13 version.
I do have couple of standard plugins installed

  1. abbreviations 0.0.3
  2. Robot Share Dugme 0.1
  3. Canned Replies 1.1
  4. discourse-details 0.4
  5. discourse-narrative-bot 0.0.1
  6. discourse-nginx-performance-report 0.1
  7. discourse-plugin-checklist 0.3.1
  8. discourse-solved 0.1
  9. docker_manager 0.1
  10. lazyYT 1.0.1
  11. poll 0.9 Y

We do use internal SSO.
Our forum is at private IP address.

I do not why for every single user Disrouce reports get last seen IP address 127.0.0.1

Sinice I am mostly DBA man I did dig thorough db (select only) and fund that Discourse lost sense of IP addresses sometime in 2015 year

Is this case and for other installs or I did breake sometihng ?


(Admir Hodzic) #2

Does this has relation with screened ip addresses settings inside logs.
Does whitelist ip stop looking at IP addres and seeing it as host address


(Felix Freiberger) #3

Are you running Discourse behind a reverse proxy like Nginx?


(Admir Hodzic) #4

Realy do not know I did install it fdolowin instucion.
I know that I have docker and to keep it updated whitout any modifications
How I can check my Nginx config ?


(Felix Freiberger) #5

Which instructions did you follow, exactly? Did you deviate from them in any way, in addition to installing the plugins you mentioned?


(Admir Hodzic) #6

We installed discource at april 2014 that was 3 yeas ago.
I realy do not rember all details.
We did asked help by @pl3bs whic offers this


(Felix Freiberger) #7

Time for some trial and error: Are there files in /etc/nginx/sites-available? If so, can you post them here? (Make sure there are no secrets in there, although that isn’t very likely.)


(Admir Hodzic) #8

I do not have nginx folder in etc
All nginx i have is:

admir@forum:/$ sudo find / -xdev 2>/dev/null -name "nginx"
/var/lib/docker/aufs/diff/991d80f2b0ac29b6be4e4055a37fe09ef342fe600a7ed34e54f749b240b8811b/etc/service/nginx
/var/lib/docker/aufs/diff/8a27201326928624c480ddeae2f0d22cc82764da36ff1570068a8a8aa8c9fa8e/var/nginx
/var/lib/docker/aufs/diff/8a27201326928624c480ddeae2f0d22cc82764da36ff1570068a8a8aa8c9fa8e/var/lib/nginx
/var/lib/docker/aufs/diff/8a27201326928624c480ddeae2f0d22cc82764da36ff1570068a8a8aa8c9fa8e/etc/service/nginx
/var/lib/docker/aufs/diff/8a27201326928624c480ddeae2f0d22cc82764da36ff1570068a8a8aa8c9fa8e/etc/nginx
/var/lib/docker/aufs/diff/fafadb66c2632a89671effba9dcf0470dae5ace28441646c4b33df96eff95f6c/var/nginx
/var/lib/docker/aufs/diff/fafadb66c2632a89671effba9dcf0470dae5ace28441646c4b33df96eff95f6c/etc/service/nginx
/var/lib/docker/aufs/diff/fafadb66c2632a89671effba9dcf0470dae5ace28441646c4b33df96eff95f6c/etc/nginx
/var/lib/docker/aufs/diff/fafadb66c2632a89671effba9dcf0470dae5ace28441646c4b33df96eff95f6c/etc/logrotate.d/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/var/lib/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/var/log/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/etc/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/etc/default/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/etc/init.d/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/etc/ufw/applications.d/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/etc/monit/conf-available/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/etc/logrotate.d/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/usr/share/nginx
/var/lib/docker/aufs/diff/5a3c6ff68cbbcf97a93f8960ed02e216f209ccd701a39f5a92eb81a5b8042bc3/usr/sbin/nginx
/var/lib/docker/aufs/diff/17293d1233233ff3572605fa2fd9a76cbaeb58eb9b2257ef3d41fba0f43c45ff/var/nginx
/var/lib/docker/aufs/diff/17293d1233233ff3572605fa2fd9a76cbaeb58eb9b2257ef3d41fba0f43c45ff/etc/service/nginx
/var/lib/docker/aufs/diff/17293d1233233ff3572605fa2fd9a76cbaeb58eb9b2257ef3d41fba0f43c45ff/etc/nginx
/var/lib/docker/aufs/diff/17293d1233233ff3572605fa2fd9a76cbaeb58eb9b2257ef3d41fba0f43c45ff/etc/logrotate.d/nginx
/var/discourse/shared/standalone/log/var-log/nginx

(Felix Freiberger) #9

In that case, I’m out of spontaneous ideas, maybe someone else can pick this up?


(Admir Hodzic) #10

Tahnk a lot on trying


(Matt Palmer) #11

The underlying problem is that somewhere in the chain of proxies that starts at your user and ends in the Discourse web application, one of them is (mis)configured in such a way that it doesn’t respect the HTTP request header which indicates that the request is being proxied for a different IP address. Given that the IP address you’re seeing is 127.0.0.1, the most likely culprit is something on the machine that serves Discourse, but that’s not 100% guaranteed.

Given that this was working at some point, but now isn’t, whatever change you made in May 2015 is pretty much guaranteed to be the problem. I don’t envy you the task of remembering (or reconstructing) whatever was done in your infrastructure two years ago, but (a) this is why configuration management is your friend, and (b) you’ll have a better chance of knowing what changed in your infrastructure than random strangers on the Internet.


((Dev11)) #12

I’ll bump as Im experiencing very same problem.

Its not user end which is misconfigured. Its PPA of Discourse which is developed badly.

Where do I know from? Becausae Ive been in the field of IT far earlier than PCs was even thought of and I know every aspeect of IT very well - and I have ability to read code.

Where is misconfiguration?


(cpradio) #13

Yeah, unfortunately, it is very much a misconfiguration. I have several installations that get the actual IP just fine. My guess is you are behind cloudflare or something similar and not getting sent the appropriate forward headers for client IP, or you are behind a proxy of some sort (or reverse proxy).

There are countless discussions here on people misconfiguring all of the above and getting help configuring them properly.


(Felix Freiberger) #14

There is nothing Discourse can do if the end user configures something or someone else to capture all traffic, strip away the source IP, and anonymously forward the rest to Discourse.
Whatever it is, there is something or someone sitting between Discourse and the public-facing port, and this is where the problem lies.


(Sam Saffron) #15

Very likely, we don’t ship a PPA so you have a completely unsupported install, which means I can not help you.

Try following the official install guide.


((Dev11)) #16

I know whats PPA and how they work, so there is no need for you to clarify this for me.
If its unsported cms, why there is a copyright notice inside footer?


(Sam Saffron) #17

This is not your private support portal, other people are reading this, and other people are very confused by your postings here.

I have no idea what you are talking about.

  1. Post screenshots
  2. Post information about how you installed Discourse and from where you installed Discourse
  3. Post information about why you thought you were installing an “official” release of Discourse

(Robert) #18

I run the discourse version v1.9.7.beta7+ which should be only few weeks old.

I am using the docker installation and the docker app is directly connected to the machines port 80/443.

Still, I see some users with ip 127.0.0.1. Related accounts have been created e.g. mid of August.


(Sumpfling) #19

I know this is quite old - but this could be another instance of