GMAIL Unblock Blocked Sites By Changing The Hosts File | Security Learner's Blog

Thursday, 20 August 2015

Unblock Blocked Sites By Changing The Hosts File

To unblocked a blocked site (such as Facebook), you can check out VPN, SSH, Proxy and some other free anti-censorship tools as mentioned before.
In fact, you can even unblocked blocked sites without any third-party tools, but just by changing the hosts file on your own computer.
The following will show you how to change the Hosts file and unblocked the Facebook site in 3 steps:
Step 1. Find the IP addresses
open facebook
For Facebook, Twitter, YouTube and some other big sites, each of them usually has more than one IP address, so, how to find out all the IP addresses of a site?
You can visit the CacheCheck page of OpenDNS, enter the domain of the site (such as, and click on the "Check this domain" button, then you can see the site's IP addresses from all over the world.
Step 2. Find one unblocked IP
Among all the IP addresses of the site, some of them may be blocked in your area, while the others are not, so how to figure them out?
The most easy way is to ping them on your computers. For Windows, you can open the Command Prompt (cmd.exe), and for Mac OS, you can open the Terminal application, then enter the following command:
unblock facebook
The above "" is one of Facebook's IP addresses, remember to change it to the one you are going to ping.
If there is a "timeout" error in the result, then the IP address is blocked in your area, if not, then you are lucky to add it to the hosts file.
Step 3. Edit the hosts file
facebook hosts
The hosts file is something like a DNS system, so we can locate the blocked site's domains to its unblocked IP addresses and then bypass the internet censorship.
For Windows, you can find the hosts file in the following address:
And for Mac OS, you can find and open the hosts file by entering the following command on the Terminal application:
sudo vi /private/etc/hosts
When the hosts file is opened, you can add the blocked site's unblocked IP addresses with domains in the end of the file. Take Facebook for example, you can enter the following 2 lines:
Besides, you can also add more sub-domains (such as with their unblocked IP addresses if any.
After that, save the hosts file, then you can visit the Facebook site directly without any anti-censorship tools, but, you need to use "HTTPS" instead of "HTTP" in the URL, which means that you need to visit the facebook via the following URL:
A piece of cake, right?
But, if all the IP addresses of a site are blocked in your area (for example, all the Twitter IP addresses are blocked in China), you can't unblocked it by changing the hosts file.


I am Fida Hussain,a computer student from Pakistan. Right from the day one I was introduced to computers,I had a passion for Hacking and Information security. So,I started this blog in 2012 to share my views and ideas with the world.


  1. Thanks for sharing this valuable information to our vision.
    play game juegos de kizi online and play game jogos de friv

    play game jogos friv and i like play game click jogos online free and play game juegos pou

    play game juegos de terror online and play game jogos gratis online and play game unblocked games online

  2. Thanks a lot for sharing such a good source with all, i appreciate your efforts taken for the same. I found this worth sharing and must share this with all..Pls visit us: - See more at:
    happy wheels
    super mario bros

  3. Sure, this is very helpful information. Thank you for sharing.



Security Learner's Blog

Designed by Fida Hussain
This content is DMCA Protected.Copying or reproducing of procedure is prohibited.Do Not Copy!!