• Resolved itsanewday

    (@itsanewday)


    Hello,
    I have a hosting account with static IP. When I try to connect two domains hosted under the same account using WP Remote Users Sync the test fails. This is because the IP address that comes up from the test is incorrect.

    The last three digits of my IP address is .141
    The last three digits of the address shown by this plugin is different and shows as .138

    I have contacted the web host and they confirm my IP address as *.141. This is also confirmed by checking the websites at https://www.whatsmydns.net

    Is there any way to fix this error and get WP Remote Users Sync to accept the correct domain IP address?

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alexandre Froger

    (@frogerme)

    Hello @itsanewday !

    The IP address shown in the logs is the one to use, regardless of what the hosting company says. This is the IP address the remote website sees the incoming site has at the time the requests are received.

    In theory, a server X has an IP address that identifies it to any destination.
    In practice, when the server X sends a request on the network, it goes through multiple networking infrastructure devices before reaching its destination, and some of these devices are proxies ; proxies will mask the incoming IP address if they are encountered on the way, and change the REMOTE_ADDR environment variable, and the destination will not be able to see server X’s IP address. So, even if this is the most reliable variable to determine the incoming IP, it may not be the one of the source itself.

    One could imagine relying on HTTP_X_FORWARDED_FOR environment variable would be a solution: that variable would contain the IP of server X in theory, and would seem more reliable. That would be wrong: HTTP_X_FORWARDED_FOR is easy to spoof, and would introduce a big security risk.

    It seems in your case the communication between the 2 servers goes through a proxy at some point, and it’s fine, you can use that IP – as indicated in the FAQ:

    IP verification – IP addresses are verified using the REMOTE_ADDR server environment variable, which cannot be faked (unless the servers or the network infrastructure are already highly compromised, in which case there are bigger issues to worry about).

    • This reply was modified 4 years, 4 months ago by Alexandre Froger.
    • This reply was modified 4 years, 4 months ago by Alexandre Froger.
    • This reply was modified 4 years, 4 months ago by Alexandre Froger. Reason: typos and clarifying some points
    Plugin Author Alexandre Froger

    (@frogerme)

    And by the way: thank you for the review! I greatly appreciate you took the time to write one before I even replied to this topic!

    Thread Starter itsanewday

    (@itsanewday)

    Hello @frogerme,

    Thank you for the info. I followed your advice about the IP addresses between the two test sites I’m working on and everything works!

    Your assistance is much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Test Showing Wrong IP Address’ is closed to new replies.