Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hectic6

macrumors member
Original poster
Jul 22, 2009
79
0
Hi,

I'm working in china and twitter, facebook, youtube is ALL blocked here:mad:

I been reading some chinese websites that you can SSH and add host to access twitter. -> http://www.weiphone.com/viewthread.php?tid=422274

this is the instructions given but i have no idea how to add...:confused:

\private\etc\hosts
128.121.146.228 twitter.com
168.143.162.101 assets1.twitter.com
168.143.162.101 static.twitter.com
168.143.162.101 assets0.twitter.com
168.143.162.101 assets2.twitter.com
168.143.162.101 assets3.twitter.com
168.143.162.101 assets4.twitter.com

I just jailbreak recently in order to bypass china firewall to access these sites...Anyone have any good ideas any other ways or programs i can use to access twitter, facebook, and youtube...

thanks~!
 
i guess if they just block by DNS requests, then that would work.

Is it the SSH part, or the editing part you need help with, or everything lol?
 
Hey thanks for the reply boast!

I'm a total newbie in jailbreaking, had the iPhone 3G for a year since. But since this year (as I'm working in china), YouTube, facebook & twitter All been firewall. So I'm JB as I read on some Chinese sites that I could add hosts (Ssh) to access Twitter. Above are the instructions but I don't know how to edit them in ssh. Can u help me? Thanks!:)

Btw, do u know of any other programs or ways I can bypass the firewall to access YouTube & facebook? That would be GREAT!:D

Thanks!!
 
Hey thanks for the reply boast!

I'm a total newbie in jailbreaking, had the iPhone 3G for a year since. But since this year (as I'm working in china), YouTube, facebook & twitter All been firewall. So I'm JB as I read on some Chinese sites that I could add hosts (Ssh) to access Twitter. Above are the instructions but I don't know how to edit them in ssh. Can u help me? Thanks!:)

Btw, do u know of any other programs or ways I can bypass the firewall to access YouTube & facebook? That would be GREAT!:D

Thanks!!
SSH (SCP to be exact) is a means to transfer files. You would transfer the hosts file locally, make the changes and copy it back. Fugu is a good Mac app, not sure about Windows.


As for the Great Firewall of China, you shouldn't need a program, but a proxy server service. There are some out there altho I am not sure but some do have an accompanying application, such as Tor. This only works on your machine however and not your iPhone.
 
Hey thanks for the reply boast!

I'm a total newbie in jailbreaking, had the iPhone 3G for a year since. But since this year (as I'm working in china), YouTube, facebook & twitter All been firewall. So I'm JB as I read on some Chinese sites that I could add hosts (Ssh) to access Twitter. Above are the instructions but I don't know how to edit them in ssh. Can u help me? Thanks!:)

Btw, do u know of any other programs or ways I can bypass the firewall to access YouTube & facebook? That would be GREAT!:D

Thanks!!

whelp, first you want to turn on wifi, and openssh, and connect to your local network.

Next you will want to get the IP address of the device. You can check your settings to see the IP it was given, or use sbsettings on your device which tells you the IP address.

Third, you want to open Terminal on your mac. Then you type
Code:
ssh ipAddress -l root
editing the ipAddress part with, you know, the IP lol. It will ask about some authenticity, say yes. Then it will then ask you for the password. And it should be "alpine" unless you have personally changed it.

Fourth, type in
Code:
nano /private/etc/hosts
which will open up an editor. Paste all those address things on there. You use "ctrl + o" to save it, and then "ctrl + x" to exit nano.

Then type in "reboot" and hope it works. :)
 
hey thanks the help boast!

but its didn't work...i found the hosts file in when i SSH in iphone -> private/etc

and i use MS word to add in these under the last line ->

##
# 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
202.106.1.2 www.facebook.com
128.121.146.228 twitter.com
128.121.146.228 www.twitter.com
128.121.146.101 assets0.twitter.com
128.121.146.101 assets1.twitter.com
128.121.146.101 static.twitter.com
128.121.146.229 assets2.twitter.com
128.121.146.229 assets3.twitter.com
65.74.185.41 twitter.zendesk.com
65.74.185.41 help.twitter.com
203.208.33.100 www.youtube.com
203.208.33.100 gdata.youtube.com
128.121.146.228 twitter.com
203.208.39.104 wlfs.blogspot.com
203.208.39.104 www.bogger.com
203.208.39.104 www.youtube.com
203.208.39.99 upload.youtube.com
203.208.39.99 insight.youtube.com
203.208.39.160 help.youtube.com


did i add it wrongly? doesn't seem to work...

thanks!
 
i use MS word to add in these under the last line
Whoa! Talk about overkill! Try using a plain text editor. TextEdit on the Mac, Notepad on Windows.

did i add it wrongly? doesn't seem to work...
So what exactly happens?
And you do not that all those 203.208.39.x IP addresses are for Google, right?
 
Whoa! Talk about overkill! Try using a plain text editor. TextEdit on the Mac, Notepad on Windows.

File is corrupted when i use wordpad on my windows laptop:eek:. Google it, there are problems on some. i had to use MsWord to edit my lockinfo screen for it to work. see -> https://forums.macrumors.com/newreply.php?do=newreply&p=8145161

Doing a quick search I've found others referencing that wordpad can corrupt .js files so that was probably what was happening. If MS word is working and allowing you to edit the .js files without corruption you can always stick with that. I would just make sure you always make a backup of whatever file you are about to work on, that way if it ever gets corrupted again like your config.js file, you can just retry with another copy from your backup.

Personally I prefer to edit things directly on the device from my computer. I SSH from my MacBook Pro and then edit with vim. Though you may not want to do that unless you are familiar with vi and terminal.

As aidricksdad said there is always iFile, if you don't mind editing the files on your iPhone with your iPhone, that is always one way to go as well.



So what exactly happens?
And you do not that all those 203.208.39.x IP addresses are for Google, right?

i Tried all on my windows laptop, doesnt seem to work...i think ALL IP HOSTS are block by the Great China Firewall now...:mad::mad:

Seems my only way is to set up a VPN ....:eek:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.