Which would be better to block countries?

Discussion in 'Member and Staff Management' started by goblues, Jan 1, 2012.

  1. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    Server and resources being the main factor, which method would require less overhead for blocking complete countries, htaccess or iptables (or something cooler that I did not even know existed)?
     
    Brandon likes this.
  2. cpvr

    cpvr Regular Member

    Joined:
    Aug 14, 2009
    Messages:
    3,219
    Likes Received:
    823
    Why would you want to block complete countries? Are you getting a lot of spam from certain countries and such or what? I believe .htaccess would be the best option though, but I'm not 100% sure. Perhaps @Brandon can answer this better
     
  3. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    I found no reason to continue to let china onto my sites, whether it be for hack attempts or spamming.
     
  4. cpvr

    cpvr Regular Member

    Joined:
    Aug 14, 2009
    Messages:
    3,219
    Likes Received:
    823
    Well, I did a google search and found this site http://www.countryipblocks.net/
    Let me know if that helps?
     
  5. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    That is where I got the IP's from but need to know which way to go for implementation, htaccess or iptables
     
  6. cpvr

    cpvr Regular Member

    Joined:
    Aug 14, 2009
    Messages:
    3,219
    Likes Received:
    823
    I'd recommend doing it via .htaccess because I've never tried iptables.
    Here's another site that helps you blocking china http://www.wizcrafts.net/chinese-blocklist.html
     
    goblues likes this.
  7. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    By the way, if any one is interested, iptables is definitely the way to go. .htaccess uses more resources for blocking than using iptables at the server level.
     
    Brandon and Big Dan like this.
  8. DarkGizmo

    DarkGizmo Mr. Awesome

    Joined:
    Mar 4, 2010
    Messages:
    145
    Likes Received:
    45
    Location:
    NYC
    IP tables? What do you mean? I never heard anyone actually use that term before....
     
  9. goblues

    goblues Regular Member

    Joined:
    Apr 13, 2011
    Messages:
    90
    Likes Received:
    54
    Location:
    St Louis MO
    IPTables are part of the built in linux firewall. http://en.wikipedia.org/wiki/Iptables
     

Share This Page