Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ad-blocking with your hosts file
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3392

PostPosted: Fri Mar 10, 2006 10:42 am    Post subject: Reply with quote

:!: Be sure always check the (auto-updated) hosts-file for non-127. IPs. Otherwise an attacker can offer an adblock-service and if you use this he can change the IP from the website off your bank to his IP, simulate the bank-website and fish your inputs (= your money)
Back to top
View user's profile Send private message
Bigun
Veteran
Veteran


Joined: 21 Sep 2003
Posts: 1805

PostPosted: Wed May 24, 2006 12:09 pm    Post subject: Reply with quote

*bookmarked*
_________________
Sadhu Sundar Singh - responding to Darwinian Evolution - "...but I am more interested in Divine Selection and survival of the unfit"
Back to top
View user's profile Send private message
HeXiLeD
l33t
l33t


Joined: 20 Aug 2005
Posts: 892
Location: online

PostPosted: Sat May 27, 2006 5:22 pm    Post subject: Reply with quote

I have noticed one thing when using vmware, and that is that the linux hosts file does not block anything for vmware OS's.

am i wrong or its just my setup ?

what i mean is:
gentoo uses eth0 to connect to the internet and if i have; lets say http://support.microsoft.com in /etc/hosts, gentoo cannot connect to it as expected.

now i have vmware using eth0 in a promiscous mode and if i open the same url in any vmware operating system i get access to the page. In other words, vmware doesnt read /etc/hosts from linux.

Is there a way of changing this to make it read the linux hosts?

I have also started a topic here that in some way is kinda related to this question.
_________________
443640
My UNSOLVED TOPICS
How to ask questions
Configs & Hardware SPECIFICATIONS
Back to top
View user's profile Send private message
Bigun
Veteran
Veteran


Joined: 21 Sep 2003
Posts: 1805

PostPosted: Sat May 27, 2006 5:58 pm    Post subject: Reply with quote

You may have to change the hosts file in the VM.
_________________
Sadhu Sundar Singh - responding to Darwinian Evolution - "...but I am more interested in Divine Selection and survival of the unfit"
Back to top
View user's profile Send private message
HeXiLeD
l33t
l33t


Joined: 20 Aug 2005
Posts: 892
Location: online

PostPosted: Sat May 27, 2006 9:34 pm    Post subject: Reply with quote

yes i know. but the point was to use one hosts file only in linux to filter everything.
_________________
443640
My UNSOLVED TOPICS
How to ask questions
Configs & Hardware SPECIFICATIONS
Back to top
View user's profile Send private message
Archangel1
Veteran
Veteran


Joined: 21 Apr 2004
Posts: 1212
Location: Work

PostPosted: Tue Jun 06, 2006 10:16 pm    Post subject: Reply with quote

I suspect it bypasses the Linux hosts file, so yes, you'd have to change the VM one.
What about if you use a different form of networking? I forget what it's called, but there's one where it has to communicate through the host rather than appearing to be on the network itself. That might turn the trick.
_________________
What are you, stupid?
Back to top
View user's profile Send private message
Bigun
Veteran
Veteran


Joined: 21 Sep 2003
Posts: 1805

PostPosted: Thu Aug 31, 2006 4:57 pm    Post subject: Reply with quote

*bookmarked*
_________________
Sadhu Sundar Singh - responding to Darwinian Evolution - "...but I am more interested in Divine Selection and survival of the unfit"
Back to top
View user's profile Send private message
HeXiLeD
l33t
l33t


Joined: 20 Aug 2005
Posts: 892
Location: online

PostPosted: Wed Apr 28, 2010 4:59 am    Post subject: Reply with quote

My current update is available here with 137.535 entries.
It's a new archive and with wiki page.
_________________
443640
My UNSOLVED TOPICS
How to ask questions
Configs & Hardware SPECIFICATIONS
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3392

PostPosted: Wed Jun 09, 2010 9:02 am    Post subject: Reply with quote

Jesse wrote:
Is this really sane? It slows my webbrowsing to an utter crawl.


Install a small Webserver on 127.0.0.1 and point the document root to a empty directory. This is fast, because the browser get a 404 directly.
Back to top
View user's profile Send private message
Chiitoo
Guru
Guru


Joined: 28 Feb 2010
Posts: 521
Location: Finland

PostPosted: Thu Dec 30, 2010 4:12 pm    Post subject: Reply with quote

KenTI wrote:
i use both opera and firefox, and when i was using privoxy (with the default configuration still, i wasn't able to manage tweaking it :oops: ) i noticed that privoxy really slowed down browsing

now using opera just with the hosts filter works even faster than firefox, it is a bit complicated to look up for the url of each banner (especially for flash, with adblock you just have to click on the label that appears on the side of the ad)

I realize the age of the post I'm quoting (is from 2004), but I thought I'd mention this snippet from the FAQ at the Privoxy website, which helped me and might help someone strolling around here some day!

http://www.privoxy.org/faq/trouble.html#GENTOO-RICERS wrote:

5.23. I compiled Privoxy with Gentoo's portage and it appears to be very slow. Why?

Probably you unintentionally compiled Privoxy without threading support in which case requests have to be serialized and only one can be served at the same time.

Check your "USE" flags and make sure they include "threads". If they don't, add the flag and rebuild Privoxy.

If you compiled Privoxy with threading support (on POSIX-based systems), the "Conditional #defines" section on http://config.privoxy.org/show-status will list "FEATURE_PTHREAD" as "enabled".

Btw., only now I noticed the #GENTOO-RICERS haha!


Anyways, I hope this helps!
Works nicely for me. :]
_________________
Kind Regards,
The Noob Unlimited

~sore wa sore kore wa kore~
Back to top
View user's profile Send private message
user
Tux's lil' helper
Tux's lil' helper


Joined: 08 Feb 2004
Posts: 102

PostPosted: Thu Dec 30, 2010 5:40 pm    Post subject: Reply with quote

Or use own dns resolver for blocking ad domains.

1) download http://pgl.yoyo.org/adservers/serverlist.php?hostformat=bindconfig;showintro=0
2) save it to /etc/bind/named.adservers.conf
3) strip html header/footer
4) add include directive to /etc/bind/named.conf
include "/etc/bind/named.adservers.conf";
5) restart your dns resolver
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3392

PostPosted: Fri Dec 31, 2010 9:29 am    Post subject: Reply with quote

user wrote:
Or use own dns resolver for blocking ad domains.

1) download http://pgl.yoyo.org/adservers/serverlist.php?hostformat=bindconfig;showintro=0
...

to add all with 127.0.0.1 to /etc/hosts simply do:
Code:
lynx --dump "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=bindconfig;showintro=0" | grep "^zone " | cut -d "\"" -f 2 | while read host ; do echo "127.0.0.1 $host" >> /etc/hosts ; done
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3745
Location: sleeping in the bathtub

PostPosted: Sun Jan 02, 2011 2:40 am    Post subject: Reply with quote

Something else you can do, block via ip address using iptables with ipsets, www.bluetack.co.uk has some extensive lists, not just for blocking adds but potentially hostile or privacy-invading hosts too.

I have that along with dnsmasq with a large hosts file (as discussed in this thread) and privoxy (which blocks most adds for me anyways) on my router.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
HeXiLeD
l33t
l33t


Joined: 20 Aug 2005
Posts: 892
Location: online

PostPosted: Sat Dec 31, 2011 2:13 am    Post subject: Reply with quote

Updated today with 294278+ entries @ http://nixbits.net/wiki/Hostsfile
_________________
443640
My UNSOLVED TOPICS
How to ask questions
Configs & Hardware SPECIFICATIONS
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum