Search squid archive

Re: Strange problem with Monkey HTTP Daemon, Squid 3 and localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 05 Oct 2010 16:13:12 +0200, SimÃn <simon@xxxxxxxxxxxx> wrote:
> Hi,
>      I have installed Squid 3.1.8 compiled from sources + Squid-Prefetch

> + Bannerfilter (http://phroggy.com/bannerfilter/) + Monkey HTTP Daemon 
> (http://www.monkey-project.com/) on Ubuntu 10.04 32 bits.
>      My squid config is:
> ââââââââââââââââââââââââââââââ
> 
>     acl manager proto cache_object
>     acl localhost src 127.0.0.0/8
>     acl localnet src 192.168.1.0/24
> 
>     acl to_localhost dst 127.0.0.1
>     acl to_router dst 192.168.1.1
> 
>     acl Safe_ports port 80
> 
>     http_access allow manager localhost
>     http_access deny manager
> 
>     http_access allow localnet
>     http_access allow localhost

Hmm, localnet and localhost unrestricted access.

> 
>     http_access deny !Safe_ports
>     http_access deny all

"deny !Safe_ports" does nothing that "deny all" does not also cover.

These equate to "http_access deny all"

> 
>     always_direct allow to_localhost
>     always_direct allow to_router

NP: you don't have any cache_peer entries. *everything* goes direct. Thus,
these config lines are useless.


> 
>     http_port 3128 transparent
> 
>     cache_mem 512 MB
>     cache_dir ufs /var/cache/squid 20480 16 256
>     coredump_dir /var/cache/squid
> 
>     url_rewrite_program /etc/squid/bannerfilter/redirector.pl
>     url_rewrite_children 10
> 
>     half_closed_clients off
>     server_persistent_connections off
>     client_persistent_connections off
> 
> ââââââââââââââââââââââââââââââ
> 
> Monkey HTTP Daemon listen petitions at 127.0.0.1:80
> Bannerfilter is configured to serve its replacement files (to replace 
> the ads) from http://127.0.0.1/bannerfilter/
> Well, this works but, and this is the strange, it works even if "Monkey 
> HTTP Daemon" is closed!! O_O

Are you getting the replacement banners? or the original ones?

Are you sure the URL re-writer is producing valid URLs? I just fixed a bug
where 3.x would not warn when it was dropping invalid URI.

And most importantly where is your contract with the website owner(s)
which permits you to alter their hosting service AUP?


> 
> I have cleared the Squid cache with:
> ââââââââââââââââââââââââââââââ
> 
>     sudo service squid stop
>     sudo rm -Rf /var/cache/squid/*
>     sudo squid -z
>     sudo service squid start
> 
> ââââââââââââââââââââââââââââââ
> But it still works without webserver!
> After, I have reset the PC (disabling "Monkey HTTP Daemon" start) and 
> Squid still works with Bannerfilter but without webserver!
> Moreover, I have modified several HTML files, in directory containing 
> the HTML and graphics files of Bannerfilter, but Squid shows the old
files!
> 
> I don't understand nothing. How can be this possible!?

web browser cache?
You are running "Monkey HTTP Daemon" on your web browser local host?

> 
> By other hand, I can't access to localhost directly from browser (with 
> or without "Monkey HTTP Daemon").

Of course. You are using a "transparent" interception proxy. "localhost"
and "127.0.0.1" and "[::1]" in the browser address bar on these setups
means the machine your browser runs on.
They only ever mean the proxy machine when the browser is configured to
pass requests to the proxy. Without performing it's own DNS on the URI
which would resolve them to itself.

Amos


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux