Transparenter Squid
Moin
ich stehe hier etwas auf dem Schlauch.
Was habe ich getan?
Auf dem Router:
iptables -t nat -A PREROUTING -p tcp -s ! $PROXY --dport 80 -j DNAT --to $PROXY:3128
Der Proxy-Rechner ist ein anderer im Netz. Dieser ist ein Squid
2.4.sonstwas (Debian/Stable).
Die squid.conf enthält:
,----[ squid.conf ]
| debug_options ALL,1 33,2
| http_port 3128
| httpd_accel_port 80
| httpd_accel_host virtual
| httpd_accel_with_proxy on
| httpd_accel_uses_host_header on
| hierarchy_stoplist cgi-bin ?
| acl QUERY urlpath_regex cgi-bin \?
| no_cache deny QUERY
| emulate_httpd_log on
| redirect_rewrites_host_header off
| acl all src 0.0.0.0/0.0.0.0
| acl manager proto cache_object
| acl localhost src 127.0.0.1/255.255.255.255
| acl SSL_ports port 443 563
| acl Safe_ports port 80 # http
| acl Safe_ports port 21 # ftp
| acl Safe_ports port 443 563 # https, snews
| 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 901 # SWAT
| acl purge method PURGE
| acl CONNECT method CONNECT
| http_access allow manager localhost
| http_access deny manager
| http_access allow purge localhost
| http_access deny purge
| http_access deny !Safe_ports
| http_access deny CONNECT !SSL_ports
| acl heynitz src 192.168.1.0/24
| acl porn url_regex "/etc/squid/verboten.txt"
| acl noporn url_regex "/etc/squid/erlaubt.txt"
| acl exefiles urlpath_regex "/etc/squid/exefiles.txt"
| acl noexe urlpath_regex "/etc/squid/noexe.txt"
| http_access allow heynitz
| http_access allow noexe
| http_access deny exefiles !noexe
| http_access deny porn !noporn
| http_access deny all
| icp_access allow all
| httpd_accel_single_host off
| httpd_accel_uses_host_header on
`----
Der Proxy arbeitet korrekt, wenn ich im Client-Browser ihn angebe. Aber
er soll ja transparent sein, und das geht nicht.
Er bekommt zwar Pakete via dem DNAT, aber er stellt sich doof.
Lasse ich in der iptable-Zeile '-s ! $PROXY' weg, nörgelt er in
cache.log über eine Schleife, was mir auch logisch erscheint, daher
dieser Zusatz. Nur - nun reagiert er gar nicht mehr, obwohl Pakete
kommen. Im Squid-Log steht nix, auch nicht im iptables-Log.
Was genau ist mein Denkfehler?
Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Tel. NL Heynitz: 035242/47212
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
Reply to: