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

Re: Acl i Squid



Gràcies, això ha funcionat perfectament.

Salut!




2007/6/12, Marc Torres <sarinyo@gmail.com>:
Iep, ja tinc com ho podries fer:

acl permesa rang_ip
acl limitada rang2_ip
acl webs_permeses url_regex -i "/foo/bar"

http_access allow limitada webs_permeses
http_access deny limitada
http_access allow permesa

com que el fitxer es llegeix de dalt cap a baix, i quan troba la primera
regla es para, això t'hauria de donar pas a les ips del rang2 a les URLs que
tinguis al fitxer /foo/bar, i denegar la resta de URLs, gràcies a la 3ra
regla la resta d'IPs tenen accés a tot arreu

El 12/06/07, Ramon Cuñé <ramoncunye@gmail.com> ha escrit:
> Ja ho remenaré.
>
> Gràcies i salut!
>
>
>
>
> El 11/06/07, Marc Torres <sarinyo@gmail.com> ha escrit:
> > Així ràpidament no sabria com fer-ho senzill. Segurament necessitaràs
> > alguna eina per a squid com ara squid guard o la que et deia en Serni.
> >
> > Salut,
> >
> > Marc.
> >
> > El 11/06/07, Ramon Cuñé <ramoncunye@gmail.com > ha escrit:
> > > Bones,
> > >
> > > el que jo necessitaria és que tot el rang 192.168.0.0/16 pugui accedir
> > > a tot i algunes ip's concretes només a unes url's predefinides Així
> > > que amb aquest sistema hauria d'anar fent:
> > >
> > > acl permesa 192.168.157.1-192.168.157.11/32
> > > acl permesa2 192.168.157.13-192.168.157.254/32
> > > acl limitada 192.168.157.12/32
> > >
> > > Per tant per cada ip que vulgues limitar hauria de fer tot aquest
> > > muntatge. Hi ha alguna forma de fer-ho més senzill.
> > >
> > > Salut!
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2007/6/11, Marc Torres <sarinyo@gmail.com>:
> > > > Efectivament amb ACL's ho pots fer senzillament:
> > > >
> > > > ## ACLs
> > > > acl permesa src 192.168.0.50/32
> > > >
> > > > # ara un rang
> > > > acl limitades src 192.168.0.30-192.168.0.39 /32
> > > >
> > > > # només URLs que es troben a /home/squid/foo
> > > > acl webs_permeses url_regex -i "/home/squid/foo"
> > > >
> > > > ## PERMISOS
> > > > http_access allow permesa
> > > >
> > > > # els limitats només a limitades (fitxer /home/squid/foo)
> > > > http_access allow limitades webs_permeses
> > > >
> > > > # No oblidem aquest!
> > > > http_access deny all
> > > >
> > > >
> > > > El fitxer /home/squid/foo
> > > > gencat.net
> > > > debian
> > > > slashdot
> > > >
> > > > Amb això la IP 192.168.0.50 pot anar a totes les webs i el rang
> > > > 192.168.0.30-39 només podrien anar a URLS que tinguin gencat.net,
debian i
> > > > slashdot a la seva URL. Ull, també podrien anara a llocs com ara
> > > > www.foobar.com/slahdot . Sempre pots acurar més els patrons, però jo
amb
> > > > això no he tingut cap problema.
> > > >
> > > > Salut!
> > > >
> > > > --
> > > > "Only after the last tree has been cut down.
> > > > Only after the last river has been poisoned.
> > > > Only after the last fish has been caught.
> > > > Only then, will you find that money cannot be eaten."
> > >
> >
> >
> > --
> > "Only after the last tree has been cut down.
> > Only after the last river has been poisoned.
> > Only after the last fish has been caught.
> > Only then, will you find that money cannot be eaten."
> >
>



--

"Only after the last tree has been cut down.
Only after the last river has been poisoned.
Only after the last fish has been caught.
Only then, will you find that money cannot be eaten."



Reply to: