Activity Stream
48,167 MEMBERS
61028 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1.     
    #1
    Member

    Default How to block USA ips?

    How do you block all USA ip's on your vps?
    Ruriko Reviewed by Ruriko on . How to block USA ips? How do you block all USA ip's on your vps? Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Wow not feeling the luv

  4.     
    #3
    Member
    Website's:
    Nerdy-Tutorials.com Mp3viddown.com Filmlab.eu
    i am

  5.     
    #4
    Banned
    Website's:
    CuraShare.Net CuraShare.Me CuraShare.Info
    You can find ready to use .htaccess files to block countries:
    http://www.countryipblocks.net/count...s-deny-format/

  6.     
    #5
    Member
    sorry I forgot to mention I use nginx as my webserver so I can't use .htaccess

  7.     
    #6
    Member
    What's the point in blocking USA IP's?

    If its to stop gov't and media reps from visiting your site there is no point. If they want to get to your site they will just use a proxy. You're blocking a lot of traffic by limiting yourself from USA.

    anyways there are programs to convert htaccess to nginx rules

  8.     
    #7
    Member
    I only know FreeBSD's pf can do it.
    Install the port net-mgmt/netmask, and use the following command:
    Code: 
    netmask `wget -qO- http://ftp.apnic.net/stats/apnic/delegated-apnic-latest | awk -F'|' '/US\|ipv4/ {print $4":+"($5-1)}' > /etc/US_IP`
    Edit the file /etc/pf.conf, and add these lines to appropriate position:
    Code: 
    table <USIP> persist file "/etc/US_IP"
    block in quick on $ext_if proto tcp from <USIP> to any port {80,443} label "block US IP"
    Don't forget to set $ext_if to your network interface if you haven't used pf so far.

    In this example, it only blocks http and https incoming connections; I think it's enough.
    I think iptables of Linux has a similar facility, but I don't learn too much about Linux's firewall.

  9.     
    #8
    Member
    Those htaccess files could be converted to nginx pretty much easily, just adding a few lines would do.

    Look up nginx's doc, http://wiki.nginx.org/HttpAccessModule

  10.     
    #9
    Member
    Website's:
    ultimatehostings.com
    You can install CSF and use US in CC_DENY and it will block almost all the US IP's.

  11.     
    #10
    Member
    Website's:
    eotips.com
    are u suing wp ?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Does KWWH block US IP?
    By jiefangjun in forum Feedback and Suggestions
    Replies: 45
    Last Post: 12th Jul 2012, 06:41 AM
  2. help to block is?
    By jpeps in forum Wordpress
    Replies: 2
    Last Post: 29th Apr 2012, 01:36 AM
  3. block 208.86.198.xx
    By shahpar in forum Webmaster Resources
    Replies: 5
    Last Post: 18th Feb 2011, 10:12 AM
  4. hello Everyone - new guy on the block
    By Thomas in forum Introductions
    Replies: 1
    Last Post: 20th Nov 2010, 04:05 PM
  5. How to block pop ups-Need help
    By sasacal in forum Tutorials and Guides
    Replies: 7
    Last Post: 9th Oct 2010, 10:07 PM

Tags for this Thread

BE SOCIAL