Monday, August 23, 2010

A Standard Tor Install on Ubuntu Linux

I have been playing with this for months. A Linux newbie who has just installed Ubuntu, and wants to have Tor for own secure web browsing with Firefox and make their copy of Tor volunteer as a ‘Bridge’ that (hopefully) helps users in countries that have blocked Tor to access information censored by the state – may find this article helpful.

Read more about the Tor Software and the Tor Network. https://www.torproject.org and https://blog.torproject.org 

The official guide for Debian/Ubuntu Linux is already very exhaustive, but I think it would make the Vidalia part easier by also incorporating tips elsewhere. My current versions of softwares involved in this case are:

I already have:
          Ubuntu 10.04.1 Lucid Lynx (installed on my hard drive)
I need to install the following in this guide:
          The latest stable version of Tor I want to install (0.2.1.26) 
          TorButton for Firefox 
          For graphical control, I also need the latest stable version of
Vidalia (0.2.9)

Now let’s kick start. (first connect to the internet of course :D )

For Part 1-4 please see official guide for details. I only include brief notes and command line (Terminal) records here.

# 1. Install Tor

# Open Terminal. (Applications –> Accessories –> Terminal  OR  Ctrl+Alt+T) When you see a prompt like ‘kent@kent-laptop:~$ ’, enter the following command to edit your software sources file which is /etc/apt/sources.list with super user privileges (gksudo) the window-based text editor gedit.

gksudo gedit /etc/apt/sources.list

# For the sake of brevity, commands like this will be shown below as :

kent@kent-laptop:~$ gksudo gedit /etc/apt/sources.list

# where you only type the part after ‘kent@kent-laptop:~$’, and hit enter.

# In the gedit window that comes up, add a new independent line anywhere with this content,

deb http://deb.torproject.org/torproject.org lucid main

# Save and exit

# Back to the Terminal, we want to import a key thing, run command:

kent@kent-laptop:~$ gpg --keyserver keys.gnupg.net --recv 886DDD89

# which returns:

gpg: directory `/home/kent/.gnupg' created
gpg: new configuration file `/home/kent/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/kent/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/kent/.gnupg/secring.gpg' created
gpg: keyring `/home/kent/.gnupg/pubring.gpg' created
gpg: requesting key 886DDD89 from hkp server keys.gnupg.net
gpg: /home/kent/.gnupg/trustdb.gpg: trustdb created
gpg: key 886DDD89: public key "deb.torproject.org archive signing key" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

# we then follow by:

kent@kent-laptop:~$ gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

# which returns:

OK

# And then,

kent@kent-laptop:~$ sudo apt-get update

# When the list finished generating,

kent@kent-laptop:~$ sudo apt-get install tor tor-geoipdb

# installation will start, ansewer ‘Y’ when prompted. When installation is finished, check whether a tor process is running by looking up its process ID:

kent@kent-laptop:~$ pidof tor

# which should return a 3- or 4-digit number.

# 2. Configure polipo 

# Then download https://svn.torproject.org/svn/torbrowser/trunk/build-scripts/config/polipo.conf to your home folder (‘~’). Let it replace the existing polipo configuration file /etc/polipo/config (There are two consecutive commands here below)

kent@kent-laptop:~$ sudo cp /etc/polipo/config ~/polipo.config.backup
kent@kent-laptop:~$ sudo cp ~/polipo.conf /etc/polipo/config

# Save all your other work and restart:

kent@kent-laptop:~$ sudo shutdown -r now

# After this reboot, check that tor is running:

kent@kent-laptop:~$ pidof tor

# (which returns)

xxxx

(a 3- or 4-digit number)

# 3. Edit configuration file torrc  

# The following should deviate a bit from the official guide, making the use of Vidalia easier. Back in the Terminal, we want to create a password Vidalia can access Tor by: 

kent@kent-laptop:~$ tor --hash-password kingdom

# replace ‘kingdom’ with another password strong enough that you can think of (which returns)

Aug 22 02:26:57.858 [notice] Tor v0.2.1.26. This is experimental software. Do not rely on it for strong anonymity. (Running on Linux i686)
16:050611BAD67BDEAA6059CF0F8290E0A0BD9E2E8C12E3203F6888CB1546

## Copy and paste this long string after ‘16:’ to somewhere we can access later

###(Note: the following command-line record follows the above format, with comments and explanations which are only for you to read and should not be typed in, marked by ‘#’s at the beginning)

# edit the Tor configuration file torrc

kent@kent-laptop:~$ gksudo gedit /etc/tor/torrc

## In the gedit windows that pops up, we can do the make work of making tor work the way that suit our own needs. First we want to apply that hash password with a long string that we just find and Uncomment (remove the '#' before) the line 'ControlPort 9051'

## Two lines below, uncomment 'HashedControlPassword 16:EAA005966CF7BDF8290BAD0E0A0BD9E12E3203F6885061546112E8C8CB (or whatever this long string happens to be)'; replace EAA005966CF7BDF8290BAD0E0A0BD9E12E3203F6885061546112E8C8CB with 050611BAD67BDEAA6059CF0F8290E0A0BD9E2E8C12E3203F6888CB1546 (make sure this is pasted from the actual hashed password generated just now by the previous command ‘tor --hash-password ’)

## Under 'This section is just for relays, uncomment line 'ORPort 9001'; replace 9001 with 443

## Uncomment line 'ContactInfo Random Person <nobody AT example dot com>'; replace email address with your email address, leave ‘AT’ and ‘dot’ as they are

## At the end of file, uncomment line 'BridgeRelay 1' and 'ExitPolicy reject *:*'

## Save and exit

# 4. Check that configuration is correct

kent@kent-laptop:~$ tor --verify-config

Aug 22 02:45:05.237 [notice] Tor v0.2.1.26. This is experimental software. Do not rely on it for strong anonymity. (Running on Linux i686)
Aug 22 02:45:05.239 [notice] Choosing default nickname 'kentlaptop'
Configuration was valid

## Save your work and restart

kent@kent-laptop:~$ sudo shutdown -r now

...

# 5. Install TorButton

## Install TorButton in Firefox by googling... When done, apply tor in Firefox. Open https://check.torproject.org to make sure it is working.

# 6. Install Vidalia 

kent@kent-laptop:~$ sudo apt-get install vidalia
...
## When seeing a pop-up blue-in-colour text interface asking 'Let Vidalia start Tor after stopping existing Tor process:', Choose 'No'    
...

## installation should go on for a while. When finished, go to 'Applications -> Internet -> Vidalia'; in the upcoming 'Password Required' dialog box, type 'kingdom' (or the password you choose if you chose one), tick 'Remember my password', then 'OK'

## The Vidalia main panel should show that Tor is running now. :)  Click ‘Message Log’ in the main panel, it should show whether you are connected to the Tor network at least as a client, and whether your relay (as a bridge or public node)  is working (‘port reachability test successful/failed’).

Finally,

By all this we will have Tor as a process running in the background whenever your computer starts, Vidalia as a graphical control interface whenever we launch it ‘attached’ to this existing process. This bit of information comes from: https://trac.vidalia-project.net/wiki/FAQ#ExistingTor 

Also because we chose to be a tor Bridge relay, a very small volume of encrypted traffic must be handled by your computer and internet connection when your Bridge is used by someone. Unlike being a puclic exit node, this will not get you into trouble by making you the source of abuse or spam messages. If you still don’t want to be a bridge relay, edit /etc/tor/torrc file, and put a # mark before the line ‘BridgeRelay 1’ near the end of the file.

## Please note, that if you are behind a router sharing an internet connection with several others, chances are your relay (Bridge/Public) will not work in the first instance. Ask the person who have access to the router setting (which is usually with the LAN IP of ‘192.168.1.1’ or ‘10.0.0.1’) to set Port Forwarding properly for you, provided you are the only person that run tor behind this router. Forward your relay port 443 or 9001 to the internal IP that your computer is currently allocated, e.g. ‘192.168.1.x’.

Try restart Tor or computer. Hopefully your relay will work. If not, it might help talking to you ISP.

The client function that enables anonymous browsing would usually work better anyway. 

Other Sources

https://www.torproject.org/docs/tor-doc-unix.html.en 

https://www.torproject.org/docs/tor-doc-relay.html.en

Thursday, December 17, 2009

Reflections on a BBC Radio Programme about the Decade of Internet and Google

An insightful analysis of the age of the internet dominated by Google. Below is the web link to the programme where it is available for listening until 21st December 2009:

BBC Radio 4 – Defining the Decade, A Googling We Go 15th December 2009

As a new decade is coming near, we could not help but wonder what we have done and what we have experienced in the past ten years. So much of what the world has done in the last ten years has to be carried out via a screen, a keyboard, and the internet.

The programme recollects memories and interviews key e-entrepreneurs, Google employees as well as ordinary internet users who witnessed events and symbols that outline the growth and maturing of the internet since 1999: the millennium bug, the dot-com boom and bust, blogging, and Facebook. It touches upon topics such as the explosion of information that calls for powerful search engines, the internet as an extension of the real world, the internet censorship in China, the balance between sharing and protecting creativity, and our alarming yet growing dependence on machines to process information for us.

K.C.

Sunday, March 15, 2009

Silent Identity

To be honest, I wouldn't say I've done a very good job on my dissertation these days. Finding it hard to do all the transcriptions myself and summarise them in a shiny but logical way, I nevertheless enjoyed it. I'm amazed at the fact that all of my interviewees seemed puzzled when asked a short question, 'What is your cultural identity?'

'Fifty-fifty, maybe.'

They were born in the UK, or have immigrated here at a very young age with their Cantonese-speaking parents, and have been brought up in an English neighbourhood, sent to an English school, where they have made mostly English friends. I don't feel confident to comment on what they are, but I can feel that there is a trapped-in-the-middle dilemma there between two cultures, not considering, of course, any pressure they might feel at my presence, such as 'he loves to hear this', which I was unable to avoid.

One example of the Chinese-style humility, in a country where they are a minority, would appear to be the unreadiness to preach a 'Chineseness' to others: they keep it to themselves. They observed and learned a western social manner and take it very seriously in their own restaurants, and treat those with contempt who do not follow it or who have not learned to follow it. They seem to think that they have ventured, and have seen it all, and do not want to proclaim themselves 'king' of anything, but prefer to remain silent, invisible, anything rather than be seen as threatening or trouble-makers. I could notice myself influenced by it. I felt stupid and stopped sticking Chinese calligraphy works on to my own door, and have not found Chinese characters useful ever since, except at times when someone asks me for a Chinese version of their given name.

Among so many Chinese who are in this country because they are in a university of somewhere, I may not have the best talent needed to approach Chinese families, while some others may not think it's necessary to do so. But here I am doing this. Learning what they are may give a piece of thought about what you are, and boost your confidence in it.

Friday, April 11, 2008

je ne sais pas...

It never failed to interest me how quickly we picked up French in a top Chinese university, and how quickly we forgot that as well. The brightest minds of the country followed a textbook that was written in the 1980s, with still quite a lot of old red propaganda scarily noticeable. We managed to hire a teacher from southern France. He told me that people no longer use some of the phrases we're happily learning, such as 'il fait quel prix?' for 'how much is it?' You just simply say 'c'est combien...'

Fine. I still remember the day we had our speaking exam. Having acquired a number of tenses, I staggered from word to word looking for the right way to describe my friend, my interest, and where I live, trying to hide my embarrassment with just a smile. It was all so funny.

Thursday, April 10, 2008

Babel

Where it once appeared

The whole-world-speak-English future may be a mixed blessing. Despite all sorts of problems aroused related to culture, identity, minorities education and rights, language shift and death, bilingualism and diglossia... all of these studied by sociolinguists with hefty works, it creates, however, the possibility that people who speak different mother tongues can work together at all. A biblical imagination, not long after the story of Noah's ark:

And the whole earth was of one language, and of one speech.
And it came to pass, as they journeyed from the east, that they found a plain in the land... and they dwelt there.
...
And they said, Go to, let us build us a city and a tower, whose top may reach unto heaven...
And the Lord said, 'Behold, the people is one, and they have all one language... and now nothing will be restrained from them... '
(Genesis 11:1-6)

God apparently was not happy about this, and probably afraid of the power of one language.

'let us go down, and confound their language, that they may not understand one another's speech.'
So the Lord scattered them abroad from thence upon the face of all the earth: And they left off to build the city (Genesis 11:7-8)

so the project of the city and the tower was over. This is the origin of the name 'Babel', because God scattered us all over the earth.

Believe this story or not, it gives you a piece of Christian mind of the world. While many of our ancestral Chinese fought desperately to guard the country, and attempted to approach the world just by influence of merits, Missionaries came, centuries ahead of navy troops. Believing the world didn't use to be multilingual (perhaps), they were willing to learn our language and translate religious texts, and converted many to Christian.

References

The Holy Bible, authorised King James Version with an introduction and notes by Robert Carroll & Stephen Prickett, 1997, Oxford University Press. ISBN 0192835254

Romaine, Suzanne, 2000, Language in Society: An Introduction to Sociolinguistics (2nd Edition). Oxford University Press. ISBN 0198731922

who's language

where it once appeared Financial Time's full text

This was what I found when reading for my Cultural Identity course, though just a bit long to read. I experienced myself what the text reveals that is happening.

'By 2025 the number of English-speaking Chinese is likely to exceed the number of native English speakers in the rest of the world'

China

May 23, 2005 bookofjoe http://www.bookofjoe.com/2005/05/the_ascent_of_e.html

So said Gordon Brown, the U.K. finance minister, during a recent trip to China.

If we won't learn Chinese then the Chinese will simply do the heavy lifting and learn English.

It's as simple as that and it's happening.

The Financial Times is well aware of who's going to be ruling the planet in decades to come and is doing its level best to tell us, in our own language, how it's going to happen.

The Times article that follows, by Andrew Yeh, appeared on April 13, 2005.

It speaks for itself.

    New Dawn in a Shared Language

    Many more Chinese are learning English to further their opportunities, driving the market for education

    On a typical weekday morning, Gao Long retreats to a snow-covered park among the grey buildings of Beijing Normal University to practise English by herself.

    Several other students do the same.

    Some sit on benches mumbling over books while others saunter to and fro in sub-zero temperatures while reading aloud.

    They come to work on their spoken English and escape the cramped dormitories they share with many roommates.

    "You don't disturb anybody in the park because everyone is reading out loud," said Ms Gao, a bespectacled college undergraduate.

    "You have to rely on yourself - others can only give you a form or teach you certain ways but it's still up to you in the end."

    Ms Gao spends her time here reading passages from her heavily marked English text, stopping every now and again to perfect her pronunciation of tricky words such as "pesticide".

    As the weather warms up, she says, even more students from the college will come to the park to practise.

    There are countless Chinese youths with the same curiosity and drive as Ms Gao for mastering the English language.

    In a country imbued with the values of self-improvement, learning English is often viewed as one of the surest ways to improve one's career opportunities.

    And these attitudes are expected to yield significant demand for education-related products and services in the years ahead.

    China is a country that has historically placed great value on education. Yet its current fanaticism for learning English is unique.

    "It's a phenomenon," said Zhou Chenggang, a former BBC correspondent who is now vice-president of New Oriental, a private Beijing-based company that runs a network of English teaching services around the country.

    "The biggest motivation is that they know it will help their lives."

    In China today, the keenest students of English tend to be those cramming for foreign exams, with the aim of going abroad and winning scholarships.

    To do well on the Graduate Record Examination (GRE), a test of verbal, quantitative and analytical skills, for instance, a Chinese student must be familiar with up to 20,000 words.

    And someone taking the Test of English as a Foreign Language (TOEFL) needs to learn around 7,500 words, Mr Zhou estimates.

    Students in the capital, where the country's best universities are located, are known for reading and watching everything they can get their hands on.

    This hunger for learning is expected to generate huge growth in the market for English education products, which includes teaching services, textbooks, test preparation manuals, dictionaries and information technology products and services.

    The demand for classroom instruction has been increasing, too, though spending power in many Chinese cities remains limited.

    New Oriental estimated its total enrolment was 750,000 last year, up from 450,000 in 2003.

    And the demographic range of students is widening.

    Mr Zhou of New Oriental says that in the 1990s nearly all students learning English were preparing for specific foreign exams - such as GRE, TOEFL and the International English Language Testing System - to give them a chance to study abroad or raise their prospects of a job at a multinational company.

    These days those studying the language include children, older people and those with a general interest.

    English texts are now the fastest growing sector in China's book education market and account for up to 8 per cent of the retail book market, according to Xin Guangwei, a publishing industry researcher and author of Publishing in China.

    Numerous foreign education and publishing companies have been positioning themselves to cash in.

    Their success, however, will be determined by the extent to which they can access the market and how well they can outperform and co-operate with Chinese publishing houses.

    There is considerable Sino-foreign co-operation in the market for learning English. Oxford University Press and The Commercial Press, one of China's oldest publishing houses, together produce a bilingual English-Chinese pocket dictionary.

    Oxford University is also involved in producing English coursework materials for China's classrooms.

    Gunawan Hadi, Asia vice-president of McGraw-Hill Education, says his company has been working with Chinese publishers to develop English texts and reference materials.

    He adds that the company's China revenues have grown steadily in the past five years.

    Other foreign publishers such as Pearson Education and Cambridge University Press have also been trying to target the country's English enthusiasts.

    Gordon Brown, the UK finance minister, said during a recent trip to China that Britain's education exports were now the fastest growing export earner, having nearly doubled in five years to £10.3bn ($19.5bn) - equivalent to about 1 per cent of the country's gross domestic product.

    Mr Brown said that education exports would be vital to the UK economy - possibly reaching £20bn a year in 15 years time - and that China is expected to be the primary driver of growth.

    Many believe that China already has the world's largest number of people learning English.

    "In 20 years time, the number of English speakers in China is likely to exceed the number of speakers of English as a first language in all the rest of the world," Mr Brown said during a speech in Beijing.

    "I believe this is a huge opportunity."

    Those on the crest of the wave of learning are endlessly creative about study methods.

    Jessy Zhao, a 23-year-old from China's western Xinjiang region who is now studying for a Masters in education at the University of British Columbia in Vancouver, covered her dormitory room wall with memos with English words she wanted to remember.

    "There was a movie that I really liked a lot when I started to learn English, so I tape recorded the conversation and repeated it again and again just for fun," said Ms Zhao.

    Students can be particularly obsessive about memorising vocabulary. Maggie Cheng, a student of English at Beijing Foreign Studies University, recalls how someone from her home town was given two Oxford dictionaries by her family as study aids.

    She ended up using one as a reference guide and the other for memorising.

    "She would read a page and then rip a page - for a sense of accomplishment, I guess," Ms Cheng says.

    There are many study aids available to Chinese students.

    Aside from the internet and English books sold in stores, outdated foreign newspapers and magazines are often for sale at a discount from street vendors and underground hawkers.

    Ms Gao of Beijing Normal University has been studiously flipping through issues of Time magazine because the "stories are real rather than a sham", she writes in an e-mail.

    "I read every book I can, I'm very interested," explains Ms Gao, who spends long hours in the library.

    "I think books help broaden our modes of thinking and knowledge."

    ********************

    Cost and Complications Take Some of the Appeal Out of Studying Overseas

    Despite China's fascination with the west, the number of Chinese students heading overseas has been declining in recent years, while those returning have been on the rise.

    More than 114,600 students went abroad to study last year, down from 125,000 in 2002, according to statistics from China's education ministry.

    And in the last five years, the number of Chinese returning from overseas stints has been increasing, exceeding 25,000 last year.

    Many students are choosing to stay at home to avoid the cumbersome visa procedures associated with foreign travel and the heavy financial cost of studying abroad - in marked contrast to the trend of the 1990s.

    UK universities in particular have witnessed a significant drop in the number of postgraduate applications from China, as well as other Asian countries.

    But for many students, the returns they seek can only be met by leaving China, where the job market for young professionals is tight.

    English language skills, coupled with scarce expertise in a technical area, are seen as a combination for success.

    "I regard [learning English] as a key to open the door to another world in which there are different cultures and people I want to understand," says Annan Yang, a 23-year-old from Hangzhou, near Shanghai, who is studying for a PhD in biology at Johns Hopkins University in Washington.

    "It's a tool like a computer to get information," she explains.

    "Especially in science, if I want to know the development of a field, I must know English because the best magazines are in English."

    Gao Long, a student at Beijing Normal University, says she wants to go to the US since it represents fairness and better opportunities.

    A book she is now reading describes an American town where life is "in harmony with its surroundings".

    "It's an open country," says the 16-year-old.

    "In China, many jobs are based more on background. In America, people pay more attention to your ability."

Friday, April 04, 2008