• Resolved gecko_guy

    (@gecko_guy)


    Hi there,

    Been testing this for a few days now..

    It seems to log most events, but the filtering of these is inconsistent.

    For example, selecting “Yesterday” doesn’t change what I’m seeing. I still just see today (until I page forward using the navigation arrows).

    Also, show all users, show all contexts, show all.. anything, no change.

    Additionally, if I exclude all Admins, then an event is still logged, but shows up with no information.

    Next, filter by today. I get 4 events on page one, on page 2 I get 1 event but it is blank (no details) but still has date of today.

    If I have applied filters, then try paging, the filters clearly have no effect. Just pages through all captured events.

    ..ok, then on page 3 some stuff that seems to be correct (but I have had to paginate since the filters have no effect).

    Next thing. The Screen Options are empty.

    Next thing. The IP address associated with all captured events is the server IP address, which is not really much use.

    hmm, not sure about this plugin now. If I can’t filter, and if the login detection is unable to see the IP address of the user, and the pagination re dates is inconsistent..

    https://www.ads-software.com/plugins/stream/

Viewing 6 replies - 1 through 6 (of 6 total)
  • maelga

    (@maelga)

    I have also noticed the same IP address recorded for all user.
    In my case I use cloudflare, and the IP recorded is that of cloudflare for all users.
    Is there a way to get users’s real IP instead?

    Luke Carbis

    (@lukecarbis)

    Hi gecko_guy,

    We’ve fixed most of those issues in 3.0.4. I’m curious about the time issue though. Could you report back with your personal timezone, as well as the timezone of the site your testing?

    I can’t replicate the IP address issue. We’re using PHP’s built in “$_SERVER[‘REMOTE_ADDR’];”. Are you using CloudFlare like Maelga?

    I’ve created an issue in our Github repo to try to deal with this. You can track progress here: https://github.com/xwp/stream/issues/803

    Thread Starter gecko_guy

    (@gecko_guy)

    Hi Luke,

    Ok, I have opened the ticket again for further discussion..

    You can close it again if you like, and after my initial further comments below, I will swan over to Github and continue chatting there.

    My timezone is GMT, and I can confirm that my time and locale settings are correct across the board (server, wp, local machines). I’m very aware of the potential for things going fubar when time settings are incorrect so this is something I pay attention to by default.

    I had actually uninstalled Stream in the interim because it appeared to be behaving a bit strangely, however I have now installed it again with the newest update, and will monitor things..

    In the meantime, I had also been looking deeper into the IP address problem anyway, because it has been bugging me.

    Although I’m not using Cloudflare for this server, I am using both Nginx and Varnish as chained reverse proxies, and the incorrect IP addressing is most certainly related to this.

    It relates to the X Forward headers, and I had to wait for this weekend to try a few fixes because they will probably result in some server downtime.

    So that’s it on my end for the moment. As mentioned I will head on over to Github for further conversation once I have some more detail for you.

    Thanks

    Guy

    maelga

    (@maelga)

    Hi Luke,

    Regarding the IP address issue with CloudFlare, I have just learnt that CloudFlare has a plugin to specifically deal with this:

    The main purpose of this plugin is to ensure you have no change to your originating IPs when using CloudFlare. Since CloudFlare acts a reverse proxy, connecting IPs now come from CloudFlare’s range. This plugin will ensure you can continue to see the originating IP.

    https://www.ads-software.com/plugins/cloudflare/

    Just tested with Stream. Issue resolved.

    Thread Starter gecko_guy

    (@gecko_guy)

    Hi Luke,

    Ok, I know I said I would take this over to Github, but actually since the thread contains a fair amount of information regarding proxy caching, and other people may find the discussion useful, I thought I would just finish up my commentary here.

    @maelga kind of jumped in there with an issue specifically related to Cloudflare (no problem, but actually off-topic).

    The particular issue I have been dealing with has nothing to do with Cloudflare, although the backend symptom is similar, in that proxy caches use the last address from which the request was forwarded, and this results in the Stream reporting all activities from the server IP address rather than the true origin.

    In terms of Cloudflare, it does also use proxy caching so it is similar in that the incorrect IP addresses are being picked up because the origin headers are not being forwarded without further configuration of the server directly (or the server via php).

    There is a ton of information, and plugins available to forward the headers for Cloudflare. One would also hope that being Cloudflare it will be much more difficult to spoof the X Forward headers.

    Moving away from Cloudflare now, since it doesn’t have any relation to my own situation. I also tested Stream on another server which only uses Nginx as the frontend reverse proxy, and it seems to work natively without any issue.

    The problem I encountered seems to be specific to using Varnish as a reverse proxy, although it might be that it is a combination of the chained reverse proxy which is using both Nginx and Varnish as the proxy cache. I have not had time to test it using Varnish only.

    In particular, the host server I have been working on uses a cPanel plugin called Apachebooster. This could become a discussion specifically about that, but let’s not go there as this is probably quite an edge case..

    Here is a link to some insightful information if it is of interest though:

    https://www.cpanelkb.net/apachebooster-cpanel-plugin/

    The real cause seems to be that when using Nginx + Varnish in a chain, even if one sets the X Forwarded For headers in WordPress, then the last address in the chain is the one that gets forwarded.

    At this point it gets tricky, because in my “special” case I am using this cPanel plugin, and I solved it by using an apache module called mod_reverse_proxy, which is actually a fork of mod_remoteip, and it uses part of the Apache mod_cloudflare module.

    So to bring this back to point, I have a strong feeling that if I was only using Varnish, then the problem would have been solved by using the native Apache mod_remoteip.

    That’s it from my side for now, I think. I have solved the problem, and it was really quite a weird case.

    I should make a couple of last important points though. Mainly, that incorrectly setting X Forwarded For headers can actually be a major security risk, so it is very important to set up trusted IP addresses (meaning your server IP address(es) in the Apache/Nginx/Varnish configuration files, that will used for the forwarding headers.

    If anyone else just happens to be using this Apachebooster cPanel plugin, then you cannot use the custom “mod_reverse_proxy” module at the same time as the more traditional “mod_remoteip” module. It will crash your server.

    Finally, you also cannot set “HTTP_X_FORWARDED_FOR” headers in your WP config in combination with either of these modules. This won’t break anything, but it simply won’t work.

    Thread Starter gecko_guy

    (@gecko_guy)

    p.s, just in case anyone reads this looking for answers to similar issues, please take note:

    mod_reverse_proxy

    This is specific to the cPanel plugin I mentioned above.

    Do not try to use it in any other situation. It was made specifically for that cPanel plugin (nothing to do with WordPress or anything else. cPanel only).

    Also, I should clarify, that if you do happen to be on the same edge case as this (Apachebooster), then once the config is correctly set up, yes, it works.

    However, adding “HTTP_X_FORWARDED_FOR” in the wp config in combination with “mod_reverse_proxy” will specifically revert to the incorrect IP addressing.

    Last word (hopefully), I also do not recommend the use of the ApacheBooster cPanel plugin. It is really not a very nice thing (although it does work quite well if you know what you are doing).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Inconsistent display of events, and IP address belongs to server’ is closed to new replies.