IP block at server level

Discussion in 'Site & Server Administration' started by Honeybee1, Sep 13, 2010.

  1. #1
    Hi, I am trying to block IPs from a few different countries.
    Can someone help and tell me where I would be able to find all IPs that come from for example, China? I would like to block all the traffic that comes in to my sites from a few different countries.
    Thanks!
     
    Honeybee1, Sep 13, 2010 IP
  2. jliu

    jliu Peon

    Messages:
    235
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    jliu, Sep 13, 2010 IP
  3. Honeybee1

    Honeybee1 Well-Known Member

    Messages:
    554
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    125
    #3
    Thank you, I will look into it.
    Cheers!
     
    Honeybee1, Sep 14, 2010 IP
  4. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #4
    Using mod_geoip you can block a country at the Apache level and not the server level. The subnets assigned to each country are listed at: http://www.countryipblocks.net/
    Select the country and click "Choose Countries". You can easily block all the subnets of a country using "csf -d <subnet>" command.
     
    madaboutlinux, Sep 14, 2010 IP
  5. 123addme

    123addme Active Member

    Messages:
    171
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #5
    123addme, Sep 19, 2010 IP
  6. dreamconception

    dreamconception Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yes, though IPtables is fine for just blocking country based IP's mod_geoip should work how you want it.
     
    dreamconception, Sep 19, 2010 IP