Squid-Proxy, squid.conf- Beispieldatei, beinahe ganz ohne Kommentarzeilen. Der Server ist in die
Windows-Domäne eingebunden. Mitglieder einer bestimmten Windows-Gruppe haben
einen Internetzugang.
Etliche Sonderzeichen wurde im Quelltext kodiert. Bitte gegebenenfalls
noch einmal mit der Originaldatei abgleichen.
# WELCOME TO SQUID 2.7.STABLE9
# ----------------------------
#
#Recommended minimum configuration per scheme:
#auth_param negotiate program <uncomment and complete this line to activate>
#auth_param negotiate children 5
#auth_param negotiate keep_alive on
#auth_param ntlm program <uncomment and complete this line to activate>
#auth_param ntlm children 5
#auth_param ntlm keep_alive on
#auth_param digest program <uncomment and complete this line>
########################################################################
##### #####
##### Anweisung fuer Passwortdatei, hier deaktiviert, #####
##### weil Windows-Gruppe verwendet werden soll. #####
##### #####
##### Mit Firefox kann beides verwendet werden, #####
##### die Windows-Gruppe und die Abfrage der Zugangsdaten. #####
##### Der Internet Explorer kann nur das eine oder das #####
##### andere abarbeiten. Wenn beides aktiviert ist, #####
##### klappt es mit den Zugangsdaten nicht. #####
##### OFFEN ist noch, wie die Dienste reagieren, die #####
##### den Internetzugang ueber Benutzername und Passwort #####
##### ueber den Proxy bekommen. #####
##### #####
########################################################################
#auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
########################################################################
#
########################################################################
##### #####
##### Anweisung fuer squidGuard und Konfigurationsdatei #####
##### #####
########################################################################
##### Deaktiviert - Antivirensoftware hat uebernommen
#redirect_program /usr/bin/squidGuard -c /etc/squidguard/squidGuard.conf
########################################################################
#
#auth_param digest children 5
#auth_param digest realm Squid proxy-caching web server
#auth_param digest nonce_garbage_interval 5 minutes
##### naechste Zeile aktiviert
auth_param digest nonce_max_duration 30 minutes
#auth_param digest nonce_max_count 50
#auth_param basic program <uncomment and complete this line>
########################################################################
# Anweisung fuer squidGuard, wenn eingerichtet und verwendet
#redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
########################################################################
#auth_param basic children 5
#auth_param basic realm Squid proxy-caching web server
#auth_param basic credentialsttl 2 hours
#auth_param basic casesensitive off
auth_param basic realm Squid - Proxy Server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
#
########################################################################
##### #####
##### Anweisung fuer Gruppe aus Windows-Domaene 1 #####
##### WWW-Zugang #####
##### #####
########################################################################
auth_param ntlm program /usr/bin/ntlm_auth --require-membership-of=WINDOMAENE\\WWW-Zugang --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 80
#ok#auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
#
########################################################################
##### #####
##### bisher verwendete Einstellungen #####
##### #####
########################################################################
auth_param basic realm Squid - Proxy Server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
########################################################################
##### #####
##### weitere neue Einstellungen - Reihenfolge #####
##### #####
########################################################################
authenticate_cache_garbage_interval 10 seconds
authenticate_ttl 0 seconds
#
#
auth_param basic realm Squid - Proxy Server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
#
#
#
#
# ACCESS CONTROLS
# -----------------------------------------------------------------------------
#
#
#
#Recommended minimum configuration:
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
#
#############################################################################
##### #####
##### Naechste Zeile -Internet Explorer nicht zulassen #####
##### #####
#############################################################################
acl ie_browser8 browser ^Mozilla/4\.0 .compatible; MSIE
#############################################################################
##### #####
##### whitelist domains it #####
##### #####
#############################################################################
acl whitelist_domains_it dstdom_regex -i "/etc/squid/whitelist_domains_it"
#############################################################################
##### #####
##### Naechste Zeile - gesperrte Dateitypen #####
##### #####
#############################################################################
##### Entwuerfe noch testen
acl forbidden_filetypes urlpath_regex -i "/etc/squid/forbidden_filetypes"
#############################################################################
##### #####
##### Naechste Zeile - gesperrte Ausdruecke #####
##### #####
#############################################################################
acl gesperrt url_regex -i "/etc/squid/gesperrt"
#############################################################################
##### #####
##### Naechste Zeile - gesperrte Domains #####
##### #####
#############################################################################
acl bad_domains dstdom_regex -i "/etc/squid/bad_domains"
#############################################################################
#
#############################################################################
##### #####
##### Naechste Zeile - zugelassene Domains #####
##### #####
#############################################################################
acl good_domains dstdom_regex -i "/etc/squid/good_domains"
#############################################################################
##### #####
##### cache fuer bestimmte Domains abschalten #####
##### #####
acl no_cache dstdomain url_regex -i "/etc/squid/no_cache"
#############################################################################
#
#############################################################################
##### #####
##### Naechste Zeilen - Definition der Zugriffe #####
##### #####
#############################################################################
# Naechste Zeile Demoeintrag. Einstellungen anpassen
acl computername src 123.123.123.123/255.255.255.255 # Kommentar
##### und so weiter...
#############################################################################
##### #####
##### Naechste Zeile - Aktivieren der Benutzerauthentifizierung #####
##### ueber passwd, hier deaktiviert, weil die Windows-Gruppe #####
##### verwendet wird. Dieser Server ist Domaenenmitglied #####
##### #####
#############################################################################
#####acl AUTHUSERS proxy_auth REQUIRED
#############################################################################
#
#
#
#############################################################################
##### #####
##### Naechste Zeile - Aktivieren der Windows-Gruppe #####
##### #####
#############################################################################
##### Vgl. ACLs oben, wer in der Windows-Gruppe ist,
##### hier WWW-Zugang, darf surfen. Auch im laufenden Betrieb kann
##### die Gruppenzugehoerigkeit geaendert werden. Nach einigen
##### Sekunden wirkt die Aenderung sich aus, ganz ohne Skript.
#####
##### Problem im Moment: es klappt entweder nur mit der Windows-Gruppe
##### oder nur mit den individuellen Login-Daten ueber 'passwd'.
#############################################################################
acl AuthorizedUsers proxy_auth REQUIRED
#############################################################################
#
#############################################################################
##### #####
##### Zugriff ueber besondere Textdatei, manuell oder #####
##### ueber ein Skript aktualisieren. Funktioniert, wenn #####
##### Datei vorhanden und Inhalt. Ein Username je Zeile #####
##### Hier deaktiviert, wegen Windows-Gruppe der Domaene, #####
##### die verwendet wird. Funktioniert auch mit der Testdatei! #####
##### #####
#############################################################################
#acl vollzugriff_internet proxy_auth_regex -i "/etc/squid/freigegebene_benutzer"
#############################################################################
# TAG: http_access
#
#Default:
# http_access deny all
#
#Recommended minimum configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# 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
##### Raute entfernt
http_access deny to_localhost
#
############################################################################
##### #####
##### eigene Zugriffsdefinitionen zulassen #####
##### #####
############################################################################
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# 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
#http_access allow localnet
http_access allow localhost
#
#
# Kennungen von oben
#
############################################################################
##### #####
##### Naechste Zeile - Internet Explorer nicht zulassen #####
##### #####
############################################################################
http_access deny ie_browser8
############################################################################
#####
##### whitelist domains it zulassen
#####
############################################################################
http_access allow whitelist_domains_it
############################################################################
##### #####
##### Naechste Zeile - gesperrte Dateitypen #####
##### #####
############################################################################
http_access deny forbidden_filetypes
############################################################################
##### #####
##### Naechste Zeile - gesperrte Ausdruecke #####
##### #####
############################################################################
http_access deny gesperrt
############################################################################
##### #####
##### Naechste Zeile - gesperrte Domains #####
##### #####
############################################################################
http_access deny bad_domains
############################################################################
##### #####
##### Naechste Zeile - zugelassene Domains #####
##### #####
############################################################################
http_access allow good_domains
############################################################################
##### #####
##### cache fuer bestimmte Domains abschalten #####
cache deny no_cache
############################################################################
#
############################################################################
##### #####
##### Naechste Zeilen - Anwendung der Definitionen #####
##### von oben, moeglichst in alphabetischer Reihefolge, #####
##### wegen der besseren Uebersicht. #####
##### #####
############################################################################
# Naechste Zeile Demoeintrag - siehe oben - Ausdruck uebernehmen,
# bzw. den Eintrag anpassen
http_access allow computername
#### und so weiter...
############################################################################
#
############################################################################
##### #####
##### Naechste Zeile - Zulassen der authentifizierten Benutzer #####
##### deaktiviert, weil Windows-Gruppe verwendet werden soll. #####
##### #####
############################################################################
##### http_access allow AUTHUSERS
############################################################################
##### naechste Zeile Internetzugang ueber gesonderte Textdatei,
##### ein username je Zeile. Funktioniert.
##### Hier deaktiviert, weil Windows-Gruppe verwendet wird.
############################################################################
#http_access allow AuthorizedUsers vollzugriff_internet
#
#
#
############################################################################
##### #####
##### Naechste Zeile - Aktivieren der Windows-Gruppe #####
##### Siehe oben, wer in der Gruppe WWW-Zugang ist, darf surfen, #####
##### ganz ohne Passwortabfrage. #####
##### #####
############################################################################
http_access allow all AuthorizedUsers
############################################################################
#
############################################################################
##### #####
##### And finally deny all other access to this proxy #####
##### #####
############################################################################
http_access deny all
###########################################################################
#
#Allow ICP queries from local networks only
icp_access allow localnet
icp_access deny all
### geaendert, ist bei lenny aktiviert
#icp_access allow all
#
############################################################################
##### #####
##### Squid normally listens to port 3128 #####
##### #####
############################################################################
http_port 3128
############################################################################
#
#We recommend you to use at least the following line.
############################################################################
##### #####
##### Naechstes Kommando deaktivert wegen Problemen #####
##### mit Onlineportalen #####
##### #####
############################################################################
#hierarchy_stoplist cgi-bin ?
#
############################################################################
##### #####
##### Logformat so eingestellt, #####
##### dass Benutzernamen aufgezeichnet werden. #####
##### #####
############################################################################
# nachste Zeile Originalzeile, Benutzername weiter vorn
logformat squid %tl %un %>a %ui "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
############################################################################
# naechste Zeile Username erscheint nach der Zeit
#logformat squid %tl.%03tu %un %6tr %>a %Ss/%03Hs %<st %rm %ru %Sh/%<A %mt
############################################################################
# naechste Zeile Logformat geaendert, Benutzername wird nicht angezeigt
#logformat squid %tl. %03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %Sh/%<A %mt
############################################################################
#logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
#logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
#logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
#logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
############################################################################
# naechste Zeile ist Kopie der ersten Zeile und geaendert, Datum und Uhrzeit erscheinen
#logformat squid %tl.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
############################################################################
### naechste Zeile: Logformat ausprobiert - ueberfluessige Informationen entfernt
#logformat squid %tl. %03tu %un %6tr %>a %03Hs %<st %rm %ru %Sh/%<A %mt
############################################################################
#
#Default:
# none
#
# TAG: access_log
access_log / var/log/squid/access.log squid
#
############################################################################
##### #####
##### Hier wurde nichts geaendert #####
##### #####
############################################################################
#Suggested default:
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
#
############################################################################
##### #####
##### Hier wurde nichts geaendert #####
##### #####
############################################################################
# Don't upgrade ShoutCast responses to HTTP
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
############################################################################
##### #####
##### Hier wurde nichts geaendert #####
##### #####
############################################################################
# Apache mod_gzip and mod_deflate known to be broken so don't trust
# Apache to signal ETag correctly on such responses
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
############################################################################
#
############################################################################
##### #####
##### Hier wurde nichts geaendert #####
##### #####
############################################################################
# TAG: extension_methods
# Squid only knows about standardized HTTP request methods.
# You can add up to 20 additional "extension" methods here.
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
############################################################################
#
############################################################################
##### #####
##### E-Mail-Adresse eingetragen #####
##### #####
############################################################################
cache_mgr yourname@foobar.com
############################################################################
#
############################################################################
##### #####
##### Naechstes Kommando deaktiviert, dann Zugriff #####
##### auf WWW moeglich, wenn cache_peer deaktiviert ist. #####
##### Vgl. oben #####
##### #####
############################################################################
#never_direct allow all
############################################################################
#
############################################################################
##### #####
##### Hier wurde nicht geaendert. #####
##### #####
############################################################################
hosts_file /etc/hosts
############################################################################