Advertisement
sounden

Add DNS entry for Facebook in Mac OS X

Oct 11th, 2012
2,085
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Issues with reaching www.Facebook.com? (by @sounden)
  2. # As it seems the Anonymous is haxoring the DNS again.
  3. # This could be fixed by adding this IP manually to your computer, for now.
  4.  
  5. # start the Terminal App in Mac OS X and copy/paste the line below
  6.  
  7. $ sudo sh -c "echo '69.171.237.16 www.facebook.com' >> /etc/hosts"
  8.  
  9. # the /etc/hosts file is a protected file so the command line will ask for you password
  10. # NOTE! This is just a quick-fix and this line will be removed later on everything is back to normal
  11.  
  12. # This will reverse the process as described above, i.e. remove the last line.
  13. # NOTE! (only run it once!)
  14.  
  15. # ONE LINE BELOW
  16. $ sudo cp /etc/hosts /tmp/hosts.bak; sudo /usr/bin/sed '$d' /etc/hosts > /tmp/hosts.new; sudo cp /tmp/hosts.new /etc/hosts
  17.  
  18. # if you want to check the content of the current hosts file type
  19. $ cat /etc/hosts
  20.  
  21. # if you want to check the original file
  22. $ cat /etc/hosts.bak
  23.  
  24. # Problems? mention me on Twitter @sounden
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement