Which would be better to block countries?

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

  1. goblues

    goblues Regular Member

    90
    54
    394
    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

    3,220
    823
    918
    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

    90
    54
    394
    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

    3,220
    823
    918
    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

    90
    54
    394
    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

    3,220
    823
    918
    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

    90
    54
    394
    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

    145
    45
    364
    IP tables? What do you mean? I never heard anyone actually use that term before....
     
  9. goblues

    goblues Regular Member

    90
    54
    394
    IPTables are part of the built in linux firewall. http://en.wikipedia.org/wiki/Iptables
     

Share This Page