====== Squid Out of the Box ====== ===== Benötigte Pakete ===== Fedora, Debian (ab 12), SuSE: squid Debian (bis 11): squid3 ===== Squid starten und testen ===== service squid start netcat -v localhost 3128 GET http://www.heise.de/ HTTP/1.1 Host: www.heise.de (2 mal ) Konfigurationsdatei vor Neustart testen: squid -k parse ====== Squid für das lokale Netzwerk ====== ''/etc/squid/squid.conf'': acl our_networks src 192.168.1.0/24 http_access allow our_networks ====== mehr RAM ====== cache_mem 256 MB ====== mehr Plattenplatz ====== cache_dir danach mit squid -z -N das Cache-Verzeichnis neu aufbauen. ====== Eintrag aus Cache Löschen ====== (( Details siehe: http://wiki.squid-cache.org/SquidFaq/OperatingSquid )) ===== PURGE Zugriff erlauben ===== ''/etc/squid3/squid.conf'' : acl PURGE method PURGE http_access allow PURGE localhost http_access deny PURGE ===== testen ===== Seite laden: http_proxy='localhost:3128' wget -q -O - http://www.linuxhotel.de/index.html | wc -l Seite löschen: squidclient -m PURGE http://www.linuxhotel.de/index.html ====== Benutzerauthentifizierung gegen PAM / /etc/shadow ====== ''/etc/squid/squid.conf'': auth_param basic program /usr/lib/squid/basic_pam_auth acl password proxy_auth REQUIRED acl homenet src 192.168.231.0/24 http_access allow homenet password chmod g+s /usr/lib/squid/basic_pam_auth service squid reload Kleiner Test: echo -en "nutzer14:villa" | mimencode netcat -v localhost 3128 GET http://www.heise.de/ HTTP/1.1 Host: www.heise.de Proxy-Authorization: Basic bnV0emVyMTQ6dmlsbGE= ====== Gängige Optionen ====== Cache auf 8 GB vergrößern: cache_dir ufs /var/cache/squid 8000 16 256 ====== Automatische Proxy-Configuration ====== **nicht getestet** Benötigt: [[apache]] ''/etc/mime.types'' : ( Debian 3.1 ) application/x-ns-proxy-autoconfig pac ''/etc/apache2/mod_mime-defaults.conf'' : ( SuSE 10.2 ) AddType application/x-ns-proxy-autoconfig pac ''/var/www/wpad.dat'' : ( Debian 3.1 ) ===== Links ===== * http://homepages.tesco.net/J.deBoynePollard/FGA/web-browser-auto-proxy-configuration.html * http://de.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol * Windows Update Problem: http://www.heise.de/ct/faq/hotline/04/21/05.shtml