Squid

Squid als transparenter Proxy

Am einfachsten lässt sich Squid als transparenter Proxy betreiben indem man alle Anfragen auf Port 80 per IPTables auf den Squid Port umleitet.

# redirect port 80 traffic to squid in chain with privoxy
${IPTABLES} -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8888

Anmerkung: Der Standard Port für Squid ist 3128. In meinem Beispiel wurde die 8888 verwendet, da Squid in einer Verkettung mit Privoxy arbeitet.

Squid als Anonymisierer

Um Squid zu einer rudimentären Anonymisierung des Datenverkehrs zu überreden, sind folgende Eintragungen in der squid.conf hinzuzufügen oder zu ändern.

acl all src 0.0.0.0/0.0.0.0
header_access Allow allow all
header_access Authorization allow all
header_access WWW-Authenticate allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_access Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow all
header_access Location allow all
header_access Pragma allow all
header_access Accept allow all
header_access Accept-Charset allow all
header_access Accept-Encoding allow all
header_access Accept-Language allow all
header_access Content-Language allow all
header_access Mime-Version allow all
header_access Retry-After allow all
header_access Title allow all
header_access Connection allow all
header_access Proxy-Connection allow all
header_access All deny all
strip_query_terms on

Da diese sehr restriktiven Einstellungen durchaus einige Seiten (EBay,…) am korrekten Arbeiten hindern, können Ausnahmen durch folgende zusätzliche Konfigurationen realisiert werden.

# no anonymity for the following urls
acl ebay dstdomain .ebay.de
 
# no anonymity for the following urls
header_access All allow ebay

Squid Config

Eine vollständige Konfiguration meines Squid Proxies kann hier eingesehen werden. squid.conf

squid.txt · Zuletzt geändert: 2011/07/22 23:26 (Externe Bearbeitung)
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki