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

Like Reply Quote
grengecactus #258576 07/20/2016 6:37 PM
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
<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>

Like Reply Quote
grengecactus #258579 07/20/2016 7:59 PM
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
thanks


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Like Reply Quote
grengecactus #258582 07/21/2016 1:05 AM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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
grengecactus #258583 07/21/2016 7:59 AM
Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
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
isaac #258584 07/22/2016 2:21 PM
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Originally Posted by id242
thanks
You're welcome. I think. cool

Like Reply Quote
Gizmo #258585 07/22/2016 2:22 PM
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
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?

Like Reply Quote
grengecactus #258587 07/22/2016 2:50 PM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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
grengecactus #258588 07/22/2016 2:57 PM
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Ah ok thanks.
In the meantime, is there anything I can do for v7.5.8?

Like Reply Quote
grengecactus #258589 07/22/2016 4:18 PM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Havenofsobriety), 458 guests, and 91 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)