The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to ban France?

Discussion in 'General Discussion' started by Daemon1, Jul 25, 2005.

Thread Status:
Not open for further replies.
  1. Daemon1

    Daemon1 Well-Known Member

    Joined:
    Nov 26, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Might seem silly but I have a client whos forum is always abused by french people; dont know why but how can I ban the entire country for this particular clients account? I looked on ripe but I was unsure of what exactly to search for. Thanks.
     
  2. Gliebster

    Gliebster Active Member

    Joined:
    Jul 17, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Imagine a few people getting their entire country banned. That's classic.
     
  3. lamp

    lamp Well-Known Member

    Joined:
    Dec 22, 2003
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    France is not the only place where people speak french... or have french as their official language. Before banning countries, you might want to look into banning specific users.

    Lamp
     
  4. gamerunner2

    gamerunner2 Member

    Joined:
    Jul 24, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    well its easy.be like a mod.will take for ever,but track all the ip's and when there french mouths ip ban em
     
  5. Daemon1

    Daemon1 Well-Known Member

    Joined:
    Nov 26, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Do you think I would be resorting to this if that hadnt be already tried before? Cmon genius..

    Logical answers only please... I want to ban the country FRANCE; not french speaking countries. The client KNOWS the people harrassing his forum are from France this is why I am asking.
     
  6. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Try with the geoip module, add it o apache and search.
    Other way is to get every DNS of every internet provider of France, then make a php code that checks if visitor is from "dns1" "dns2" "dns3", etc = banned, if not, accepted... this is just an example.

    Good luck.
     
  7. Bruce

    Bruce Well-Known Member

    Joined:
    Oct 4, 2001
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    France has been a thorn in our side as well.
    Though not as bad as theplanet or EV1.
     
  8. Daemon1

    Daemon1 Well-Known Member

    Joined:
    Nov 26, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    [comment deleted - don't make racist comments on the forum]

    Wouldnt this apply to the whole server then? I only need to do this for one specific account; or can the geoip module be targetted for one account only?

    I think its time http://blackholes.us updated the site to include france, they're in the same category as all of the other countries listed there as far as I'm concerned.
     
    #8 Daemon1, Jul 25, 2005
    Last edited by a moderator: Jul 26, 2005
  9. kaosent

    kaosent Active Member

    Joined:
    Jul 12, 2005
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Your desire may not be politically correct...

    But I had to take similar measures to thwart attacks on one of my boxes by a variety of ip's in North Korea and China. I don't mean to say anything negative about any country, just that the ip's were located there. I blocked 'em with IPFW, and it wasn't to costly in terms of processing overhead since I just used that particular ISP's entire ip block listed in whois.

    It sounds like what you want is more directed toward just blocking them from the forum on one specific persons account, right? You would need something fairly simple, and it would likely be hand coded in php (Note: I am assuming for this post that you are using phpbb, but the same method can be applied to any).

    In psuedo code:
    add a section to the beginning of config.php to follow this algorithm:
    -include('../blacklist.php') a file containing a php $ with ip address ranges
    -compare visitors ip address with blacklist
    -if match: header("Location: http://fbi.gov") lol

    if you code the ip address check like you would a firewall (with emphasis on minimal comparisons) it shouldn't slow it down noticeably.

    The downside to this is that you will have to look in the forum logs and find the ip, do a whois on that ip and block the entire ISP's block. It may take a few weeks of periodic adding, but it will soon block the affected areas of France, but not necessarily the whole of France.

    If you need some extra info on my suggestion or need help coding something, feel free to pm me. Good luck and let us know how things turn out!
     
  10. dan_c

    dan_c Active Member

    Joined:
    Jul 23, 2005
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    I got an IP off of a person who posted in one of my forums who i knew was in France. I then found the ISP range which was 195.0.0.0 - 195.255.255.255. A problem which will arrise in blocking the French through this method is that you will end up blocking some people from surrounding nations as well, such as this IP is centered in Amsterdam.

    Anyways if you wanted to block everyone from this ISP block you could insert the code below into the top of the each page you wanted to be blocked.

    <?php
    If (ereg ("^195." ,$REMOTE_ADDR))
    {die ('banned...');}
    ?>

    This script takes the visitors ISP, then sees if it begins with 195. If their IP begins with 195 then the PHP will die, and stop output. Of course this is only for one ISP. you would have to add other ISPs.
     
  11. Daemon1

    Daemon1 Well-Known Member

    Joined:
    Nov 26, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for your detailed response; this may work however it would seem that it would have the same effect as dropping the IPS into the denyip box via CPanel in the users account which is what Ive been doing for ages. So many different ips from so many providers all of which are french. I will look into your suggestion though and see if it will work better than the current method.

    Someone who knows there stuff needs to get France added to blackhole.us [deleted - do not make racist comments]
     
    #11 Daemon1, Jul 25, 2005
    Last edited by a moderator: Jul 26, 2005
  12. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    While you may have a legitimate need to block a certain country, racist (construed or otherwise) comments on the forum will not be tolerated, so please refrain from making them.
     
    #12 chirpy, Jul 26, 2005
    Last edited: Jul 26, 2005
Loading...
Thread Status:
Not open for further replies.

Share This Page