Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

ban regions/countries with IP Deny Manager

Discussion in 'Database Discussion' started by zen016, Dec 30, 2008.

  1. zen016

    zen016 Registered

    Joined:
    Dec 30, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Hello,

    I have been reading a lot about this and it seems there is no easy solution.

    My question is whether there is somewhere a range of IPs that can be used to ban certain countries/regions.

    I could not find such a list.

    Thanks

    P.S. Actually I have jus found a site that provided IP ranges
    www.ipaddresslocation.org/ip_ranges/get_ranges.php

    I thought that every country had only one range not a list of ranges
     
    #1 zen016, Dec 30, 2008
    Last edited: Dec 30, 2008
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,167
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    CSF firewall has an option for this.
    http://www.configserver.com/cp/csf.html

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    862
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    It seems to change on an irregular basis too.

    Although I can't imagine not using CSF, you can use ipdeny.com to generate your own lists too, though you'll wnt to update them from time to time.
     
  4. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    458
    Likes Received:
    6
    Trophy Points:
    68
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    A country may have several series of IP ranges, I am not sure if this helps, but you can create a custom .htaccess file blocking IPs of a country from this link.

    http://blockacountry.com/

    I saw it on another forum while browsing so I am not sure if it's 100% accurate but some IP ranges that I could identify with my country were correctly stated there. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. zen016

    zen016 Registered

    Joined:
    Dec 30, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Thanks for all the replies !

    The information you provided is much better that I have found myself.

    I have just thought that perhaps easier to handle my requirement would be a file .htaccess

    <Limit GET HEAD POST>
    order allow,deny
    deny from all
    allow from .....
    allow from .....
    </LIMIT>

    where you allow only from the region your site is aimed at for example
    Canada/USA/Mexico.

    Now http://blockacountry.com generates only a 'black' list but why not generate a 'white' list with the countries you want to access your website and everything else will be denied.

    Unfortunately there is no e-mail on the site to suggest this to the webmasters there.
     
  6. handsonhosting

    handsonhosting Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    Omaha, NE
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 handsonhosting, Jan 2, 2009
    Last edited: Jan 2, 2009
  7. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    68
    IP Deny Manager feature of CPanel will also allow you to block a range of IP addresses to prevent them from accessing your site.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. apscinsspl

    apscinsspl Well-Known Member

    Joined:
    Mar 15, 2008
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    66
    You can also deny Iprange ins csf. just say:

    csf -d 41.204.224.0/19

    the whole range will be blocked.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice