Block Visitors by Country - redirect to website page

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Block Visitors by Country - redirect to website page

Postby UartigZone » 06. February 2014 18:01

Hello.

I'm looking for a plugin / script they block IPs from alot of country but i don't think its possible.

The script should ban ALL ips from the country but it should redirect to a page on my website but only so they can go to that site.

MySQL, PHP script, nothing of this can do it.

It will be so awesome if someone will help me find a script like this.

Thanks,
Mathias
- Sorry for bad english.
UartigZone
 
Posts: 1
Joined: 06. February 2014 17:52
XAMPP Version: 1.8.3-2
Operating System: Windows Server 2008 R2

Re: Block Visitors by Country - redirect to website page

Postby Altrea » 06. February 2014 18:15

Hi,

We don't support XAMPP for live, production or public accessible environments so there is no need for such a script.
btw: blacklisting scripts by country ip are very ineffective. One single open proxy server in one of the valid countries and every user can bypass your "protection"

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6584
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Block Visitors by Country - redirect to website page

Postby Nobbie » 06. February 2014 22:49

UartigZone wrote:I'm looking for a plugin / script they block IPs from alot of country but i don't think its possible.


No, it is not "impossible", but it is quite a bit of work and (most important) it is useless. Why useless? Because users can use "proxies", which will request your site instead of requesting it directly. For example, if you want to block users from USA, a user simply can configure his browser to use a proxy which runs in Germany. That means, for your blocking script it seems, that this user from USA is not from USA, but from Germany. So your site does not block the request, because it is coming from Germany. You and your script have no chance to recognise, that in reality this request comes from the USA. Youre script does not receive the original Users IP, but the IP of the proxy.

Do you still think, that your "concept" is a good concept?

If you want to grant access only for certain users, there is only one way that works correctly: authorization via userid and password. Nothing else.
Nobbie
 
Posts: 6631
Joined: 09. March 2008 13:04

Re: Block Visitors by Country - redirect to website page

Postby gsmith » 07. February 2014 03:10

No it's no impossible and I'd argue that it is all that difficult. It can be bypassed as stated above but the user would have to suspect he/she's being blocked because of his/her country and then have the wherewithal to bypass it.

If you send back a "Sorry but your country is blocked from this site" they are obviously going to know, but if that error document just looks like a MySQL error you get when your CMS cannot connect to MySQL how are they going to know different short of looking at the headers which the average user would not do.

mod_geoip is what you need and it's not difficult to set up.
gsmith
 
Posts: 112
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP Version: 5.6.3
Operating System: Win XP to 8.1/VS 6,9-12


Return to XAMPP for Windows

Who is online

Users browsing this forum: iircmp and 28 guests