online 1
gast (50)

/ Forum / Linux

LinuxLinux

Fragevon squid vom 19.04.2021, 22:34 Options

Squid / transparent

Hi
Ich möchte Squid als transparenten Proxy-Cache einrichten.
Squid soll auf meinem Rechner laufen (openSuSE 11.1) und nur Anfragen von diesem Rechner entgegennehmen.
Wenn man die Proxyeinstellungen im Browser manuell eingibt (localhost:3128), funktioniert alles, jedoch möchte ich einen transparenten Proxy haben.
Dafür hab ich in der squid.conf den Eintrag
http_port localhost:3128
transparent und in der Konsole habe ich bereits
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
als root ausgeführt.
Trotzdem wird Squid ohne Proxyeinstellungen im Browser nicht genutzt.

Jemand ne Idee, was da sein könnte?

squid.conf:
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
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl shoutcast rep_header X-HTTP09-First-Line ^ICY\s[0-9]
acl apache rep_header Server ^Apache

broken_vary_encoding allow apache

access_log /var/log/squid/access.log squid

#http_access allow manager localhost
#http_access allow localnet
#http_access allow localhost # auskommentiert, um zu testen, ob squid genutzt wird.
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all

forwarded_for off
icp_access deny all

[b]http_port localhost:3128 transparent[/b]

hierarchy_stoplist cgi-bin ?

cache_mem 32 MB

via off

memory_replacement_policy lru

cache_replacement_policy lru

cache_dir ufs /var/cache/squid 100 16 256

minimum_object_size 0 KB

maximum_object_size 4096 KB

cache_swap_low 90

cache_log /var/log/squid/cache.log

cache_store_log /var/log/squid/store.log

emulate_httpd_log off

ftp_passive on

refresh_pattern ^ftp: 1440 20 10080
refresh_pattern ^gopher: 1440 0 1440
refresh_pattern -i  (/cgi-bin/|\?) 0 0 0
refresh_pattern . 0 20 4320

upgrade_http0.9 deny shoutcast

connect_timeout 2 minutes

client_lifetime 1 days

cache_mgr webmaster

error_directory /usr/share/squid/errors/German

coredump_dir /var/cache/squid

cache_swap_high 95


Danke schonmal!


Antwort schreiben

Ähnliche Themen

SUSE 10.3 DVD lässt sich nicht installieren
Juergen54  10.10.2007 - 103 Hits - 10 Antworten

linux befehl
leonie  16.10.2007 - 84 Hits - 7 Antworten

windows nach linux installieren
tryout  11.10.2007 - 168 Hits - 1 Antwort

Squid clustern
hand  15.07.2008 - 33 Hits - 1 Antwort

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Mon Jan 26 11:26:25 2026