LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > LinuxQuestions.org > LQ Suggestions & Feedback
User Name
Password
LQ Suggestions & Feedback Do you have a suggestion for this site or an idea that will make the site better? This forum is for you.
PLEASE READ THIS FORUM - Information and status updates will also be posted here.

Notices


Reply
  Search this Thread
Old 09-16-2014, 11:08 AM   #16
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367

To test it, ping those hosts and see if it resolves to the loopback - if it doesn't you've not added those in the right place. Also try adding "www." variants for some of those lines.

Code:
127.0.0.1 google.com
127.0.0.1 www.google.com
127.0.0.1 ajax.googleapis.com
127.0.0.1 google-analytics.com
127.0.0.1 www.google-analytics.com
127.0.0.1 googlesyndication.com
127.0.0.1 www.googlesyndication.com
This is what I've get when pinging google.com with those lines in /etc/hosts:

Code:
$ ping google.com
PING google.com (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.243 ms
(Note IP address - if you see something other than the loopback address, then you've not configured your hosts correctly)

Note: If you're connected using a proxy, then your /etc/hosts is being bypassed anyway. In that case use a mozilla browser and install requestpolicy and just deny requests to the google hosts.

Last edited by cynwulf; 09-16-2014 at 11:20 AM.
 
Old 09-16-2014, 05:37 PM   #17
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Ok, I'm getting there. How's this??

pedro@pedro-bedro2:~$ ping -c 5 google.com
PING google.com (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.047 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.046 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.054 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.044 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.048 ms

--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3997ms
rtt min/avg/max/mdev = 0.044/0.047/0.054/0.009 ms

If you could just point me at 'requestpolicy' How do I get it??

Sometimes I use astrill as my vpn, but usually I don't start it, as things go slower. Just some things are totally blocked and if you want to read them, then you need a vpn.
I always use Firefox.

Last edited by Pedroski; 09-16-2014 at 05:38 PM.
 
Old 09-17-2014, 03:30 AM   #18
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
According the ping output google.com should be blocked.

If you use firefox, just go into the addons manager, search for it and install it as you would any other add on...
 
Old 09-22-2014, 05:33 PM   #19
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
requestpolicy blocks a bit too much. Even reddit.com would not load. I'm not sure how to get it to leave the things that I want alone.

I'll have to work on that!
 
Old 09-23-2014, 06:48 AM   #20
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
It's very easy. Click the red flag and just allow what you want to allow... or don't use it...
 
Old 09-25-2014, 03:12 AM   #21
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Just to let you know: things are really loading faster now that I have modified hosts. Do you know where I can read up on how that works? Or is there a very simple explanation?

My collegues who use windows here are jealous! I don't suppose win has a 'hosts' file.
 
Old 09-25-2014, 07:10 AM   #22
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
The hosts file pre-dates DNS. You can read all about it: https://en.wikipedia.org/wiki/Hosts_%28file%29

Windows has a hosts file, usually to be found in \windows\system32\drivers\etc\
 
1 members found this post helpful.
Old 10-18-2014, 06:19 PM   #23
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by cynwulf View Post
Windows has a hosts file, usually to be found in \windows\system32\drivers\etc\
Hmmm... Even Windows recognizes the need for /etc/!!!

But back to the topic- would Tor be an option?
 
Old 10-18-2014, 07:18 PM   #24
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
From what I read, the government has cracked down heavily on Tor, making it more difficult to use than elsewhere. That is only second-hand information though. I have only tried Tor a couple times two or three years ago. I could not configure it properly on my then Debian system. At the moment, I am wondering if a VPN is a better option. Of course, that requires more knowledge than I currently possess. I need to learn though, because they are going crazy with blocking things. Not only are Ixquick and DuckDuckGo banned, but BBC news was banned when the protests in Hong Kong became more "energetic."
 
Old 10-18-2014, 07:29 PM   #25
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
If the requested page has links to unauthorized site then that is how China blocks them. It has nothing to do with your computer. Tell the government of China to stop.

While I've always been a fan of a good hosts file I believe it will do little in this case.

You'd be better off with a text only browser in my opinion to access LQ.

To be specific, there is an order that linux can access name lookups. It can be changed. Most default would be hosts file but any proxy.pac type or other proxy configs would generally avoid all that.
 
Old 10-18-2014, 08:10 PM   #26
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Quote:
Tell the government of China to stop.
And their response would be, "Yes Sir! Right away! Sorry for the inconvenience."
 
Old 10-19-2014, 03:13 PM   #27
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Could an external proxy server, like these bypass the censorship?
 
Old 10-20-2014, 08:03 AM   #28
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Probably, but the problem is getting one. Clicking your link for example:
"The network link was interrupted while negotiating a connection. Please try again."
In other words, blocked. Almost every website that has anything to do with proxies or VPNs is blocked.
 
Old 10-20-2014, 04:10 PM   #29
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by Pedroski View Post
China is waging war on google at the moment. Even with a vpn, it is not easy to connect. Without, you cannot access gmail or google search at all.

China is getting tricky and 'sees' the vpn. astrill.com is unreachable, unless you have astrill already installed and then you might need stealth mode.

I would like to suggest to the mods that they think about cutting out links to google advertising if the ip is China, then linuxquestions.org might load before the 22nd century! People in China need linuxquestions too!

Thanks!
I think everyone here is familiar with Anonymous...and I'm pretty sure they've overcome getting to Google from China.

Their Uber Secret Handbook suggests loads of ways to cloak yourself online, try a few out.
http://zinelibrary.info/files/Anonym...erHandbook.pdf
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Google says China disrupting e-mail service Jeebizz Linux - News 0 03-21-2011 10:28 AM
Google says China licence renewed by government Jeebizz Linux - News 1 07-17-2010 04:13 AM
LXer: Google hurts own foot kicking China in the Android nuts LXer Syndicated Linux News 0 01-20-2010 12:20 PM
LXer: Google to China: We've Had Enough LXer Syndicated Linux News 0 01-13-2010 10:30 AM
LXer: Google China's open source ambitions LXer Syndicated Linux News 0 09-20-2006 09:54 PM

LinuxQuestions.org > Forums > LinuxQuestions.org > LQ Suggestions & Feedback

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration