squid - mehrere Netze bedienen

bsd5543

IT of the living dead
Hi all,

ich habe in unserem Netzwerk ein paar IP-Ranges zufügen müssen. Alles ist untereinander sauber erreichbar. Nur beim squid gibts Ärger.
Habe squid.conf um zweit die Einträge allowed_hosts1 und allowed_hosts2 erweitert
Code:
http_port               3128
cache_mem               64 MB
cache_dir               ufs /pub/squid/cache 4096 16 256
cache_access_log        /pub/squid/log/access.log
cache_log               /pub/squid/log/cache.log
cache_store_log         /pub/squid/log/store.log
redirect_program        /usr/local/bin/squidGuard
redirect_children       6

acl manager proto cache_object
acl localhost src 127.0.0.0/255.255.255.255
acl all src 0.0.0.0/0.0.0.0
acl allowed_hosts src 192.168.207.1-192.168.207.199
[COLOR="Blue"]acl allowed_hosts1 src 10.68.6.1-10.68.6.254
acl allowed_hosts2 src 10.68.5.1-10.68.5.254
[/COLOR]
http_access allow manager localhost
http_access deny manager all
http_access allow allowed_hosts
[COLOR="Blue"]http_access allow allowed_hosts1
http_access allow allowed_hosts2[/COLOR]
http_access deny all

icp_access allow allowed_hosts
[COLOR="Blue"]icp_access allow allowed_hosts1
icp_access allow allowed_hosts2[/COLOR]

Funzt allerdings nicht so, wie ich mir das denke. Anfragen der anderen Rechner scheinen gar nicht im Log auf. Jemand nen Tipp?

Bis denne
 
Du kannst den Squid-Rechner aber anpingen, ja? Eine Firewall schließe ich jetzt mal aus.

Anstatt die IP-Range anzugeben, was mir persönlich nicht so gut gefällt, könntest du per "acl hosts src 192.168.1.0/255.255.255.0" das gesamte Subnetz so freigeben (für andere Netze eben entsprechend).

Ebenso ist es wichtig, dass sowohl die ACLs als auch die http_access Zeilen in der richtigen Reihenfolge sind. (Bei den ACLs bin ich mir nicht ganz sicher, scheint nicht ganz logisch, aber ich habe es mal gelesen).
 
Danke für die Antwort. Habe den Fehler gefunden: Wenn ich squidGuard nutzte, sollte ich den auch entsprechend anpassen.

Bis denne
 
Code:
acl allowed_hosts src 192.168.207.1-192.168.207.199
acl allowed_hosts1 src 10.68.6.1-10.68.6.254
acl allowed_hosts2 src 10.68.5.1-10.68.5.254


http_access allow manager localhost
http_access deny manager all
http_access allow allowed_hosts
http_access allow allowed_hosts1
http_access allow allowed_hosts2
http_access deny all

icp_access allow allowed_hosts
icp_access allow allowed_hosts1
icp_access allow allowed_hosts2

...kannst Du auch umschreiben, wenn Du für alle Bereiche die gleichen Berechtigungen hast:
Code:
acl allowed_hosts src 192.168.207.1-192.168.207.199
acl allowed_hosts src 10.68.5.0/24
acl allowed_hosts src 10.68.6.0/24

http_access allow manager localhost
http_access deny manager all
http_access allow allowed_hosts
http_access deny all

icp_access allow allowed_hosts

Das macht Deine squid.conf übersichtlicher...
 
Zurück
Oben