Access Blocked Facebook on Apple MacBook

Everyday I receive many emails in my inbox asking for ways to access blocked websites like Facebook and Twitter. It seems like more and more governments are blocking social networks to control the flow of information tightly. According to what I know, China, Vietnam, Iran, Uzbekistan, Pakistan, Syria and Bangladesh have already banned Facebook completely. Those are the reasons why people in these countries have to find indirect ways to access to Facebook.

I mentioned 7 ways to access blocked Facebook in a post last year and still update it regularly with working solutions. However, I forgot that those are tips for Windows only, so many readers have emailed me and told that they don’t know how to apply those tips for MacBook. I am sorry I can’t reply all your comments and emails, hopefully you will find this post useful. Check out the simple steps below to access restricted Facebook on Mac OS X.

Step 1: Open Terminal

We can open Terminal either by typing Terminal on the Spotlight, or by navigating to ApplicationsUtilitiesTerminal.

terminal-mac-os-x

Step 2: Edit Hosts File

The Hosts file is the text file mapping particular hostnames to certain IP addresses. When you type in a URL address on Safari, the system will check in the host files to see if there is a relevant entry. If there is, it will get the corresponding IP address, else it will move on to the DNS server to find the IP address.

Now we need to open the Hosts file to edit it. Type in the following command in the Terminal:

sudo nano /private/etc/hosts

Enter your administrator password when prompted.

The hosts file will be opened for editing.

Hosts-File-Mac-OS-X

Next, add following lines to the bottom of this file:

153.16.15.71 apps.facebook.com
125.252.224.88 facebook.com
125.252.224.88 www.facebook.com
153.16.15.71 login.facebook.com
153.16.15.71 graph.facebook.com
153.16.15.71 static.ak.connect.facebook.com
153.16.15.71 developers.facebook.com
153.16.15.71 error.facebook.com
153.16.15.71 upload.facebook.com
153.16.15.71 register.facebook.com
153.16.15.71 bigzipfiles.facebook.com
153.16.15.71 pixel.facebook.com
153.16.15.71 0.132.channel.facebook.com
153.16.15.71 1.132.channel.facebook.com
153.16.15.71 error.132.channel.facebook.com

Press control-O to save the file.

Step 3: Flush DNS Cache

To make the changes take effect, we then need to flush the DNS resolver cache. Enter the following command in the Terminal:

dscacheutil -flushcache

You now can exit Terminal and access Facebook like normal. Leave a comment below if you have any problem.

About Tuan Do

I am a professional blogger on TechWalls - Technology Blog since 2011. I write about anything related to technology and Internet. Wordpress blogging tips, technology and gadget news are my favorite topics. You can follow TechWalls to get my guide on making money from Wordpress blog.
Read my tips on how to access blocked Facebook.

Additional Resources

Subscribe

Receive Breaking News to your Inbox

Comments

  1. i tried following these steps and it seemed to work perfectly at first, but now the wifi is not working properly and in systems preferences -> network it says i’m connected using airport, but that ‘airport has a self assigned IP address and may not be able to connect to the internet’
    any suggestions?

  2. Phuong Nguyen says:

    Thank u for sharing :) but it did not work for cafeworld hichic

  3. worked like a charm, THANK YOU SOOOOOO MUCH!!!!!!! have been off fbook for almost 2 months and it was driving me crazy – you are a total legend!!! :-) :-D

  4. Hi Tuan,
    I don’t know why Facebook got blocked from my Mac even I’m in the States right now. I tried to follow your steps but I stuck with the step 3. I am not sure where to put the command, you mean right after the last line or what, because when I did so it does not really work and the Facebook page is shown as invalid URL.

  5. Trang Minh says:

    Hi Tuan,
    There is only text without any pictures :( :(
    The speed of loading fb is slow also

    • Hi Trang,
      I don’t know what’s the problem with your network. I can access Facebook very fast here with almost all ISPs in Vietnam.

  6. it didn’t work for me. I think you need to be clearer about what to do after you press control-O to save the file and where to paste ‘dscacheutil -flushcache’. I know you’ll probably say ‘in the terminal’ but i don’t know how to get out of the ‘File Name to Write: /private/etc/hosts’ section.

    • I was having the same problem. This is what you have to do:
      After control-O press “Enter” and the screen will change slightly signifying it has saved. Then follow the command at the bottom for Exit which is ^X (press ctrl+^+X) and it should exit back to the terminal. Then type in dscacheutil -flushcache and press “Enter” again and then you can close it and everything will work. I hope that helps.

  7. God bless you!! My vpn stopped working, and now I can access it by following your steps. Everybody that has a mac should give this a try! Thank you Tuan Do!

  8. I did all the steps on my macbook and it worked. However, I did the same to my grandma’s macbook but I messed it up. I tried resetting it, so I deleted the codes, including the below code and I saved it.

    ##
    # Host Database
    #
    # localhost is used to configue the loopback interface
    # when the system is booting. Do not change this entry.
    ##
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost

    Facebook still comes up, but only the homepage. If I click on anybody’s profile, or I click on a picture, it is blocked. I don’t know what to do and I am scared my grandma will be angry at me!! What did I do wrong?? I also did not create any back up.

    Please try to reply soon. Thank you

  9. I realised that I have to keep putting “s” into the http so that the website comes up. When I click on a profile on facebook, it makes facebook become unsecure. what can I do to solve this so that facebook remains on “secure” at all times?

  10. Now I cannot upload photos anymore. why is that? Please help!!

  11. How do you change it back? I am back to the US and would like to change my settings back to what they were before. Thanks!

  12. Everyone who can't put in your password - READ THIS! says:

    For those of you that cannot type in your password in terminal, there is a simple reason for this – ANY password terminal asks you to enter will not display, this is for your own security (so anyone near you that may be watching won’t be able to see what your password is). Just go ahead and type your password in like you normally would and hit enter when you are finished. You won’t see it, but that’s okay :D

    Tuan, you should make this info available in your instructions as a lot of people don’t seem to realize that this is just a part of how Terminal works. Cool article by the way, I’m sure it will help a ton of people!

  13. Tuan,

    This worked great when I was in Vietnam, however, I am no longer there and my facebook is doing funny things ex. cannot upload pics, how do I revert back to my original settings?!?! Thanks a lot

  14. remember when you leave vietnam china etc to PUT IT BACK THE WAY IT WAS! i didn’t and my facebook was broken for two months. couldn’t upload photos and notifications wouldn’t refresh they would just bank up. this definitely works but don’t leave your terminal like this.

  15. Hi Tuấn,

    Could you pls help to instruct the last step : Flush DNS cache, I copied the words and copy down below the lines….but when I want to exit, it prompt me asking that ‘are u sure to exit, otherwise all information will be erased ??

Speak Your Mind

*

Switch to our mobile site