Previous Thread
Next Thread
New Reply
Print Thread
Hop To
test #252424 03/10/2013 12:13 PM
Joined: Jan 2013
Posts: 1
grengecactus Offline OP
stranger
OP Offline
stranger
Joined: Jan 2013
Posts: 1
test

Reply Quote
Re: test [Re: grengecactus] #258576 07/20/2016 6:37 PM
Joined: Jan 2004
Posts: 2,468
driv Offline
Offline
Joined: Jan 2004
Posts: 2,468
<threadHijackForaGoodReasonAlert>

Unfortunately, down to some greedy and malicious individuals, I've had to avail myself of Sucuri's CloudProxy Firewall services.
As a result, StopForumSpam is seeing all my registration IP's as the same (bunch of IPs).

Their FAQ says...
Quote:

Same IP for All Users

If your system is showing the same IP address for all clients connected to your site that's because CloudProxy is a passthrough WAF. It will be in the middle of the communication between the clients and the hosting server to be able to filter the malicious requests. Because of that, the headers are modified and the source IP will be shown as the CloudProxy IP.


and...
Quote:

PHP

Add the following code to your application (the config.php or configuration.php is usually a good location):



PHP Code

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


What's the best way to implement this?


d. smile

</threadHijackForaGoodReasonAlert>


Using version :: 7.7.2
Reply Quote
Re: test [Re: grengecactus] #258579 07/20/2016 7:59 PM
Joined: Apr 2004
Posts: 1,530
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,530
thanks


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Reply Quote
Re: test [Re: grengecactus] #258582 07/21/2016 1:05 AM
Joined: Jun 2006
Posts: 15,844
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,844
Driv, I appended that to the IP listing code, try to see if it gives you any sort of bad user message, if so i'll tweak its placement.


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.
Need to Upgrade?
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!
Reply Quote
Re: test [Re: grengecactus] #258583 07/21/2016 7:59 AM
Joined: Feb 2007
Posts: 1,273
JAISP Online Tapedshut
Veteran
Online Tapedshut
Veteran
Joined: Feb 2007
Posts: 1,273
My IP Address on my board shows up as 192.168.3.1 as I'm running on the same IP as my server.

Reply Quote
Re: test [Re: isaac] #258584 07/22/2016 2:21 PM
Joined: Jan 2004
Posts: 2,468
driv Offline
Offline
Joined: Jan 2004
Posts: 2,468
Originally Posted by id242
thanks
You're welcome. I think. cool


Using version :: 7.7.2
Reply Quote
Re: test [Re: Gizmo] #258585 07/22/2016 2:22 PM
Joined: Jan 2004
Posts: 2,468
driv Offline
Offline
Joined: Jan 2004
Posts: 2,468
Originally Posted by Gizmo
Driv, I appended that to the IP listing code, try to see if it gives you any sort of bad user message, if so i'll tweak its placement.

Sorry mate, you've lost me there.

IP listing code?


Using version :: 7.7.2
Reply Quote
Re: test [Re: grengecactus] #258587 07/22/2016 2:50 PM
Joined: Jun 2006
Posts: 15,844
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,844
v7.6.0 has support for CDN's and Proxy Servers that display a common variable, which are:
PHP Code
// What is the users IP address?  Are they behind a Proxy or using a CDN?
if(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"];
} elseif(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"];
} else {
	$user_ip = $_SERVER["REMOTE_ADDR"];
} 


Your "HTTP_X_SUCURI_CLIENTIP" has been added after the forwarded for and above the CloudFlare identification..


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.
Need to Upgrade?
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!
Reply Quote
Re: test [Re: grengecactus] #258588 07/22/2016 2:57 PM
Joined: Jan 2004
Posts: 2,468
driv Offline
Offline
Joined: Jan 2004
Posts: 2,468
Ah ok thanks.
In the meantime, is there anything I can do for v7.5.8?


Using version :: 7.7.2
Reply Quote
Re: test [Re: grengecactus] #258589 07/22/2016 4:18 PM
Joined: Jun 2006
Posts: 15,844
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,844
The UBB.threads7 series, up until 7.6.0 just reads the REMOTE_ADDR server variable; you would have to use grep to return every instance of that variable and adjust it (such as say, adding the above php bit to the ubbthreads.php file and replacing the calls for remote addr to use $user_ip).

If you where behind CloudFlare I'd suggest installing their apache module to change the addresses accordingly, but I'm not sure if "CloudProxy" has one available.

You could try using that bit (though generally I'm against changing server variables, and I'm not sure how well smarty will play with it):
PHP Code
if(isset($_SERVER['HTTP_X_SUCURI_CLIENTIP']))
{
	$_SERVER["REMOTE_ADDR"] = $_SERVER['HTTP_X_SUCURI_CLIENTIP'];
} 


In the ubbthreads.php file; before:
Code
// include all of the required libraries


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.
Need to Upgrade?
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!
Reply Quote
Quick Reply

Options HTML is disabled
UBBCode is enabled


Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Having issue with redirects to UBB classic URLs
by amciotola - 10/16/2019 1:11 AM
Unable to save General settings
by amciotola - 10/13/2019 4:23 AM
I see signature line images, but no avatars
by Morgan - 10/12/2019 2:21 PM
Show PDF
by Geoff - 10/09/2019 1:33 AM
Subscription’s Auto Return URL for PayPal
by Geoff - 09/27/2019 12:10 AM
Who's Online Now
2 registered members (JAISP, isaac), 91 guests, and 426 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20190930)