Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
0 registered members (), 77 guests, and 226 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
GregK
GregK
Tombstone, AZ
Posts: 402
Joined: June 2006
Show All Member Profiles 
Top Posters(30 Days)
isaac 22
Ruben 10
Gizmo 8
Morgan 3
Geoff 3
FREAK 2
Slaz 2
DennyP 1
Latest Photos
Test
Testing to drag photos
Comfortable Cats
Test
BSA photos
Previous Thread
Next Thread
Print Thread
Who's online #259655
03/02/17 08:06 AM
03/02/17 08:06 AM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
I'm experiencing some erratic behaviour with 'Who's Online'.

There are never more than 6 Anonymous guests and I haven't seen any spiders online since the upgrade to 7.6.0.
(The spider list is in-tact.)

Is there perhaps a setting that I've missed?


(EDIT- the spider issue could just be that I haven't been checking until now.)


Last edited by driv; 03/02/17 08:14 AM.

Using version :: 7.6.0
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
All users register from same IP #259658
03/02/17 12:54 PM
03/02/17 12:54 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
I use Sucuri's firewall.

I previously posted that all my users appeared to be originating from the same IP.

Gizmo suggested that I use this snippet in ubbthreads.php

Code
if(isset($_SERVER['HTTP_X_SUCURI_CLIENTIP']))
{
	$_SERVER["REMOTE_ADDR"] = $_SERVER['HTTP_X_SUCURI_CLIENTIP'];
} 


It worked.

However, I've just realised that since the upgrade, my users are once again appearing to regsiter from the same IP

The new snippet below is taken from ubbthreads.php

Code
} elseif(isset($_SERVER["HTTP_X_SUCURI_CLIENTIP"])) {
	$user_ip = $_SERVER["HTTP_X_SUCURI_CLIENTIP"];
}


Any suggestions?


Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259659
03/02/17 04:54 PM
03/02/17 04:54 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
One of the other ip variables is also set, load the phpinfo page in the dashboard and check which is set; till need to move your particular line up above the others (the downside to there being so many options).

Just slapped this together, give it a run and see which shows correct IP's first:
forwarded.php (Isaac found a larger list than mine)
don't use this list (it was missing HTTP_X_SUCURI_CLIENTIP anyway), use the one one in my below post, this is left here for reference
PHP Code

<?php
if(isset($_SERVER["GD_PHP_HANDLER"])) {
	echo("A ". $_SERVER["GD_PHP_HANDLER"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_AKAMAI_ORIGIN_HOP"])) {
	echo("B ". $_SERVER["HTTP_AKAMAI_ORIGIN_HOP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_SUCURI_CLIENTIP"])) {
	echo("C ". $_SERVER["HTTP_X_SUCURI_CLIENTIP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
	echo("D ". $_SERVER["HTTP_CF_CONNECTING_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_CLIENT_IP"])) {
	echo("E ". $_SERVER["HTTP_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_FASTLY_CLIENT_IP"])) {
	echo("F ". $_SERVER["HTTP_FASTLY_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_FORWARDED"])) {
	echo("G ". $_SERVER["HTTP_FORWARDED"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_FORWARDED_FOR"])) {
	echo("H ". $_SERVER["HTTP_FORWARDED_FOR"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_INCAP_CLIENT_IP"])) {
	echo("I ". $_SERVER["HTTP_INCAP_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_TRUE_CLIENT_IP"])) {
	echo("J ". $_SERVER["HTTP_TRUE_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_CLIENTIP"])) {
	echo("K ". $_SERVER["HTTP_X_CLIENTIP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_CLUSTER_CLIENT_IP"])) {
	echo("L ". $_SERVER["HTTP_X_CLUSTER_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_FORWARDED"])) {
	echo("M ". $_SERVER["HTTP_X_FORWARDED"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_IP_TRAIL"])) {
	echo("N ". $_SERVER["HTTP_X_IP_TRAIL"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_REAL_IP"])) {
	echo("O ". $_SERVER["HTTP_X_REAL_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_VARNISH"])) {
	echo("P ". $_SERVER["HTTP_X_VARNISH"] ."<br>\n");
} else {
	echo("Q ". $_SERVER["REMOTE_ADDR"] ."<br>\n");
}
?>



These are pretty standard, hence why they where first:
HTTP_FORWARDED_FOR
HTTP_X_FORWARDED_FOR

I'd love to see your results from forwarded.php, are you on a CDN? I'm on CloudFlare, and theirs is second from last (because none of the others where set during testing).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Who's online [Re: driv] #259690
03/03/17 01:42 PM
03/03/17 01:42 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
Yep, just 6 anonymous online all day, even when the time frame is extended to 5 hours!

Existing anonymous users just get bumped when new ones come on.


Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259691
03/03/17 01:51 PM
03/03/17 01:51 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
Where should forwarded.php go?

I put it in the main forum directory and it output 'N' and 109.155.22.*** (my ip).



In php info the output was...

HTTP_X_REAL_IP 109.155.22.***
HTTP_X_SUCURI_CLIENTIP 109.155.22.***



I don't use a CDN.

Last edited by driv; 03/03/17 01:59 PM. Reason: CDN

Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259692
03/03/17 04:46 PM
03/03/17 04:46 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
The list I gave you before was missing the "HTTP_X_SUCURI_CLIENTIP" line, use the below check instead, since it's what we actually use.

Cloud Hosting, or a CDN, proxy, load balancer, or server firewall all change potential superglobals, something is being populated before the HTTP_X_SUCURI_CLIENTIP global that UBB.threads is looking for.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: All users register from same IP [Re: driv] #259693
03/03/17 05:43 PM
03/03/17 05:43 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
We currently check for (in order):
$_SERVER["HTTP_FORWARDED_FOR"]
$_SERVER["HTTP_X_FORWARDED_FOR"]
$_SERVER["HTTP_X_CLUSTER_CLIENT_IP"]
$_SERVER["HTTP_X_SUCURI_CLIENTIP"]
$_SERVER["HTTP_CF_CONNECTING_IP"]
$_SERVER["REMOTE_ADDR"];

Your ($_SERVER["HTTP_X_SUCURI_CLIENTIP"]) and CF are at the bottom and should only be selected when one of the "forwarded for" lines isn't used, try JUST this bit:
Code
<?php
if(isset($_SERVER["HTTP_FORWARDED_FOR"])) {
	echo("AA: ". $_SERVER["HTTP_FORWARDED_FOR"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
	echo("AB: ". $_SERVER["HTTP_X_FORWARDED_FOR"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_CLUSTER_CLIENT_IP"])) {
	echo("AC: ". $_SERVER["HTTP_X_CLUSTER_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_SUCURI_CLIENTIP"])) {
	echo("AD: ". $_SERVER["HTTP_X_SUCURI_CLIENTIP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
	echo("AE: ". $_SERVER["HTTP_CF_CONNECTING_IP"] ."<br>\n");
} else {
	echo("AF: ". $_SERVER["REMOTE_ADDR"] ."<br>\n");
}
?>


I need the EXACT output from the server, feel free to blank out your IP, but I need to read any returned input, ESPECIALLY if it is NOT your IP address.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: All users register from same IP [Re: driv] #259694
03/03/17 06:27 PM
03/03/17 06:27 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
Of course. smile

This is the EXACT ouput...

Quote
AB: 185.93.228.10


Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259695
03/03/17 06:31 PM
03/03/17 06:31 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
Yeah, I thought that was the problem; use:
Code
// What is the users IP address?  Are they behind a Firewall, Proxy, or are they using a CDN?
if(isset($_SERVER["HTTP_X_SUCURI_CLIENTIP"])) {
	$user_ip = $_SERVER["HTTP_X_SUCURI_CLIENTIP"];
} elseif(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
	$user_ip = $_SERVER["HTTP_CF_CONNECTING_IP"];
} elseif(isset($_SERVER["HTTP_FORWARDED_FOR"])) {
	$user_ip = $_SERVER["HTTP_FORWARDED_FOR"];
} elseif(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
	$user_ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} elseif(isset($_SERVER["HTTP_X_CLUSTER_CLIENT_IP"])) {
	$user_ip = $_SERVER["HTTP_X_CLUSTER_CLIENT_IP"];
} else {
	$user_ip = $_SERVER["REMOTE_ADDR"];
}


In your /ubbthreads.php file.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: All users register from same IP [Re: driv] #259696
03/03/17 06:34 PM
03/03/17 06:34 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
I'd like to state for the record that your firewall on your server sucks, HTTP_X_FORWARDED_FOR should always translate to the real user IP address, lol.
Quote
The X-Forwarded-For (XFF) HTTP header field was a common method for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer. The XFF HTTP request header was introduced by the Squid caching proxy server's developers. An RFC was proposed at the Internet Engineering Task Force (IETF).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: All users register from same IP [Re: Gizmo] #259697
03/03/17 06:46 PM
03/03/17 06:46 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
Originally Posted by Gizmo
I'd like to state for the record that your firewall on your server sucks, HTTP_X_FORWARDED_FOR should always translate to the real user IP address, lol.


Of course, I'll be happy to mention that to Sucuri. Especially as they are supposed to be professionals in their field.

Thank you Gizmo, I'll try this and get back to you. smile


Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259698
03/03/17 06:57 PM
03/03/17 06:57 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
Yep that's it.
Several spiders and loads of anon users.

Give that man a payrise!


Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259699
03/03/17 06:59 PM
03/03/17 06:59 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
I have the change in a proposed fix for v7.6.1; I'm looking at additional information to add as well, if you wouldn't mind testing a code snippit for me later since you're a good test case using that firewall (versus my only being able to test behind a cdn).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: All users register from same IP [Re: driv] #259700
03/03/17 07:02 PM
03/03/17 07:02 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
No worries mate - happy to help.


Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259702
03/03/17 07:08 PM
03/03/17 07:08 PM
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,956
Portland, OR; USA
Awesome, could you (or anyone really that has a site behind a firewall, CDN, or are using a proxy to connect) run the below kludge and copy me the output; it'll grab all the information that I think we will need to go forward.
ipheaders.php
PHP Code

<?php
if(isset($_SERVER["GD_PHP_HANDLER"])) {
	echo("A ". $_SERVER["GD_PHP_HANDLER"] ."<br>\n");
}
if(isset($_SERVER["HTTP_AKAMAI_ORIGIN_HOP"])) {
	echo("B ". $_SERVER["HTTP_AKAMAI_ORIGIN_HOP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_SUCURI_CLIENTIP"])) {
	echo("C ". $_SERVER["HTTP_X_SUCURI_CLIENTIP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
	echo("D ". $_SERVER["HTTP_CF_CONNECTING_IP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_CLIENT_IP"])) {
	echo("E ". $_SERVER["HTTP_CLIENT_IP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_FASTLY_CLIENT_IP"])) {
	echo("F ". $_SERVER["HTTP_FASTLY_CLIENT_IP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_FORWARDED"])) {
	echo("G ". $_SERVER["HTTP_FORWARDED"] ."<br>\n");
}
if(isset($_SERVER["HTTP_FORWARDED_FOR"])) {
	echo("H ". $_SERVER["HTTP_FORWARDED_FOR"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
	echo("I ". $_SERVER["HTTP_X_FORWARDED_FOR"] ."<br>\n");
}
if(isset($_SERVER["HTTP_INCAP_CLIENT_IP"])) {
	echo("J ". $_SERVER["HTTP_INCAP_CLIENT_IP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_TRUE_CLIENT_IP"])) {
	echo("K ". $_SERVER["HTTP_TRUE_CLIENT_IP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_CLIENTIP"])) {
	echo("L ". $_SERVER["HTTP_X_CLIENTIP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_CLUSTER_CLIENT_IP"])) {
	echo("M ". $_SERVER["HTTP_X_CLUSTER_CLIENT_IP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_FORWARDED"])) {
	echo("N ". $_SERVER["HTTP_X_FORWARDED"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_IP_TRAIL"])) {
	echo("O ". $_SERVER["HTTP_X_IP_TRAIL"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_REAL_IP"])) {
	echo("P ". $_SERVER["HTTP_X_REAL_IP"] ."<br>\n");
}
if(isset($_SERVER["HTTP_X_VARNISH"])) {
	echo("Q ". $_SERVER["HTTP_X_VARNISH"] ."<br>\n");
}
echo("R ". $_SERVER["REMOTE_ADDR"] ."<br>\n");
echo("----------<br>\n\n");

if(isset($_SERVER["GD_PHP_HANDLER"])) {
	echo("A ". $_SERVER["GD_PHP_HANDLER"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_AKAMAI_ORIGIN_HOP"])) {
	echo("B ". $_SERVER["HTTP_AKAMAI_ORIGIN_HOP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_SUCURI_CLIENTIP"])) {
	echo("C ". $_SERVER["HTTP_X_SUCURI_CLIENTIP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
	echo("D ". $_SERVER["HTTP_CF_CONNECTING_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_CLIENT_IP"])) {
	echo("E ". $_SERVER["HTTP_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_FASTLY_CLIENT_IP"])) {
	echo("F ". $_SERVER["HTTP_FASTLY_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_FORWARDED"])) {
	echo("G ". $_SERVER["HTTP_FORWARDED"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_FORWARDED_FOR"])) {
	echo("H ". $_SERVER["HTTP_FORWARDED_FOR"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
	echo("I ". $_SERVER["HTTP_X_FORWARDED_FOR"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_INCAP_CLIENT_IP"])) {
	echo("J ". $_SERVER["HTTP_INCAP_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_TRUE_CLIENT_IP"])) {
	echo("K ". $_SERVER["HTTP_TRUE_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_CLIENTIP"])) {
	echo("L ". $_SERVER["HTTP_X_CLIENTIP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_CLUSTER_CLIENT_IP"])) {
	echo("M ". $_SERVER["HTTP_X_CLUSTER_CLIENT_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_FORWARDED"])) {
	echo("N ". $_SERVER["HTTP_X_FORWARDED"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_IP_TRAIL"])) {
	echo("O ". $_SERVER["HTTP_X_IP_TRAIL"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_REAL_IP"])) {
	echo("P ". $_SERVER["HTTP_X_REAL_IP"] ."<br>\n");
} elseif(isset($_SERVER["HTTP_X_VARNISH"])) {
	echo("Q ". $_SERVER["HTTP_X_VARNISH"] ."<br>\n");
} else {
	echo("R ". $_SERVER["REMOTE_ADDR"] ."<br>\n");
}
echo("----------<br>\n\n");

function fetch_ip() {
	if(isset($_SERVER["GD_PHP_HANDLER"])) {
		return($_SERVER["GD_PHP_HANDLER"]);
	} elseif(isset($_SERVER["HTTP_AKAMAI_ORIGIN_HOP"])) {
		return($_SERVER["HTTP_AKAMAI_ORIGIN_HOP"]);
	} elseif(isset($_SERVER["HTTP_X_SUCURI_CLIENTIP"])) {
		return($_SERVER["HTTP_X_SUCURI_CLIENTIP"]);
	} elseif(isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
		return($_SERVER["HTTP_CF_CONNECTING_IP"]);
	} elseif(isset($_SERVER["HTTP_CLIENT_IP"])) {
		return($_SERVER["HTTP_CLIENT_IP"]);
	} elseif(isset($_SERVER["HTTP_FASTLY_CLIENT_IP"])) {
		return($_SERVER["HTTP_FASTLY_CLIENT_IP"]);
	} elseif(isset($_SERVER["HTTP_FORWARDED"])) {
		return($_SERVER["HTTP_FORWARDED"]);
	} elseif(isset($_SERVER["HTTP_FORWARDED_FOR"])) {
		return($_SERVER["HTTP_FORWARDED_FOR"]);
	} elseif(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
		return($_SERVER["HTTP_X_FORWARDED_FOR"]);
	} elseif(isset($_SERVER["HTTP_INCAP_CLIENT_IP"])) {
		return($_SERVER["HTTP_INCAP_CLIENT_IP"]);
	} elseif(isset($_SERVER["HTTP_TRUE_CLIENT_IP"])) {
		return($_SERVER["HTTP_TRUE_CLIENT_IP"]);
	} elseif(isset($_SERVER["HTTP_X_CLIENTIP"])) {
		return($_SERVER["HTTP_X_CLIENTIP"]);
	} elseif(isset($_SERVER["HTTP_X_CLUSTER_CLIENT_IP"])) {
		return($_SERVER["HTTP_X_CLUSTER_CLIENT_IP"]);
	} elseif(isset($_SERVER["HTTP_X_FORWARDED"])) {
		return($_SERVER["HTTP_X_FORWARDED"]);
	} elseif(isset($_SERVER["HTTP_X_IP_TRAIL"])) {
		return($_SERVER["HTTP_X_IP_TRAIL"]);
	} elseif(isset($_SERVER["HTTP_X_REAL_IP"])) {
		return($_SERVER["HTTP_X_REAL_IP"]);
	} elseif(isset($_SERVER["HTTP_X_VARNISH"])) {
		return($_SERVER["HTTP_X_VARNISH"]);
	} else {
		return($_SERVER["REMOTE_ADDR"]);
	}
}
echo(fetch_ip());
?>



First section will populate any matches of a super global, second section will show you what UBB.threads will see, the third is a resulting function.

Output should be similar to:
Code
D 67.170.150.xxx
I 67.170.150.xxx,67.170.150.xxx
R 108.162.245.xxx
----------
D 67.170.150.xxx
----------
67.170.150.xxx


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: All users register from same IP [Re: driv] #259704
03/03/17 07:14 PM
03/03/17 07:14 PM
driv  Offline
OP
Joined: Jan 2004
Posts: 2,654
C 109.155.22.***
H 185.93.228.10
O 109.155.22.***
Q 185.93.228.10
----------
C 109.155.22.***
----------
109.155.22.***


Using version :: 7.6.0
Re: All users register from same IP [Re: driv] #259705
03/03/17 07:27 PM
03/03/17 07:27 PM
JAISP  Offline
veteran
Joined: Feb 2007
Posts: 1,332
Pennsylvania
Gizmo, I'm running behind the same firewall my server is running behind. I loop out to my IP Gateway and right back in to the server. The IP Gateway is 11 IP addresses above the IP address the server is sitting under. Here are my results:

R 192.168.3.1
----------
R 192.168.3.1
----------
192.168.3.1

The IP address in this test is the LAN IP address for the firewall. The test PHP file is located at http://www.jaisp.com/ipheaders.php and this is what I typed in my web browser.

My Internal IP address is 192.168.3.15
My Server Internal IP address is 192.168.3.100


Shout Box
Today's Birthdays
whk
Recent Topics
UBB.threads 7.6.2 - Released
by isaac. 09/17/18 08:08 AM
7.6.2 Changelog Discussion
by isaac. 09/17/18 06:35 AM
Upgrade Documentation
by DennyP. 09/15/18 03:55 PM
PHP 7.2
by Geoff. 09/12/18 10:22 PM
Email Cleanup-Is it possible?
by Ruben. 09/06/18 11:25 AM
Forum Statistics
Forums36
Topics35,140
Posts191,445
Members12,106
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.2