• Resolved onlygators

    (@onlygators)


    After installing JetPack – which is great in almost every way – all of the IP addresses on my comments are now showing up as 127.0.0.1 instead of the full, accurate IPs that used to show up.

    (a) How can I fix this? (b) If I cannot fix it, which feature of JetPack is causing this? I will simply disable it and go from there.

    Thanks in advance for your help. There is no search function I could find for this forum or else I would’ve done that rather than simply making a new post and asking.

    https://www.ads-software.com/extend/plugins/jetpack/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Jetpack does not edit the content or the details of your comments, so the issue could be linked to another plugin of yours.

    Could you try to deactivate all other Comment / Anti-Spam / Security plugins on your site, and try to leave a new comment?

    if that doesn’t help, could you post your site URL here, as well as a list of all your active plugins?

    Thanks!

    Thread Starter onlygators

    (@onlygators)

    Tried deactivating all of those other plugins and nothing changed. The IP thing changed after JetPack was added and it is not only for new comments but it erased (or is hiding) the IPs for every previous comment, too.

    (Ones I tried disabling include: Akismet, Captcha)

    https://www.onlygators.com is the site

    Active plugins:

    Akismet, All in One SEO Pack, Captcha, Countdown Timer, Flash Video Player, Google Analyticator, Google XML Sitemaps, Jetpack, JSON API, NexGen Gallery, NexGen Gallery Optimizer, Official StatCounter Plugin, Page Links To, Sharebar, Text Expander, TS Custom Widgets, Varnish HTTP Purge, WP-Polls, WPaudio, WPtouch

    THANKS!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I noticed that you use Varnish on your site. It might be what’s causing the issue.

    Could you try the fix suggested in this post, and let me know if that helps?
    https://blog.rallat.com/post/9929675708/fix-wordpress-comments-ips-using-varnish

    Thread Starter onlygators

    (@onlygators)

    Instead of trying to edit it, which I am a novice at, I simply deactivated that plugin and it did not help. I had been using that before JetPress was ever installed, BTW, just to clear that up.

    As a side note, I’ve also tried deactivating JetPress to see if that would fix the issue, and it doesn’t. So I’m really not sure what happened here.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Disabling the Varnish HTTP Purge plugin won’t help here, since the changes recommended in the post above have to be made to your Varnish config.

    If you’re not comfortable editing Varnish config files, I would suggest asking your hosting provider about it; they might be able to help.

    Thread Starter onlygators

    (@onlygators)

    This has been solved.

    The problem was indeed with Varnish. This is what my support told me in this regard (for your future reference):

    “The problem was within the Apache configuration for Varnish.”

    Thank you again for all your help. Great plugin here and I look forward to using it without any more hiccups!

    I have been struggling with this problem for quite some time until today I found this post:

    https://ocaoimh.ie/2011/08/09/speed-up-wordpress-with-apache-and-varnish/

    The solution proposed does not imply hacking the code:

    Create a file called, for instance, /usr/share/php/real-ip.php with the following contents:

    <?php
    if ( isset( $_SERVER[ "HTTP_X_FORWARDED_FOR" ] ) ) {
            $_SERVER[ 'REMOTE_ADDR' ] = $_SERVER[ "HTTP_X_FORWARDED_FOR" ];
    }
    ?>

    Then add it to your php.ini file, search for:
    auto_prepend_file =
    And replace with:
    auto_prepend_file = /usr/share/php/real-ip.php

    It worked like a charm for me!

    @estepix Thanks for the alternative solution. It is an interesting way to integrate at the server level, instead of doing for each site in a server.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Comment IP addresses all show up as 127.0.0.1’ is closed to new replies.