Topic: Users cant register due to having same ip

There is another big problem this is causing, some people reported that they can't register to forums cuz they receive message like

"A new user was registered with the same IP address as you within the last hour."

They receive this message because all the guests coming to my website have the same ip address "199.229.250.24"  which is the ip address of the server and the nameserver (both ns1, ns2).

I already emailed the host to give me one more ip as ns2, i believe this might be the issue with all this, but they said it will take time as they have other problems they want to fix.

I wanted to know if there is a way to solve this, how come counters like google analytics show the correct number of people/ip's while the punbb does not.

Meanwhile if there is a way for punbb to ignore this ip rule while registering.

MyFootballCafe.com  is Now Online!

Re: Users cant register due to having same ip

BUMP!

Geez, no one?

The host keep insisting that the problem is not about having one nameserver ip in both ns1, ns2.

I tried installing a new untouched punbb forum as a test, it had the same problem, everyone had the same ip as the server/nameserver ip.

I have this tool in my cPanel, called "Simple DNS Zone Editor". I have no idea how to use it, may be it can be a solution to this problem. here is the picture.

http://i49.tinypic.com/2rfwmt5.png

Anyone know if this tool can help in this.

Also i heard of this website, http://www.cloudflare.com
Can that help me maybe.

MyFootballCafe.com  is Now Online!

3 (edited by SuperMAG 2012-11-12 09:40)

Re: Users cant register due to having same ip

Some guy from phpbb had the same problem with his forum as mine.
https://www.phpbb.com/community/viewtop … ;t=2133487

They gave him a workaround, look at this:

One workaround would be to make this edit:

Open: /includes/startup.php

Find:

if (!defined('IN_PHPBB'))
{
   exit;
}

After, add:

if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR'])
{
     $_SERVER['REMOTE_ADDR'] = htmlspecialchars((string) $_SERVER['HTTP_X_FORWARDED_FOR']);
}

Can i use this in my forum, and how?

MyFootballCafe.com  is Now Online!

Re: Users cant register due to having same ip

Bump! hmm

MyFootballCafe.com  is Now Online!

Re: Users cant register due to having same ip

if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR'])
{
     $_SERVER['REMOTE_ADDR'] = htmlspecialchars((string) $_SERVER['HTTP_X_FORWARDED_FOR']);
}

where can i try to put this code.

MyFootballCafe.com  is Now Online!

Re: Users cant register due to having same ip

Bump!

Getting problems almost everyday, today again a  bot was banned by akemist with his ip (server ip), so everyone going into the site was banned including me, i had to modify db again. done this like 6 times past week.

Can anyone help me on this, that phpbb guy found a few lines of solution, where can i put these lines in punbb?

if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR'])
{
     $_SERVER['REMOTE_ADDR'] = htmlspecialchars((string) $_SERVER['HTTP_X_FORWARDED_FOR']);
}
MyFootballCafe.com  is Now Online!

7 (edited by SuperMAG 2012-11-27 15:11)

Re: Users cant register due to having same ip

I might have found the cause of this problem, i think its related to the host being on reverse proxy (what ever that means).

In functions.php its here on line 1138:

// Try to determine the correct remote IP-address
function get_remote_address()
{
    $return = ($hook = get_hook('fn_get_remote_address_start')) ? eval($hook) : null;
    if ($return != null)
        return $return;

    return $_SERVER['REMOTE_ADDR'];
}

I searched about this in fluxbb, i got to this topic:

http://fluxbb.org/forums/viewtopic.php?id=6166
http://fluxbb.org/forums/viewtopic.php?id=1049 (this one was by me long time ago lol)

In fluxbb 1.4 version, they have this constant:
http://fluxbb.org/docs/v1.4/constants#f … erse_proxy

Is that constant also avaliable in 1.4 version. If not why exactly i need to replace in that code.

MyFootballCafe.com  is Now Online!

Re: Users cant register due to having same ip

After alot of discussion and testing with a coder i found in the host chat. we couldnt find good solution.

we tried to change return $_SERVER['REMOTE_ADDR']; into the "x forward for" and it works, as the ip becomes correct ones, but once someone visits the site, the server load becomes very high.

MyFootballCafe.com  is Now Online!

9 (edited by dimkalinux 2012-11-29 12:12)

Re: Users cant register due to having same ip

On your server is used Nginx as reverse proxy?

If you use Nginx + Apache your hoster must install and configure http://www.stderr.net/apache/rpaf/

Anyway its problem related to webserver configuration.