News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

All Members Have The Same IP

Started by robmob, March 02, 2014, 09:40:49 PM

Previous topic - Next topic

robmob

Hello I have been trying to solve this problem with no success. I have done research and found other people having the same problem. I have contacted my host and asked them if they were using a reverse proxy and they endured me they were not. They tried to find what might be causing the problem but had no luck. My site is not on cloudflare and I checked the dns and it points to my hosting company.

The IP's are all showing my server IP for every member and it is showing my hosting company as the host name.

I checked the database and in the IP1 slot it shows the server ip but in the IP2 slot it shows the members real ip

can someone please help me.

TheKnown

what mods do you have installed?
any errors in error log for both smf or your site?
what php version etc do you have?

robmob

It was doing this before I had the mods installed but I have ezportal, profile comments and captcha plugin installed.

no errors in the error log

my php settings can be seen here http://server60.hosting24.com/phpinfo.php

Lou69

Are you using SiteLock or something of that nature?  Also, did this happen on a fresh install or is this an existing site that has had mods installed and uninstalled on it?


robmob

Not using sitelock but I did just convert over from using the newest version of MYBB to smf using the converter.

margarett

Try to disable hostname lookups, maybe?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

robmob

Quote from: margarett on March 03, 2014, 08:01:59 AM
Try to disable hostname lookups, maybe?

how would I go about doing that?

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

robmob

Quote from: margarett on March 03, 2014, 10:37:10 AM
ACP --> Server Settings

OK thanks I have tried disabling it and it still shows the main server IP for all members.

Illori

#9
try this... was suggested by a former team member

Quote
In Sources/QueryString.php, find this code:


// Make sure we have a valid REMOTE_ADDR.

Before it, add:

if (isset($_SERVER['HTTP_IV_REMOTE_ADDRESS']))
{
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_IV_REMOTE_ADDRESS'];
unset ($_SERVER['HTTP_X_FORWARDED_FOR']);
}


This should make it always use the supplied IP address and not what PHP normally receives. It also forcibly drops the X-Forwarded-For header just in case it was supplied for whatever reason. (In this case from the supplied documentation it looks like we shouldn't be using it even if supplied)


robmob

Quote from: Illori on March 03, 2014, 12:24:33 PM
try this... was suggested by a former team member

Quote
In Sources/QueryString.php, find this code:


// Make sure we have a valid REMOTE_ADDR.

Before it, add:
[/code]
   if (isset($_SERVER['HTTP_IV_REMOTE_ADDRESS']))
   {
      $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_IV_REMOTE_ADDRESS'];
      unset ($_SERVER['HTTP_X_FORWARDED_FOR']);
   }
[/code]

This should make it always use the supplied IP address and not what PHP normally receives. It also forcibly drops the X-Forwarded-For header just in case it was supplied for whatever reason. (In this case from the supplied documentation it looks like we shouldn't be using it even if supplied)


Thanks I have just tried this and it is still showing the server ip for all the members.

robmob

it is still storing the correct ip in the database under member_ip2 but its pulling the server ip from member_ip

TheKnown

may I ask how many mods exactly you have installed? this will lead to another question please do not worry

robmob

As I stated before I have 3 mods installed but this problem occurred before i installed the mods.

TheKnown

sorry I did look must have missed that i do remember you saying it started before the mods, what I am thinking it could be issue in the conversion, the long shot method that may work is uninstall your mods, download the large upgrade package and upload the files overwriting the old ones, also remove upgrade.php, then re-install your mods. what this will do is make sure its not the actual files. remember to backup before you start.

robmob

OK I have tried what you said as well as a fresh install using a new database and it still shows the server ip??? This is a big problem and I do not want to go back to mybb it was never a problem using it.

shadow82x

And you aren't using a CDN service like cloudflare?
Colin B
Former Spammer, Customize, & Support Team Member

robmob

Quote from: mcblaber on March 03, 2014, 07:43:38 PM
And you aren't using a CDN service like cloudflare?

No I ran several DNS checks to ensure the site was not on cloudflare and its using the hosts nameservers.

robmob


Lou69

For clarity sakes, a few questions. What version of MyBB did you convert from and did you convert to SMF 2.0.6 or 2.0.7? Do you know the versions of the from and to MySQL database?

You mentioned others are experiencing the same issue, I did take a gander in the Converting to SMF board

http://www.simplemachines.org/community/index.php?board=11.0

but I did not see any mention of the same issue. However, I may have been searching with the wrong terms.

Advertisement: