blocking some sites

I want to block a few sites like
ads.adbrite.com
ad.yieldmanager.com
I want to use scripting to keep it lightweight. Please assist me.

Can’t you manage it from a hardware firewall?
If you have one.?

Cross_AM schrieb:
> I want to block a few sites like
> ads.adbrite.com
> ad.yieldmanager.com

Depends on what you mean by “block”.

A simple trick would be to add the hostnames to /etc/hosts with an address
of 127.0.0.1. That way, all attempts to access them would be redirected
back to your own machine, which would presumably respond with something
like “connection refused” or “404”.

Another way would be to block the corresponding IP addresses in your
firewall.

> I want to use scripting to keep it lightweight. Please assist me.

Hmmm. What do you mean by that? What do you want to script, and why do you
think that would be particularly lightweight? In general, static solutions
(like those I sketched above) are more lightweight than “active” ones like
scripting.

HTH
T.

caf4926 wrote:

> If you have one.?

I do not have one.

Tilman Schmidt wrote:

> Depends on what you mean by “block”.
Well those ad sites come embedded in web pages of other sites. So I want
those web pages to load but these ad sites to be blocked.

Static solutions are even better no doubt. But I think these ad sites shall
form a long list. I am not sure if I should put all in the hosts file with
redirection to localhost.

add-blocking can be done with extentions in FF

and a text file can be added to K

Cross_AM schrieb:
> Tilman Schmidt wrote:
>
>> Depends on what you mean by “block”.
> Well those ad sites come embedded in web pages of other sites. So I want
> those web pages to load but these ad sites to be blocked.

There are specialized applications for ad-blocking, such as the Ad Block Plus
plugin for Firefox, which do that job better than if you try to enumerate and
block ad servers on the network level.

> Static solutions are even better no doubt. But I think these ad sites shall
> form a long list. I am not sure if I should put all in the hosts file with
> redirection to localhost.

Putting a long list of hostnames in /etc/hosts is not a problem. Maintaining
it up to date is. So I think you’ll be better off using one of the existing
ad blockers which have already solved that problem for you.

HTH
T.

Tilman Schmidt wrote:

> There are specialized applications for ad-blocking, such as the Ad Block
> Plus plugin for Firefox, which do that job better than if you try to
> enumerate and block ad servers on the network level.
I already have it installed. Yet FF accesses sites like the following.
ad.yieldmanager.com
ads.adbrite.com

Tilman Schmidt wrote:

> Putting a long list of hostnames in /etc/hosts is not a problem.
> Maintaining it up to date is. So I think you’ll be better off using one of
> the existing ad blockers which have already solved that problem for you.
Well another reason why I wanted a script was that it gives me the choice to
turn it off and on.

On 08/04/2008 Cross_AM wrote:
> I already have it installed. Yet FF accesses sites like the following.
> ad.yieldmanager.com
> ads.adbrite.com
>

Why don’t you add those to the adblock list? Adblock can be turned on/off with a middle click on the icon.

Uwe

I think the possible approaches to solve this would make a very good guide in a forum How-To or Tip & Trick or openSUSE wiki. I suspect many parents would be interested in setting this up.

Any volunteers to create such a guide?

Uwe Buckesfeld wrote:

> Why don’t you add those to the adblock list?

I have already done that but adblock plus works under FF and that way I
can’t block the sites from being accessed by other applications. I am not
sure but may be it can be done by configuring the firewall (don’t know how
to do that yet).

OIC. Just add them to your hosts file:

ad.yieldmanager.com 127.0.0.1

You get the picture.
Uwe

Uwe Buckesfeld wrote:

> You get the picture
Yes I do. Thank you.