Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Nov 2010
    Location
    Ohio
    Posts
    13
    Plugin Contributions
    0

    Default Re: Blocking specific IP addresses

    Quote Originally Posted by Louis View Post
    You can always add this to the top of your index.php file to block certain IP's from gaining access to your site.

    PHP Code:
    $banned = array('129.168.1.1');
    if(
    in_array($_SERVER['REMOTE_ADDR'], $banned))
    {
        die();

    What if you have more than one that you want to ban?
    How do I do that?

  2. #12
    Join Date
    Oct 2010
    Posts
    27
    Plugin Contributions
    0

    Default Re: Blocking specific IP addresses

    Quote Originally Posted by wifeandmomof4 View Post
    What if you have more than one that you want to ban?
    How do I do that?
    Because Array is a table you can add more IP-s like
    array('1.2.3.4','1.2.3.5','1.2.3.6',.....,'XXX.XXX.XXX.XXX');

  3. #13
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Blocking specific IP addresses

    Have you tried just using:

    deny from ???

    All you need is that one line with the IP address.

    Or, with one line you can block 256 IPs if you so choose.

    deny from xxx.xxx.xxx

    Leaving off the period and last 3 digits will block everything from 0 - 255

    Note: the above is to be used in an .htaccess file on a Linux Server. I don't work with MS Servers so can't say what would happen.

  4. #14
    Join Date
    Nov 2010
    Location
    Ohio
    Posts
    13
    Plugin Contributions
    0

    red flag Re: Blocking specific IP addresses

    How would I go about limiting registration to 1 per IP Address? Is that possible?

    What happened is that I created a gift certificate to be sent upon account creation from Admin. I had one individual register 9 "people" from the same IP Address. She got 9 unique gift certificate codes. Then, she emailed/transferred them all to one account and applied them all to one order which then didn't cost her a thing.

    The original Admin gift certificate was limited to one per order. I'd like to know how I could limit registration to maybe 1-2 from each IP address to avoid this happening in the future. Thanks for your help.

  5. #15
    Join Date
    Nov 2010
    Location
    Ohio
    Posts
    13
    Plugin Contributions
    0

    Default Re: Blocking specific IP addresses

    Quote Originally Posted by CaDyMaN View Post
    Because Array is a table you can add more IP-s like
    array('1.2.3.4','1.2.3.5','1.2.3.6',.....,'XXX.XXX.XXX.XXX');
    Thank you!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Need help with blocking specific subcategories
    By frank18 in forum General Questions
    Replies: 2
    Last Post: 21 Apr 2013, 01:07 PM
  2. Replies: 1
    Last Post: 14 Oct 2010, 12:33 AM
  3. Hosting server Blocking Customer IP addresses
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Oct 2009, 11:05 PM
  4. Blocking IP Addresses
    By direwolf in forum General Questions
    Replies: 2
    Last Post: 18 Aug 2009, 12:28 AM
  5. Blocking a range of IP addresses
    By dpatt111 in forum General Questions
    Replies: 2
    Last Post: 26 Aug 2006, 03:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg