Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Mini::HowTo] Squid e squidGuard
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
cagnaluia
l33t
l33t


Joined: 01 Sep 2004
Posts: 998
Location: Treviso

PostPosted: Wed Apr 12, 2006 12:23 pm    Post subject: Reply with quote

Kernel78 wrote:
cagnaluia wrote:
....

Quello che chiedi tu non è parte del meccanismo di proxy quindi non devi puntare a farlo fare a squid ...
Ci sono molti pacchetti in portage che permettono di analizzare i log di squid e/o di creare dei report html a partire dai log, una volta che hai l'html puoi convertirlo in pdf e fare uno script che te lo invii via mail o farci quello che vuoi.


ok, pensavo fosse parte opzionale di squid.

me ne potresti indicare qualcuno di importante nel portage?

scusate l'OT....
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Wed Apr 12, 2006 12:41 pm    Post subject: Reply with quote

cagnaluia wrote:
me ne potresti indicare qualcuno di importante nel portage?

scusate l'OT....

Code:
* net-analyzer/sarg
     Available versions:  1.4.1-r2 2.0.8 ~2.1
     Installed:           2.0.8
     Homepage:            http://sarg.sourceforge.net/sarg.php
     Description:         Squid Analysis Report Generator

questo è il sw che uso io per generare report in html.
Se li vuoi in pdf ci sono un po' programmi che potresti usare (basta andare su packages.gentoo.org e fare una ricerca per pdf :wink: ) ma non avendoli mai usati non saprei consigliarti ...
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
cagnaluia
l33t
l33t


Joined: 01 Sep 2004
Posts: 998
Location: Treviso

PostPosted: Wed Apr 12, 2006 1:20 pm    Post subject: Reply with quote

va bene così, gia molto gentile! provo qualcosa e casomai posto le mie impressioni
Back to top
View user's profile Send private message
kattivo
Guru
Guru


Joined: 28 Jan 2005
Posts: 450
Location: Treviso

PostPosted: Wed Apr 19, 2006 4:23 pm    Post subject: Reply with quote

Una domanda..
Per usare squid come proxy remoto...
come posso impostare degli utenti , con delle password...?
_________________
Eurostep Consulting S.r.l.
Andrea P. <andrea@eurostep.it>
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Thu Apr 20, 2006 7:35 am    Post subject: Reply with quote

kattivo wrote:
Una domanda..
Per usare squid come proxy remoto...
come posso impostare degli utenti , con delle password...?

Non ho ben capito cosa intendi con "proxy remoto" ma per impostare degli utenti con le password puoi usare i metodi BASIC, NTLM o DIGEST.
Per informazioni basta guardare la documentazione di squid (o l'ottimo "squid-book oltre le faq" che è anche in italiano).
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
kattivo
Guru
Guru


Joined: 28 Jan 2005
Posts: 450
Location: Treviso

PostPosted: Thu Apr 20, 2006 9:10 am    Post subject: Reply with quote

Io volevo utilizzare squid come proxy da mettere su un server remoto ... e volevo metterli un nome utente e una password per fare in modo che possa utilizzarlo solo io..! Pero' non riesco a capire come è la forma da usare nel file squid.conf. volevo sapere come era la forma da mettere.. tutto qua . Ho trovato su squid.conf.default questo:

Code:

#                    use 'login=user:password' if this is a personal/workgroup
#                    proxy and your parent requires proxy authentication.
#                    Note: The string can include URL escapes (i.e. %20 for
#                    spaces). This also means % must be written as %%.
#
#                    use 'login=PASS' if users must authenticate against
#                    the upstream proxy. This will pass the users credentials
#                    as they are to the peer proxy. This only works for the
#                    Basic HTTP authentication scheme. Note: To combine this
#                    with proxy_auth both proxies must share the same user
#                    database as HTTP only allows for one proxy login.
#                    Also be warned this will expose your users proxy
#                    password to the peer. USE WITH CAUTION
#
#                    use 'login=*:password' to pass the username to the
#                    upstream cache, but with a fixed password. This is meant
#                    to be used when the peer is in another administrative
#                    domain, but it is still needed to identify each user.
#                    The star can optionally be followed by some extra
#                    information which is added to the username. This can
#                    be used to identify this proxy to the peer, similar to
#                    the login=username:password option above.


Ma non riesco a metterlo in pratica.. :( potete darmi una mano?
_________________
Eurostep Consulting S.r.l.
Andrea P. <andrea@eurostep.it>
Back to top
View user's profile Send private message
makoomba
Bodhisattva
Bodhisattva


Joined: 03 Jun 2004
Posts: 1856

PostPosted: Thu Apr 20, 2006 9:21 am    Post subject: Reply with quote

Code:
.....
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squidusers
auth_param basic children 5
auth_param basic realm Accesso al Proxy
auth_param basic credentialsttl 2 hours
....
acl squid_users proxy_auth REQUIRED
....
http_access allow squid_users
http_access allow localhost
http_access deny all

/etc/squid/squidusers lo crei con htpasswd di apache
_________________
When all else fails, read the instructions.
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Thu Apr 20, 2006 9:26 am    Post subject: Reply with quote

Premettendo che come sempre la risposta di makoomba è corretta mi chiedo perchè non ti andava bene dare un'occhiata allo "squid-book oltre le faq" che oltre ad essere in italiano tratta per bene anche l'argomento autentificazione.

Un bel RTFM direi che ci sta bene ...
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
kattivo
Guru
Guru


Joined: 28 Jan 2005
Posts: 450
Location: Treviso

PostPosted: Thu Apr 20, 2006 9:48 am    Post subject: Reply with quote

Ma sinceramente un occhio l'ho dato! pero' non ho trovato quella sezione.. hai per caso sotto mano il link ?
_________________
Eurostep Consulting S.r.l.
Andrea P. <andrea@eurostep.it>
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Thu Apr 20, 2006 9:53 am    Post subject: Reply with quote

kattivo wrote:
Ma sinceramente un occhio l'ho dato! pero' non ho trovato quella sezione.. hai per caso sotto mano il link ?
http://www.merlinobbs.net/Squid-Book/HTM/#CHA-AUTENTICAZIONE-UTENTI
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
kattivo
Guru
Guru


Joined: 28 Jan 2005
Posts: 450
Location: Treviso

PostPosted: Thu Apr 20, 2006 5:09 pm    Post subject: Reply with quote

Oki... sono riuscito...
mi è venuto in mente di unire due proxy.. " proxy cascade" è possibile farlo con squid ?
avendo due server con squid ovviamente... !
_________________
Eurostep Consulting S.r.l.
Andrea P. <andrea@eurostep.it>
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Fri Apr 21, 2006 7:34 am    Post subject: Reply with quote

kattivo wrote:
Oki... sono riuscito...
mi è venuto in mente di unire due proxy.. " proxy cascade" è possibile farlo con squid ?
avendo due server con squid ovviamente... !

Se ti leggi il manuale di cui ti ho postato il link trovi anche questo ... ti consiglio di leggerlo e postare domande se qualcosa non ti è chiaro, altrimenti faccio prima a postare qui il manuale :wink:
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
fabiolino
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2006
Posts: 103
Location: bologna

PostPosted: Tue Mar 27, 2007 6:56 pm    Post subject: Reply with quote

Kernel78 wrote:
Porca pupattola, squidGuard e squid non vogliono saperne di collaborare ...
Anche provando una configurazione minimalissima di squidGuard per bloccare tradedoubler riesco a farlo reindirizzare
[code]echo "http://hstit.tradedoubler.com/file/39024/registrazionedomini/HK-reg-120x600.gif - - GET" | $(which squidGuard) -c /etc/squidGuard/squidGuard.conf -d ...
...
come si può vedere il tentativo di accedere al banner di tradedoubler viene rediretto proprio come voglio io ma squid non mi tiene in considerazione, infatti il tentativo di aprire anche solo quella singola immagine me la mostra in tutto il suo splendore (si fa per dire) anche se ho aggiunto [code]redirect_program /usr/bin/squidGuard -c /etc/squidGuard/squidGuard.conf[/code] al file /etc/squid/squid.conf e ho controllato che sia le directory di configurazione e dei log di squidGuard e i file che contengono sia dell'utente squid e del gruppo squid.

Avete qualche suggerimento ?
:?


Non ho riportato tutto il testo per questioni di praticità.
Ho lo stesso problema! (squidguard da solo mi blocca l'accesso al sito desiderato con reindirizzamento corretto a una pagina web, ma in combinazione con squid non funziona.
Volevo sapere come Kernel78 ha risolto il problema visto che mi sembra non nè abbia fatto cenno.
Ringrazio anticipatamente.
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Tue Mar 27, 2007 9:03 pm    Post subject: Reply with quote

fabiolino wrote:
Volevo sapere come Kernel78 ha risolto il problema visto che mi sembra non nè abbia fatto cenno.

Dallo stesso messaggio che hai quotato:
Quote:
/EDIT2:ho scoperto che bisogna riavviare squid anche dopo aver modificato la configurazione di squidGuard, non è possibile rendere attive le modifiche di squidGuard senza riavviare squid ?

e qualche post dopo ho scritto il comando per ricaricare la configurazione (decisamente più efficente che riavviare squid)
Code:
/etc/init.d/squid reload


Hai trovato la discussione giusta per risolvere i tuoi problemi ma non hai letto abbastanza attentamente :wink:
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Fri Jun 05, 2009 11:59 am    Post subject: Reply with quote

Un utente della LAN mi ha chiesto di poter impostare dei periodi di grazia, ovvero, vorrebbe la possibilità di avere il filtro di squidguard disabilitato nell'orario di pausa dal lavoro.
Ho visto sulla guida ufficiale ed anche altrove che si possono impostare le seguenti cose:
Code:
time afterwork {
  weekly   * 17:00-24:00            # After work
  weekly   fridays 16:00-17:00      # On friday we close earlier
  date   *.01.01                    # New Year's Day
  date   *.12.24 12:00-24:00        # Christmas Eve
  date   2006.04.14-2006.04.17      # Easter 2006
  date   2006.05.01                 # Maifeiertag
}

Code:
acl {
        all within afterwork {
                pass all
        }
        else {
                pass    !adv !porn !warez all
        }
        default {
                pass    none
                redirect http://localhost/block.html
                }
}


Solo che io vorrei poter abilitare un singolo utente. Qui invece li abilita tutti.
E' possibile farlo?

Il mio squidGuard.conf è il seguente:
Code:
logdir /var/log/squidGuard
dbhome /etc/squidGuard/db
src ADMIN {
        ip 10.0.0.2
}
dest adult {
        domainlist adult/domains
        urllist adult/urls
        expressionlist adult/expressions
}
dest custom {
        domainlist custom/domains
        urllist custom/urls
        expressionlist custom/expressions
}
dest blog {
        domainlist blog/domains
        urllist blog/urls
}
dest onlinegames {
        domainlist onlinegames/domains
        urllist onlinegames/urls
}
dest instantmessaging {
        domainlist instantmessaging/domains
        urllist instantmessaging/urls
}
dest filesharing {
        domainlist filesharing/domains
        urllist filesharing/urls
}
dest proxy {
        domainlist proxy/domains
        urllist proxy/urls
}
dest forums {
        domainlist forums/domains
        urllist forums/urls
        expressionlist forums/expressions
}
dest warez {
        domainlist warez/domains
        urllist warez/urls
        expressionlist warez/expressions
}
dest audio-video {
        domainlist audio-video/domains
        urllist audio-video/urls
}
dest shopping {
        domainlist shopping/domains
        urllist shopping/urls
}
dest hacking {
        domainlist hacking/domains
        urllist hacking/urls
}
acl     #now we set the rules
{
        ADMIN    {
                pass all
        }
        default {       #querys from unknown sources
                pass !adult !custom !blog !forums !warez !audio-video !shopping !proxy
                redirect http://10.0.0.1/template.html          #denied queries will be redirected to this gif file.
        }
}


Vorrei essere sicuro della modifica che faccio perché siccome opero da remoto, non vorrei stare un'ora al telefono per chiedere se va!

Inoltre ho disabilitato la navigazione tramite IP con l'istruzione:
Code:
http_access deny justip

Però vorrei poter abilitare la navigazione tramite IP solo per un unico IP. Si può fare?
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Fri Jun 05, 2009 12:15 pm    Post subject: Reply with quote

io ti consiglio di documentarti sulle acl :wink:
_________________
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con
Code:
grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Fri Jun 05, 2009 12:31 pm    Post subject: Reply with quote

Ok,

dunque, per quanto ho capito, mi conviene definire prima:
Code:
src user1 {
    ip 10.0.0.5
}


Aggiungere
Code:
time workhours {
    weekly  mtwhf  08:00-13:00
    weekly  mtwhf  15:00-18:00
}


Poi modificare l'acl così:
Code:
acl
{
    ADMIN    {
        pass all
    }

    user1 within workhours {
        pass !adult !custom !blog !forums !warez !audio-video !shopping !proxy
            !filesharing !instantmessaging !onlinegames !hacking all
    } else {
        pass  all
    }


    default {
        pass !adult !custom !blog !forums !warez !audio-video !shopping !proxy
            !filesharing !instantmessaging !onlinegames !hacking all

        redirect http://10.0.0.1/template.html
    }
}


Giusto?

EDIT: RISOLTO, grazie!
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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