PrestaShop Forums: [Module] Multi Ip-Range Blocker - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


[Module] Multi Ip-Range Blocker


[Module] Multi Ip-Range Blocker

#1 Trip

    PrestaShop Apprentice

  • 27 Feb 2009
  • Members
  • PipPip
  • 129 posts

Posted 07 June 2009 - 07:47 AM

Module developed by Jing-Shop
This modules blocks a range of IP-addresses and redirects requests from them to another side.

Tested with PS 1.1

Quick Setup
1) Unzip & upload to your modules directory
2) Edit the ip-ranges you want to block in the ips.txt in the module directory.
3) Edit
header("Location: http://www.example.com");
at the bottom of ipblock.php to the page the visitor or bot should be redirected to.
4) Install this module through Prestashop Back Office

So I don't know if someone really needs this but the module allows you easily to block ip-ranges from your shop.
So you can block tax and revenue offices :), spambots or even whole countries from accessing your site.
Important:
The format of the addresses must be like:
58.136.0.0 58.136.255.255
58.137.0.0 58.137.255.255
58.147.0.0 58.147.127.255

Every single range is one line.
NO hyphen, comments or whatever should be in the ips.txt
This module only blocks IP-ranges, not single IP's so be carefull.


If you like what I am doing (and it is working for you) buy a pants from the shop :)
post a link on your homepage, blog or whatever, follow us on twitter ;) or just say thank you to the prestateam for giving us a nice piece of software.
When you look in the code you know it is not a cakewalk to develop this (<-- I mean the prestashop code :) ).
Regards, trip

Attached File(s)



#2 jhnstcks

    PrestaShop Fanatic

  • 16 Jul 2008
  • Moderators
  • 1748 posts
  • Location:UK

Posted 07 June 2009 - 09:42 AM

If you wanted to to block a single ip couldnt you just define the range as 58.136.0.0 58.136.0.0
Don't forget to click the like button on posts if you think it has been helpful.

E-commerce hosting from Scotserve, fast, reliable and affordable.
E-commerce forum - reviews of dropship suppliers, wholesalers, expert advice on shopping cart software and plenty more....

#3 plouise

    PrestaShop Apprentice

  • 01 Apr 2008
  • Members
  • PipPip
  • 49 posts
  • Location:Malakoff - St Savin

Posted 07 June 2009 - 09:47 AM

Thanks Trip.
I'm not security specialist, so I don't know if this module give the same level of security as the htaccess.

Some may answer?

And also, anybody have a ip database of knowed hacking place?
Great product, I will share the benefits.
version 1.2.2

#4 Trip

    PrestaShop Apprentice

  • 27 Feb 2009
  • Members
  • PipPip
  • 129 posts

Posted 07 June 2009 - 10:03 AM

Hi all,
I think my my script is more secure because from what I read about the function that determines the real ip is, it should be able to find it out
even if the user is using a proxy server.
That's what I read. I haven't tested it. From my point of view .htaccess should be faster but I think no one will notice a performance reduction with my script unless you maybe have a high traffic shop with lots of visitors.
I think my solution is a little bit more comfortable and targeted to unexperienced users.
A database with bad neighbourhood would be nice. Maybe someone finds something cool and than I would think about to modify the parser and maybe add a cron script to download the ip's once a day.
Regards, trip

#5 Ehinarr

    Sir

  • 01 Nov 2008
  • Members
  • PipPipPipPip
  • 1125 posts

Posted 07 June 2009 - 05:08 PM

Great job! Thanks for shrare it!
My Blog
PS v1.4.6.1

#6 ezkudo

    PrestaShop Newbie

  • 27 Apr 2009
  • Members
  • Pip
  • 3 posts

Posted 18 June 2009 - 07:20 PM

I can't install this module.
Could you explain to me step by step please.?
I'm new for prestashop.

#7 Vilas

    PrestaShop Apprentice

  • 23 Oct 2010
  • Members
  • PipPip
  • 261 posts

Posted 04 December 2011 - 07:05 AM

Hi,

How to get customer IP who are sending us query through contact form?

Thanks
Vilas





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users