Seltsames Verhalten vom Squid3.1

Gemeinsam ins Internet mit Firewall und Proxy.
Antworten
deebiaan
Beiträge: 1
Registriert: 11.08.2014 10:11:49

Seltsames Verhalten vom Squid3.1

Beitrag von deebiaan » 12.08.2014 10:15:40

Hallo zusammen,

ich hoffe ihr könnt Licht ins Dunkle bringen :lol:

Ich habe im Rahmen vom Umstrukturierungen im Firmennetz einen Squid 3.1.6 Proxy auf Debian6 auf einen Squid 3.1.20 auf Debian7 migriert. Leider bisher nur mässig erfolgreich :? .

Hier mal der Code (IPs natürlich geändert), danach dann die Problematik:

Code: Alles auswählen

acl manager proto chache_object
acl localhost src 127.0.0.1/32 ::1
tcp_outgoing_address 1.2.3.4
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl SSL_ports port 21
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
acl Safe_ports port 70		# gopher
acl Safe_ports port 210		# wais
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280		# http-mgmt
acl Safe_ports port 488		# gss-http
acl Safe_ports port 591		# filemaker
acl Safe_ports port 777		# multiling http
acl CONNECT method CONNECT
acl src_linux src 5.6.7.8/32
acl dom_linupdate dstdomain .kernel.org
acl dom_linupdate dstdomain .debian.org
acl dom_linupdate dstdomain .backports.org
acl dom_linupdate dstdomain .deb-multimedia.org
acl dom_linupdate dstdomain .sourceforge.net
acl dom_linupdate dstdomain www.debian-desktop.org
acl PURGE method PURGE
http_access allow manager localhost
######## http_access deny manager
http_access allow src_linux dom_linupdate
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow localhost PURGE
http_access deny PURGE
http_access allow SSL_ports
######## http_access allow src_linux dom_linupdate
http_access deny all
http_port 8080
icp_port 0
forwarded_for off
cache_effective_user squid
cache_effective_group squid
debug_options ALL,1 33,2
hierarchy_stoplist cgi-bin ?
cache_mem 1024 MB
cache_dir ufs /var/spool/squid3 10000 16 256
error_directory /usr/share/squid3/errors/German
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
access_log /var/log/squid3/access.log combined
cache_log /var/log/squid3/cache.log
cache_store_log none
visible_hostname proxy
coredump_dir /var/spool/squid3
refresh_pattern ^ftp:			1440	20%	10080
refresh_pattern ^gopher:		1440	0%	1440
refresh_pattern -i (/cgi-bin/|\?)	0	0%	0
refresh_pattern . 			0	20%	4320
Das wundersame Problem ist folgendes:
Sobald die Zeile http_access deny manager vor den http_access Zeilen (hier z.B. http_access allow src_linux dom_linupdate ) steht, ziehen diese http_access Zeilen nicht mehr und ich bekomme im access.log ein TCP DENIED. Bisher dachte ich immer, dass der Block

http_access allow localhost
http_access allow manager localhost
http_access deny manager
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow localhost


so fest steht und in der Reihenfolge nicht geändert werden sollte. Und nach der Zeile "http_access allow localhost " folgen dann die eigenen http_access Zeilen. Bisher hat das so auch immer funktioniert, nur dieses Mal warum auch immer nicht. Sobal ich die deny manager Regel an die Auskommentierte Stelle verschiebe werden die Zugriffe denied. Kann mir jemand sagen woran das liegen könnte?

Das einzige was ich noch geändert habe zum Standard ist der cache_effective_user und group auf "squid" geändert. Der User Squid ist natürlich in der passwd angelegt ( squid:x:1001:1001:Squid Cache;;;:/var/spool/squid3:/bin/false ). Oder kann hier auch das Problem liegen, dass ich den squid-User nicht per useradd angelegt habe? Irgendwie scheint es mir ja ein Problem mit dem Cache-Manager zu sein. Die Berechtigungen auf /var/log/squid3 habe ich mit chown -R entsprechend angepasst.

Prinzipiell tut es ja, nur verstehe ich nicht warum alles steht und fällt mit der deny manager Regel.


Ich hoffe es hat jemand einen brauchbaren Tipp :hail:

Antworten