hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Risks associated with blocking countries in firewall?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Risks associated with blocking countries in firewall?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-30-2010, 03:16 PM
diesel12 diesel12 is offline
WHT Addict
 
Join Date: Jul 2007
Posts: 109

Risks associated with blocking countries in firewall?


We've started blocking countries like China in CongigServer, but recall reading something a ways back that somehow, American IP addresses may be blocked as well when blocking China ... something regarding subnets or something else that I didn't quite follow regarding how IP addresses are set up.

Are there risks like this involved when blocking an entire country via a firewall? We're only concerned about US and Canadian traffic ....

Reply With Quote


Sponsored Links
  #2  
Old 12-02-2010, 02:56 AM
centauricw centauricw is offline
Web Hosting Guru
 
Join Date: Jul 2008
Location: Atlanta GA
Posts: 291
The IP blocks given out to the various registries are by no means contiguous blocks. They are all over the place as IP blocks were carved out, returned and reassigned. It's possible to block entire countries at the firewall, but I've long since given up. It's more important to be sure the underlying security of your web site/server is good.

And if your primary concern is blocking botnets from trying to break in, just blocking a country won't help since all countries are affected.

Reply With Quote
  #3  
Old 12-07-2010, 04:22 AM
SysAssist SysAssist is offline
New Member
 
Join Date: Dec 2010
Posts: 1
You can use geoip to download recent lists of ip blocks for countries and block according to that in iptables.

Reply With Quote
Sponsored Links
  #4  
Old 12-07-2010, 04:26 AM
diesel12 diesel12 is offline
WHT Addict
 
Join Date: Jul 2007
Posts: 109
We're using country codes in configserver firewall's deny list, I take country codes aren't comprehensive?

Reply With Quote
  #5  
Old 12-07-2010, 05:33 AM
ServerOrigin ServerOrigin is offline
Web Hosting Master
 
Join Date: Jun 2006
Location: NYC
Posts: 1,408
GeoIP is incredibly unreliable.

For example, if you tried to block all of China with APNIC's actual assignments, you would also knock out the larger part of AU.

Blocking any country should be absolute last resort because impact can be far reaching.

__________________
ServerOrigin.Com ethProxy™ DDoS Mitigation Protect your current server in minutes!
[Intrusion Detection • CDN • DDoS Protected VPS • DDoS Cloud Hosting • 99.99% SLA • AnyCast IP Services]
[Enterprise-Class DDoS Protection • Automated Datacenter Failover • Serving more than 1 million domains!]


Reply With Quote
  #6  
Old 12-07-2010, 05:38 AM
diesel12 diesel12 is offline
WHT Addict
 
Join Date: Jul 2007
Posts: 109
@serverorigin: So there might be the possibility of inadvertently blocking parts of the United States by blocking whole countries via their country codes? (India, China, Korea, etc.....) The only traffic we don't want to block is the US / Cananda....

Reply With Quote
  #7  
Old 12-07-2010, 05:41 AM
ServerOrigin ServerOrigin is offline
Web Hosting Master
 
Join Date: Jun 2006
Location: NYC
Posts: 1,408
Quote:
Originally Posted by diesel12 View Post
@serverorigin: So there might be the possibility of inadvertently blocking parts of the United States by blocking whole countries via their country codes? (India, China, Korea, etc.....) The only traffic we don't want to block is the US / Cananda....
Very large risk of blocking US/CA traffic by blocking all other countries. The registries do not keep up very well. Many companies also announce IP's from other regions. (Not supposed to but it happens)

The other issue is reassignments that occur. We have blocked the UK (per customer request) and saw all traffic drop from Comcast (in and around Chicago). Why? No clue. It's not recommended.

*Edit: Just to add : This is why you will also see so many people complaining about GeoIP DNS services. Even the better ones (paid services) who actively track things better than ARIN/APNIC/RIPE, etc. Still don't always get it right.

__________________
ServerOrigin.Com ethProxy™ DDoS Mitigation Protect your current server in minutes!
[Intrusion Detection • CDN • DDoS Protected VPS • DDoS Cloud Hosting • 99.99% SLA • AnyCast IP Services]
[Enterprise-Class DDoS Protection • Automated Datacenter Failover • Serving more than 1 million domains!]



Last edited by ServerOrigin; 12-07-2010 at 05:44 AM.
Reply With Quote
  #8  
Old 12-07-2010, 05:45 AM
diesel12 diesel12 is offline
WHT Addict
 
Join Date: Jul 2007
Posts: 109
That's exactly what I needed to know.... if there's an outside chance of inadvertently blocking US traffic then it's definitely NOT worth ... thank you so much for the feedback.

Reply With Quote
  #9  
Old 08-29-2012, 10:17 AM
dwulff dwulff is offline
New Member
 
Join Date: Aug 2012
Posts: 2
Country Blocking Firewall

The latest Q2, 2012 Attack Report by Prolexic shows 91% of DDoS attacks originate in countries outside the United States. The decision to block traffic that offers no business value is an easy choice. There are two big problems with configuring ACLs in routers and firewalls to block countries:

1. Adding 12,000 IP ranges to block countries can substantively increase latency, decrease TCP throughput, and must be updated daily to keep up with new IP configurations eating up to 15 minutes a day

2. If you had an 'allow only' US traffic, you are still open to botnets and malware originating from infected machines in the US as another poster pointed out.

We solved the problem with an actual appliance that sits between the border router and firewall that blocks traffic by country with a click on a map, block millions of known botnets and spammers using the EmergingThreats IP reputation list of threats in the US, and is all automatically updated in the appliance...with no noticeable impact on network performance. The appliance is called PoliWall by TechGuard. We cut the bulk of the noise before it ever reaches systems deeper inside the network.

Reply With Quote
  #10  
Old 08-29-2012, 10:24 AM
dwulff dwulff is offline
New Member
 
Join Date: Aug 2012
Posts: 2
Country Blocking Firewall

Here is the whitepaper on impact of ACLs on firewall and router just FYI


Last edited by dwulff; 08-29-2012 at 10:27 AM. Reason: wrong post
Reply With Quote
  #11  
Old 08-29-2012, 10:39 AM
znetindia znetindia is offline
Premium Member
 
Join Date: Mar 2003
Location: Jaipur, India
Posts: 617
Hi,

This following small script will automatically read the lines in Country IP range files from here and add them to your firewall

Create a file called zoneblock using the following text, then 'chmod +x zoneblock' to make it executable

Just download the zone file you want for the country you want (you can do this using wget), then run Code:

./zoneblock /var/tmp/af.zone eth1

replacing af.zone with whatever file you are using and eth1 with what ever interface your WAN is.

The changes are only temporary till reboot, or until 'service firewall restart'. You could add the command to /etc/rc.d/rc.local to make it run on every bootup

Now you can block whole countries with the click of a button!
Code:

#!/bin/bash
# Zoneblock script
# usage: # zoneblock [file] [interface]
while read line
do
iptables -I INPUT -s $line -i $2 -j DROP
echo "adding...$line"
done <$1
exit 0

Just FYI, Hope it will help you.

__________________
RackNAP
Billing, Inventory & Support Management
Software for Datacenters and Large Hosters

Reply With Quote
  #12  
Old 09-03-2012, 05:36 PM
cloudsafe365 cloudsafe365 is offline
New Member
 
Join Date: Aug 2012
Location: Australia
Posts: 4
GEOIP

Are there any alternatives to GEOIP for increased accuracy ?

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blocking countries from ordering KNL-BSW Running a Web Hosting Business 46 07-03-2005 05:07 AM
Blocking Countries by IP Xoopiter-Jeff Dedicated Server 5 09-22-2004 05:07 AM
Blocking Certain Countries.. Rose Module Web Hosting 5 09-19-2004 09:25 AM
blocking other countries but US jmb1881 Web Hosting 25 10-22-2003 02:58 AM
Blocking certain countries.... MSSTATEBDFAN Web Hosting 9 05-29-2003 12:46 PM

Related posts from TheWhir.com
Title Type Date Posted
GoGrid Adds New Firewall Services to Cloud SDN Architecture Web Hosting News 2013-04-11 10:50:21
WHD.global 2013: SiteLock Adds Web Application Firewall and CDN to Security Portfolio Web Hosting News 2013-03-19 13:48:01
Phoenix NAP Adds Firewall and Storage Capabilities to Secured Servers Web Hosting News 2013-01-21 14:15:08
Web Host HostGee Rolls Out Managed Firewall Cluster Service Web Hosting News 2012-10-22 15:36:38
Dome9 Study Finds Cloud Vulnerable Without Secure Cloud Ports and Firewalls Web Hosting News 2011-11-02 15:37:19


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?