Help Fixing Terminal entry I made in Vietnam to access Facebook :(

Joined
Jul 23, 2011
Messages
18
Reaction score
0
Points
1
Hey i'm just sort of hoping someone on here knows how to fix this problem. I was in Vietnam and couldn't access facebook because the government blocks it, so to get around that I entered this into my Macbook Terminal:

-------------------------------------------------------------
1. Open Terminal app
2. Type in sudo pico /private/etc/hosts
3. Append following:

153.16.15.71 facebook.com
153.16.15.71 Welcome to Facebook - Log In, Sign Up or Learn More
153.16.15.71 apps.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 vupload.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 secure.facebook.com
153.16.15.71 connect.facebook.com
153.16.15.71 channel.facebook.com

-------------------------------------------------------------

I then saved it and wow, I had access to Facebook again. However, I am now back in North America and I think it's unecessary to have this entry saved in my terminal and it's kinda making my facebook loopy a bit (or maybe it's just in my head i dunno) either way I think it wouldn't hurt to try and re-alter that Terminal entry I entered above and make things back to normal. Can anyone give me the steps to just returning things back to normal and erasing that data? I don't want to screw up things more and i'm a novice when it comes to MAc still. Thanks !
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
1. Open Terminal app
2. Type in sudo nano /private/etc/hosts (or pico if you're still using that)
3. Delete following:

153.16.15.71 facebook.com
153.16.15.71 Welcome to Facebook - Log In, Sign Up or Learn More
153.16.15.71 apps.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 vupload.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 secure.facebook.com
153.16.15.71 connect.facebook.com
153.16.15.71 channel.facebook.com

save
or you could just replace the hosts file with the backup you should have made when you did this?
 
OP
R
Joined
Jul 23, 2011
Messages
18
Reaction score
0
Points
1
hey thanks for your reply. Unfortunately I made no backup, I hope that isn't a big problem. As for deleting that data, I typed in what you told me to and this came up:


153.16.15.71 apps.facebook.com
125.252.224.88 facebook.com
125.252.224.88 Welcome to Facebook - Log In, Sign Up or Learn More
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

##
# Host Database
#


So, as I mentioned i'm a novice at this stuff. I don't know how to delete that stuff, I tried highlighting it all and pressing delete but that did not work. Is there a command I need to type. Will it be safe to just delete all of it and leave it blank? Do I delete the "## Host Database #" too?

Cheers for the followup
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
I hate pico.. it's not on most machines I use so I never remember it. But I THINK that you delete an entire line in pico by putting the cursor there and hitting ctrl-k.

vi would be simpler for me to describe deletion (because I know it), but man.. no way I'd want you to try out the frustration that can be vi on a system file.
 
OP
R
Joined
Jul 23, 2011
Messages
18
Reaction score
0
Points
1
Ya i don't have any idea what Pico is. I don't use it and would like to avoid to unless necessary. Just want to fix this problem over terminal right now
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
pico is a text editor that was included with the pine email reader (Pine Is Not Elm, gotta love Unix naming). Nano is a clone of pico. The advantage they have over vi is a menu on the bottom that tells you basic commands. Vi has no such menu, you're expected to know how to use it to get into it.

In your case nano (or pico as they're pretty much identical) would be good. Before you start editing though.. do this.

sudo cp -p /private/etc/hosts /private/etc/hosts.bak

this will create a backup file before you start, so if something bad happens you can always copy that back to /private/etc/hosts
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Lots of work and easy to make mistakes. Just do this:

Replace your hosts file with the following:


##
# Host Database
#
# localhost is used to configure 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


The hosts file is in plain text. Use textedit or just copy and paste the above. Keep in mind though that hosts is read only....
 
Joined
Oct 19, 2013
Messages
1
Reaction score
0
Points
1
Access facebook in vietnam

I live in Vietnam, Many websites are blocked here, I'm using vpn to access all blocked websites, I bought my account from Buy Vpn Accounts at Saturnvpn It's really cheap and reliable, 1Month $3.3 , 3 Months $7, 12MOnths $16
Saturn vpn also has free trial, And yo can test the service before you pay.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top