Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

transparenter squid willt nicht. HILFE!

Empfohlene Antworten

Veröffentlicht

Hallo,

ich bin gerade dabei einen transparenten proxy aufzusetzen und verzweifle bald.

Ansich läuft der squid 2.5stable8 gut (mit direkter Angabe im Browser), nur halt nicht transparent.

Auf unserer Firewall (debian sarge mt iptables ) müssen wir ja ein paar Regeln definieren, damit HTTP-Anfragen aus dem lokalen Netz (172.21.0.0/16) an den Proxy-Server auf Port 3128 weitergeleitet werden

Ich habe schon ne Menge gegoogelt und unter anderem folgende Regeln ausprobiert:

1. von http://www.tldp.org/HOWTO/TransparentProxy-6.html

iptables -t nat - A PREROUTING -i "Interface zum lokalen Netz" -s ! "squid-rechner" -p tcp --dport 80 -j DNAT -- "squid-rechner:3128"

iptables -t nat -A POSTROUTING -o "Interface zum lokalen Netz" -s "172.21.0.0/16" -d "squid-rechner" -j SNAT --to "localhost"

iptables -A FORWARD -s "172.21.0.0/16" -d "squid-rechner" -i "Interface zum lokalen Netz" -o "Interface zum lokalen Netz" -p tcp --dport 3128 -j ACCEPT

2. aus irgendeinem Forum

iptables -A PREROUTING -t nat -i "Interface zum lokalen Netz" -p tcp -s "172.21.0.0/16" --dport 80 -j DNAT --to "squid-rechner:3128"

Das alles funktioniert nicht. Was mache ich da falsch?

Auf dem Squid sind folgende Optionen gesetzt:

httpd_accel_host virtual

httpd_accel_port 80

httpd_accel_with_proxy on

httpd_accel_uses_host_header on

Danke für eure Hilfe

Hi!

Hast du beim eintragen der Regeln in die Firewall an die Reihenfolge gedacht?

iptables Arbeitet seine Regelliste solange ab, bis eine Regel zutrifft.

Beispiel:

iptables -A INPUT -i eth0 -s 192.168.0.0/24 -j DROP

iptables -A INPUT -i eth0 -s 192.168.0.1 -j ACCEPT

So wie es oben beschrieben ist, würde hier kein Rechner aus dem Netz 192.168.0.0 eine Verbindung herstellen können. Auch wenn wir in Zeile zwei den Zugriff für Rechner 192.168.0.1 erlauben.

Richtig würde es so ausschauen:

iptables -A INPUT -i eth0 -s 192.168.0.1 -j ACCEPT

iptables -A INPUT -i eth0 -s 192.168.0.0/24 -j DROP

Grüße

 

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.