netzwerker
Goto Top

Squid Proxy Whitelist für HTTPS(SSL)-Seiten

Bei uns im Netzwerk befindet sich ein Proxy-Server der den Zugriff auf das Internet regelt. Einige Seiten sind zum Surfen per Freigabeliste freigegeben. Leider werden HTTPS-Seiten die in der Liste stehen trotzdem nicht freigegeben. Wie kann ich das Problem lösen?

Ich habe bereits versucht eine zusätzliche Liste für HTTPS-Seiten hinzuzufügen:

acl freigegeben_https dstdomain "/etc/squid/freigegeben_https.txt"
http_access allow normalhosts freigegeben_https SSL_ports

jedoch funktioniert das so nicht.

Wenn ich die SSL_ports mit
http_access deny CONNECT SSL_ports
sind plötzlich alle Seiten erreichbar die mit https anfangen.
Das soll auch nicht möglich sein.

Hier noch ein Auszug aus der Squid.conf:

acl SSL_ports port 443
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

#  TAG: http_access
#	Allowing or Denying access based on defined access lists
#
#	Access to the HTTP port:
#	http_access allow|deny [!]aclname ...
#
#	NOTE on default values:
#
#	If there are no "access" lines present, the default is to deny  
#	the request.
#	
#	If none of the "access" lines cause a match, the default is the  
#	opposite of the last line in the list.  If the last line was
#	deny, the default is allow.  Conversely, if the last line
#	is allow, the default will be deny.  For these reasons, it is a
#	good idea to have an "deny all" or "allow all" entry at the end  
#	of your access lists to avoid potential confusion.
#
#Default:
# http_access deny all
#
#Recommended minimum configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
#
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user  
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#definition of supervisor and normal users via ip
acl supervisor src 133.133.133.2 133.133.133.3 133.133.133.4 133.133.133.6 133.133.133.8 133.133.133.30 133.133.133.33 133.133.133.36 133.133.133.37 133.133.133.42 133.133.133.48 133.133.133.91 133.133.133.92 133.133.133.95 133.133.133.106 133.133.133.113 133.133.133.128 133.133.133.131 133.133.133.132 133.133.133.134 133.133.133.138 133.133.133.139 133.133.133.140 133.133.133.141 133.133.133.143 133.133.133.144 133.133.133.145 133.133.133.146 133.133.133.147 133.133.133.148 133.133.133.149 133.133.133.155 133.133.133.156 133.133.133.157 133.133.133.161 133.133.133.162 133.133.133.163 133.133.133.164 133.133.133.166 133.133.133.167 133.133.133.168 133.133.133.169 133.133.133.172 133.133.133.182 133.133.133.187 133.133.133.188 133.133.133.197 133.133.133.198 133.133.133.200 133.133.133.202 133.133.133.205 133.133.133.207 133.133.133.208 133.133.133.209 133.133.133.210 133.133.133.211 133.133.133.212 133.133.133.214 
acl normalhosts src 133.133.133.0/255.255.255.0

acl freigegeben dstdomain "/etc/squid/freigegeben.txt"  
acl freigegeben_https dstdomain "/etc/squid/freigegeben_https.txt"  

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed


#...and the rest
acl internet dst 0.0.0.0
acl oertlich dst 195.145.119.215 194.173.175.0/255.255.255.0
acl maproute dst 212.204.97.1

#allow all sites to use connect to us via HTTP
#http_access allow  all

#allow supervisor to connect to whole inet
#http_access deny manager all
http_access allow supervisor all
#internet
#http_access allow lookupid internet
#allow all others to access these sites
http_access allow normalhosts freigegeben
http_access allow normalhosts oertlich
http_access allow normalhosts maproute
http_access allow normalhosts freigegeben_https CONNECT SSL_ports

#http_access allow localnet

# allow localhost always proxy functionality
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

#  TAG: http_reply_access
#	Allow replies to client requests. This is complementary to http_access.
#
#	http_reply_access allow|deny [!] aclname ...
#
#	NOTE: if there are no access lines present, the default is to allow
#	all replies
#
#	If none of the access lines cause a match the opposite of the
#	last line will apply. Thus it is good practice to end the rules
#	with an "allow all" or "deny all" entry.  
#
#Default:
# none

#  TAG: icp_access
#	Allowing or Denying access to the ICP port based on defined
#	access lists
#
#	icp_access  allow|deny [!]aclname ...
#
#	See http_access for details
#
#Default:
# icp_access deny all
#
#Allow ICP queries from local networks only
#icp_access allow localnet
icp_access deny all

Content-Key: 114876

Url: https://administrator.de/contentid/114876

Printed on: April 25, 2024 at 14:04 o'clock

Mitglied: 66027
66027 Apr 28, 2009 at 19:42:53 (UTC)
Goto Top
Hi

Schau dir mal meinen Artikel dazu an, habe selbst für die Firma einen Router mit Content Filter gebaut:
http://www.saarbruecken.co.uk/index.php?page=761
http://www.saarbruecken.co.uk/index.php?page=508
Member: Netzwerker
Netzwerker Apr 29, 2009 at 08:30:35 (UTC)
Goto Top
Vielen Dank für deine Antwort. Ich habe mir die Links angesehen. Leider ist dort keine Lösung für mein Problem mit HTTPS(SSL)-Seiten zu finden. Die normalhosts-User sollen nur auf die über die Whitelist freigegeben Seiten gehen können. Die supervisor-User können auf alle Seiten zugreifen. Der über Whitelists beschränkte Zugriff funktioniert auch so weit. Das Problem ist nur, dass die HTTPS-Seiten, die in den Whitelists stehen, trotzdem nicht errreichbar sind. Die supervisor-User können bereits auf alle SSL-Seiten zugreifen.
Mitglied: 66027
66027 Apr 29, 2009 at 11:22:09 (UTC)
Goto Top
Hi!

Kurze Frage, warum regelst du das nicht einfach mit dem IP-Bereich und machst für Leute, die keine SSL-Seiten nutzen können, den HTTPS Port dicht? Ich mein ja nur... du musst das Rad schließlich nicht neu erfinden. face-smile
Member: Netzwerker
Netzwerker May 04, 2009 at 08:01:56 (UTC)
Goto Top
Vielen Dank für deine schnelle Antwort. Ich habe den Fehler gefunden. In der Whitelist stand vor den HTTPS-Seiten noch >https://< (ich doof). Das hat der SQUID nicht akzeptiert und die Adresse ignoriert. Zu deinem Einwand: HTTPS soll grundsätzlich für alle funtkionieren. Die meisten User jedoch sollen nur auf ausgewählte (geschäftliche) Seiten zugreifen können.