January 31, 2011

SHARE THIS! How to get around the internet block in #Egypt

Listening to NPR earlier today, they were talking about how "tech savvy" protesters were finding ways to get around the internet shut-down in Egypt.  Their story mostly focused on folks breaking out the old dial-up modems and connecting to dial-up ISPs in other countries, but they also described exactly how the Egyptian ISPs had shut down access to the world wide web.  It seems that the ISPs simply removed all the entries from their DNS servers.  When you connect to their ISP and type in an address, the DNS server tells your computer where that site is located.  Without a DNS entry for a site, your computer won't be able to find the site.  However, if your computer has an entry for that site in the HOSTS file, your computer will skip accessing the DNS server for that site and connect to the IP in the HOSTS entry.

Make sure your computer is set up to show hidden files.  Look for a file named HOSTS in either Windows\system32\drivers\etc or in the Windows root (for 98/ME users).  If you're using a *NIX or Macintosh OS, go to /etc/hosts.  Add entries for the sites you need to access, such as:
          69.63.189.26  facebook.com
          74.125.127.93  youtube.com
          74.125.95.93  google.com
          168.143.171.180  twitter.com
 
The above listed IPs work as of this posting.  The IPs for Google and Youtube should be interchangeable, as they are hosted on the same servers.


This trick is also useful for getting around campus or work-place firewalls on certain sites.  This is not guaranteed to work, as more advanced firewalls will block the whole IP range of certain sites, and in the case of what's happening in Egypt right now, the ISPs may completely shut-down or disconnect from the internet until the government lifts the ban.  However, as long as the shut-down is being done in the way described by NPR today, this method should work.

Also, if you're not trying to work around a block, do NOT add entries to your HOSTS file.  Sites such as these change their IP addresses somewhat frequently, and when they do your entry will no longer be valid.  This is why DNS servers are important, as they are updated every few hours with current data.  However, as these sites have made it clear they stand on the side of the protesters and against the Egyptian government's block, hopefully they will keep their current IP addresses until the crisis is over.

No comments:

Post a Comment