+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: What do you think about IP blocks for countries?

  1. #1
    Moderator Kay is a Premium Member
    Join Date
    Sep 2010
    Location
    Kent - the garden of England
    Posts
    6,166
    Blog Entries
    2
    Thanks
    4,297
    Thanked 3,342 Times in 2,133 Posts
    Rep Power
    95

    What do you think about IP blocks for countries?

    On some of my smaller sites, I'm plagued with spammy traffic from Russia. They use my bandwidth, try brute force attacks, attempt to spam, and contaminate the stats. They're just a pest. Mostly I can't see any legitimate reason for people in those countries to be on those sites anyway. I am very tempted to block all traffic from Russia, and maybe China too while I'm at it.

    The only thing that's stopping me is that very occasionally you do get someone well-meaning who is in a dodgy IP range and they end up being blocked too. It's happened to me more than once. I can usually fix it with a quick email to the site owner - if I can be bothered.

    What do you think? Do you block countries from visiting your sites? Could the cons of doing so possibly outweigh the pros?
    British Expat - helping people to live and work abroad since the year 2000.

    The joy of Internet delivery - the cartoon illustrating this will make you laugh!



  2. #2
    Established Member
    Join Date
    May 2011
    Location
    Chicago
    Posts
    241
    Thanks
    155
    Thanked 288 Times in 141 Posts
    Rep Power
    15
    I have blocked traffic from large blocks of IP addresses from one site. It is a forum that largely deals with US law. It is certainly possible that someone in another country would have a legitimate reason to visit the site but it is not the target market and does not justify accepting the bandwidth drain and potential security issues.

  3. The Following User Says Thank You to David S For This Useful Post:

    Chabrenas (7 June 2013)

  4. #3
    aka "bryanon"
    Join Date
    Sep 2010
    Posts
    671
    Thanks
    79
    Thanked 165 Times in 79 Posts
    Rep Power
    14
    I've often blocked large blocks of IPs and whole countries from accessing my sites when I've had issues with hacking attempts / loads of illegitimate requests and I have no moral or any other kind of issues with that.

    Whilst it's true that there's bound to be some collateral damage and some legitimate visitors will be blocked from accessing the site, you need to look at it from a business perspective. If the benefit from those foreign visits is smaller than the headache that the malicious traffic that comes from those countries causes then blocking the country is the right thing to do.

    Many would see this as a discrimination of some sort but at the end of the day, how is it different from say a bank offering accounts only to residents of the country that the bank is based in? Providing accounts to foreign nationals would be possible but would impose additional costs and risks, which likely don't outweigh the extra revenue that the bank would make from those accounts.

  5. The Following 3 Users Say Thank You to Bryan For This Useful Post:

    Chabrenas (7 June 2013), Dave McM (7 June 2013), Kay (7 June 2013)

  6. #4
    Moderator Kay is a Premium Member
    Join Date
    Sep 2010
    Location
    Kent - the garden of England
    Posts
    6,166
    Blog Entries
    2
    Thanks
    4,297
    Thanked 3,342 Times in 2,133 Posts
    Rep Power
    95
    Thanks, Bryan. On my expat site we already block ranges of IPs used by known spammers. Given the nature of that site, we're expecting visitors from all over the world, so I think a slighter lighter touch is needed there.

    However, on my foodie blog and my personal blog, the content is squarely aimed at those living in English-speaking countries. That said, we do often get queries on the food blog from Brits living overseas. I guess being an expat myself, I have a good awareness of the issues involved and the frustration about being blocked from looking at something (or even banned!) just because of where I happen to be at the time.

    It seems a bit drastic to block whole countries. But, as you say, it's probably worth it from a cost/benefit point of view. Perhaps I should take a step by step approach, starting with my personal blog. I'll block Russia and see what difference that makes. I suspect it won't make any difference at all to the site except to reduce the traffic figures. That's fine by me because I don't want that useless traffic anyway. I'll do it and report back if there's anything worth mentioning.

    Traffic building method #103 - make your site a magnet for spammers in foreign countries. Get thousands of extra visitors every day! Then when you're ready to sell your site, you can boast about how much traffic it gets.
    British Expat - helping people to live and work abroad since the year 2000.

    The joy of Internet delivery - the cartoon illustrating this will make you laugh!



  7. #5
    aka "bryanon"
    Join Date
    Sep 2010
    Posts
    671
    Thanks
    79
    Thanked 165 Times in 79 Posts
    Rep Power
    14
    Quote Originally Posted by Kay View Post
    Traffic building method #103 - make your site a magnet for spammers in foreign countries. Get thousands of extra visitors every day! Then when you're ready to sell your site, you can boast about how much traffic it gets.
    Reminds me a site that I recently analysed wanting to buy it -

    Traffic: ~3k visits a month
    Revenue: ~$4,000 a month
    RPU: $1.33

    Sounds decent, right?

    It's only that 85% of the traffic was from Indonesia, whilst the site was doing lead gen / affiliate sales for products that are available only for US residents. New adjusted RPU after removing foreign traffic from equation - $8.88 !

  8. The Following 3 Users Say Thank You to Bryan For This Useful Post:

    Chabrenas (7 June 2013), FinanceGuy (8 June 2013), Kay (7 June 2013)

  9. #6
    Moderator Kay is a Premium Member
    Join Date
    Sep 2010
    Location
    Kent - the garden of England
    Posts
    6,166
    Blog Entries
    2
    Thanks
    4,297
    Thanked 3,342 Times in 2,133 Posts
    Rep Power
    95
    LOL, Bryan. Good story.

    Having said that I want to block Russia, I had a closer look at what's going on. For starters, according to my tech support dept (aka Dave McM), I can't just block traffic from Russia to that particular site because it's on our VPS along with several other sites, some of which may get legit traffic from Russia. If I block anything, it will apply to all the sites on the server (and I don't want to do that because of my expat site). Hmphh.

    Looking more closely at the stats on my personal blog, the UV figure for Russia is exactly the same as the hits. [Edit, it's page views not uniques, but it's still suspicious.] That in itself tells me something. So, what are they doing on there? What a surprise, it's yet another mass attempt to log in to the admin area of the site. B@stards.

    I guess I have two options now. Either we continue to block ranges of known spammers and forget the idea of blocking countries. Alternatively, I can take some of my smaller sites off the VPS and put them on a separate hosting account and then block countries. Apart from the extra cost of doing that, there will also be the issue of cross-linking. Apparently G doesn't see linking between sites on the same server as being unnatural (because they view a VPS in the same way as a hosting company), but if I have separate hosting and link to sites which are related they don't like that.

    Do you ever feel like you just can't win?
    Last edited by Kay; 7 June 2013 at 5:39 am. Reason: Correction
    British Expat - helping people to live and work abroad since the year 2000.

    The joy of Internet delivery - the cartoon illustrating this will make you laugh!



  10. #7
    aka "bryanon"
    Join Date
    Sep 2010
    Posts
    671
    Thanks
    79
    Thanked 165 Times in 79 Posts
    Rep Power
    14
    Surely you can just block the IP ranges / countries using .htaccess deny rules and this way the block will only apply to this one site?

    It's definitely doable but I haven't tried it myself so I can't comment on whether having so many htaccess rules would result in a massive overhead for your web server and therefore in performance issues or not. This would need to be tested / researched.

  11. #8
    Top Contributor Dave McM is a Premium Member
    Join Date
    Oct 2010
    Posts
    797
    Thanks
    501
    Thanked 407 Times in 253 Posts
    Rep Power
    19
    Yep - when I checked the raw logs, I found nearly 2,400 hits on the login script from a single IP in Russia. One visit every four minutes or so for nearly a week, presumably with a view to avoiding getting locked out for too many failed login attempts.

    Generally when I find something like that going on, I block a range of IP addresses rather than the single address - on the basis that the machine responsible may be assigned a new IP address within the same range sooner or later. How big a range I block depends on (a) the country and (b) whether we've had any similar attacks from nearby IP addresses; for known spammy countries like Russia, China and India I tend to block larger ranges.

    Quote Originally Posted by Bryan View Post
    Surely you can just block the IP ranges / countries using .htaccess deny rules and this way the block will only apply to this one site?
    You're right of course, Bryan. As you say, though, it would add a fair bit to the web server overheads, particularly if we took a similar approach to our other sites that come under the same sorts of attack (which I would guess they all do at one time or another). So I do it by editing csf.deny through the WebHost Manager control panel. We may lose some valid traffic to our expat site that way, of course, but I'd guess we have relatively few visitors from those countries anyway.

  12. The Following 2 Users Say Thank You to Dave McM For This Useful Post:

    Bryan (7 June 2013), Chabrenas (7 June 2013)

  13. #9
    Top Contributor
    Join Date
    Jan 2012
    Location
    France. Between Limoges and Brive la Gaillarde.
    Posts
    1,273
    Blog Entries
    5
    Thanks
    2,874
    Thanked 458 Times in 331 Posts
    Rep Power
    21
    I have a couple of sites where I used enormous .htaccess blocks purporting to cover all IP ranges for a given country (easily obtained online). I suppose I shouldn't have been surprised to find the attacking traffic then coming from another country. Since most of it was attacks on WP login, I changed my approach. However, this month I have seen a 150% increase in traffic, all aimed at a genuine blog post, and coming from Germany. I doubt that this is useful traffic for an English-language boating blog, but I don't want to block the whole of Germany. I'm still trying to understand what it's all about.

  14. #10
    Top Contributor Dave McM is a Premium Member
    Join Date
    Oct 2010
    Posts
    797
    Thanks
    501
    Thanked 407 Times in 253 Posts
    Rep Power
    19
    Might they be using a proxy based in Germany, Chabrenas? While I was removing the Russian brute-force attacker earlier on today, I noticed a couple of similar attempts ostensibly based in the Netherlands, but the company name associated with the IP looked like a proxy rather than a straightforward domestic ISP.

    In a case like that, I'd do what I could to identify the IP range the company was operating through, and block that (although, of course, they might have several allocations distributed over a wide range of IPs). A country block, as you hint, might exclude valid visitors - and would certainly stand more of a chance of excluding valid visitors than one that was directed against, say, Ukraine or Vietnam.

+ Reply to Thread

Similar Threads

  1. Twitter decides to allow countries to censor its service
    By KenW3 in forum Foo - everything off-topic
    Replies: 3
    Last Post: 28 January 2012, 10:48 am
  2. Countries have bans on strange baby names
    By KenW3 in forum Foo - everything off-topic
    Replies: 10
    Last Post: 16 January 2012, 4:05 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts