I have noticed that the last few times in which I have linked to an old post of mine from my latest post, my IP address in the Comments section is wrong (sometimes my IP address appears in the form 192.x.x.x).

Since I am not proxied or anything, why does this happen?


I assume that by comment you actually mean a trackback/pingback. Those are sent from your server and not your computer and since in this case it sent from your server to itself it probably uses the local IP for the communication. 192.X.X.X is an IP range reserved for local in LAN communication same as the 10.X.X.X range.

  • Yes, I am talking about pingbacks, which appear under the Comments section. What you say does make sense, but why is it then that when a local IP is NOT used, I get different public IPs? And I mean totally different, as if they came from different regions in the world. – user1301428 Dec 30 '13 at 16:07
  • because it is from other servers and computers? Hard to give any more intelligent answer without actually looking at your data. – Mark Kaplun Dec 30 '13 at 16:49
  • Yeah, apparently in pingbacks the possible IP is more random. When I comment I usually come out with the right IP... – user1301428 Dec 30 '13 at 17:42
  • What other data would you need to give a better answer? – user1301428 Dec 30 '13 at 23:36
  • Access to your comments section, but I don't think it will change the answer. pingback from your own site will have local IPs, pingbacks from other servers will have their IP, true comments will have the IP of the PC from which they where sent. – Mark Kaplun Dec 31 '13 at 5:07

This Might help:

If you are using a normal hosting,add following lines to wp-config.php:

 if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
   $behindproxy = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
   $_SERVER['REMOTE_ADDR'] = $behindproxy[0];

Ref: http://ispire.me/wordpress-wrong-comment-ip/, https://www.benjaminwiedmann.net/wordpress-behind-reverse-proxy-fix-wrong-ip-insert-x-forwarded-for-ip.html I havn't checked the solution personally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.