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

Like Reply Quote
Re: test
grengecactus #258576 07/20/2016 6:37 PM
Joined: Jan 2004
Posts: 2,469
Offline
Joined: Jan 2004
Posts: 2,469
<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.4
Like Reply Quote
Re: test
grengecactus #258579 07/20/2016 7:59 PM
Joined: Apr 2004
Posts: 1,689
Likes: 49
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,689
Likes: 49
thanks


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Like Reply Quote
Re: test
grengecactus #258582 07/21/2016 1:05 AM
Joined: Jun 2006
Posts: 15,924
Likes: 21
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,924
Likes: 21
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.
Do you need Forum Install or Upgrade Services?
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!
Like Reply Quote
Re: test
grengecactus #258583 07/21/2016 7:59 AM
Joined: Feb 2007
Posts: 1,283
Likes: 1
Veteran
Offline
Veteran
Joined: Feb 2007
Posts: 1,283
Likes: 1
My IP Address on my board shows up as 192.168.3.1 as I'm running on the same IP as my server.

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


Using version :: 7.7.4
Like Reply Quote
Re: test
Gizmo #258585 07/22/2016 2:22 PM
Joined: Jan 2004
Posts: 2,469
Offline
Joined: Jan 2004
Posts: 2,469
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.4
Like Reply Quote
Re: test
grengecactus #258587 07/22/2016 2:50 PM
Joined: Jun 2006
Posts: 15,924
Likes: 21
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,924
Likes: 21
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.
Do you need Forum Install or Upgrade Services?
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!
Like Reply Quote
Re: test
grengecactus #258588 07/22/2016 2:57 PM
Joined: Jan 2004
Posts: 2,469
Offline
Joined: Jan 2004
Posts: 2,469
Ah ok thanks.
In the meantime, is there anything I can do for v7.5.8?


Using version :: 7.7.4
Like Reply Quote
Re: test
grengecactus #258589 07/22/2016 4:18 PM
Joined: Jun 2006
Posts: 15,924
Likes: 21
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,924
Likes: 21
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.
Do you need Forum Install or Upgrade Services?
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!
Like Reply Quote
Quick Reply

Options HTML is disabled
UBBCode is enabled


Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Ubb 7.7.4 Gallery problems
by jjjjj - 05/25/2020 2:35 PM
7.7.4 error after php upgrade to php 7.0
by Ruben - 05/25/2020 1:10 PM
7.7.4 move group all, fails with a error
by Ruben - 05/24/2020 3:07 PM
Grid lines in forum topics list
by Steve C - 05/23/2020 12:09 PM
Who's Online Now
0 members (), 74 guests, and 37 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
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