Block domain, website, without waiting for localhost (hosts)

6

There is a related question here.
I can use Administrator, install extra software, whatever needs to be done.

My problem is:

  1. I can't block websites entirely. Like in AdBlock Plus, you add a rule like:

    ||fbcdn.net^
    ||google-analytics.com^
    ||facebook.com^
    

    You can't do that with hosts, you need one entry for every sub-domain, etc.

  2. This won't block, only redirects to localhost.

    Okay, it does the job, but it waits for the resources, so it takes time to recognize its not there.

Is there a way to do this?

Maybe some kind of app that makes the PC respond there is NO such thing, don't search / try?

Apache

Posted 2011-02-25T10:22:23.377

Reputation: 14 755

Addition: I have a legal susbcr to Avast IS but I don't use the firewall there. It's yet too primitive. Basically I want to have a blocker stuff. If you know a firewall like that, I'm willing to pay of course! – Apache – 2011-02-25T10:24:42.967

(Can't be even called firewall. I don't want to block applications or edit rules.. just block domain, IP, website.) – Apache – 2011-02-25T10:25:10.877

Good news, everyone! Avast 6 comes with the old url block. Yet it shows a HUGE picture instead of the blocked resource. Now that's quite.. annoying/useless. – Apache – 2011-02-25T11:39:22.363

Answers

2

Privoxy can do this, it allows you to customize it the way you want it to be...

Tamara Wijsman

Posted 2011-02-25T10:22:23.377

Reputation: 54 163

Hmmm I've been using privoxy ..but... if I use a proxy.. won't it disable my pipelining in Firefox for example? – Apache – 2011-02-25T17:41:17.283

@Shiki: Privoxy would handle each connection you create as another connection, and would open a new connection to the internet for each connection you make. So I don't think it would disable your pipelining. – Tamara Wijsman – 2011-02-25T18:29:15.800

0

The reason your HOSTS entries are taking so long is because you are redirecting them to the localhost, but you (probably) have no web server running on the localhost to answer, so you have to wait for the browser time-out.

Perhaps turn on IIS to answer the localhost requests, or set the HOSTS to redirect them to a fast site like google.com or alike instead of localhost.

Ƭᴇcʜιᴇ007

Posted 2011-02-25T10:22:23.377

Reputation: 103 763

0

You should redirect your entries in etc/hosts to something like

0.0.0.0
instead.

Or, you could install Proxomitron and add a header filter named:

URL: Kill domains

Specify the domains you want to kill in the URL Match: field to kill them. For example:

[^=?&]++microsoft.com/|[^=?&]++facebook.com/

And just put

\k
in the Replacement text: field.

TheNewbie

Posted 2011-02-25T10:22:23.377

Reputation: 561

But he doesn't want to do that for each sub domain. – Tamara Wijsman – 2011-02-25T16:49:10.693

I understand. But at least the delays will be gone, and no pages are served, from a local web server or anywhere. Hacking etc/hosts is a cool trick that many use wrongly, so I think the tip is still useful. – TheNewbie – 2011-02-25T17:33:55.873

Well its already better than the 127.0.0.1 method, thanks! – Apache – 2011-02-25T17:37:49.643