Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Squid als transparenter Proxy: Access Denied.

5 views
Skip to first unread message

Tobias Krais

unread,
Nov 1, 2005, 9:10:07 AM11/1/05
to
Hallo zusammen,

solangsam bin ich am verzweifeln. Ich habe auf meiner Maschine
(localhost) Squid installiert und mittels iptables zum transparenten
Proxy gemacht:

iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 8080

In der squid.conf habe ich folgendes eingetragen:

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

Jetzt sollte es doch funktionieren. Tut es aber nicht. Ich bekomme jetzt
auf jeder Seite folgenden Fehler:
-----%<------
The following error was encountered:

* Access Denied.

Access control configuration prevents your request from being
allowed at this time. Please contact your service provider if you feel
this is incorrect.
-----%<-----

Wenn ich den Squid manuell als Proxy eintrage funktioniert alles
wunderbar. Also habe ich mich an die ACLs gemacht und als einzigste
Regel folgendes stehen lassen:

http_access allow all

hilft aber auch net.

Ich bin jetzt so langsam echt am verzweifeln. Könnt ihr mir helfen?

Grüssle,

Tobias


--
Haeufig gestellte Fragen und Antworten (FAQ):
http://www.de.debian.org/debian-user-german-FAQ/

Zum AUSTRAGEN schicken Sie eine Mail an debian-user-g...@lists.debian.org
mit dem Subject "unsubscribe". Probleme? Mail an listm...@lists.debian.org (engl)

Christoph Haas

unread,
Nov 1, 2005, 10:20:45 AM11/1/05
to
On Tuesday 01 November 2005 15:06, Tobias Krais wrote:
> solangsam bin ich am verzweifeln. Ich habe auf meiner Maschine
> (localhost) Squid installiert und mittels iptables zum transparenten
> Proxy gemacht:
>
> iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 8080
>
> In der squid.conf habe ich folgendes eingetragen:
>
> httpd_accel_host virtual
> httpd_accel_port 80
> httpd_accel_with_proxy on
> httpd_accel_uses_host_header on
>
> Jetzt sollte es doch funktionieren. Tut es aber nicht. Ich bekomme jetzt
> auf jeder Seite folgenden Fehler:
> -----%<------
> The following error was encountered:
>
> * Access Denied.
>
> Access control configuration prevents your request from being
> allowed at this time. Please contact your service provider if you feel
> this is incorrect.
> -----%<-----
>
> Wenn ich den Squid manuell als Proxy eintrage funktioniert alles
> wunderbar. Also habe ich mich an die ACLs gemacht und als einzigste
> Regel folgendes stehen lassen:
>
> http_access allow all
>
> hilft aber auch net.

Entweder ist das nicht die einzige "http_access"-Zeile oder du hast die ACL
namens "all" verbogen. Oder du hast den Server nicht reloaded (squid -k
reconfig).

Christoph
--
~
~
~
".signature" [Modified] 3 lines --100%-- 3,41 All

Tobias Krais

unread,
Nov 1, 2005, 10:40:19 AM11/1/05
to
Hi Christoph,

> Entweder ist das nicht die einzige "http_access"-Zeile

Alles ausprobiert. Momentan sieht es so aus:
acl all src 0.0.0.0/0.0.0.0
acl localnet src 192.168.1.0/24
acl localhost src 127.0.0.1/255.255.255.255
http_access allow localnet
http_access allow all
http_access allow localhost

Ist zwar doppelt gemoppelt, aber egal.

> oder du hast die ACL namens "all" verbogen.

Sieht folgendermaßen aus (habe ich unangetastet gelassen):
acl all src 0.0.0.0/0.0.0.0


> Oder du hast den Server nicht reloaded (squid -k
> reconfig).

/etc/init.d/squid reload tuts ja auch, oder?

Grüssle, Tobias

Christoph Haas

unread,
Nov 1, 2005, 1:20:13 PM11/1/05
to
On Tuesday 01 November 2005 16:33, Tobias Krais wrote:
> > Entweder ist das nicht die einzige "http_access"-Zeile
>
> Alles ausprobiert. Momentan sieht es so aus:
> acl all src 0.0.0.0/0.0.0.0
> acl localnet src 192.168.1.0/24
> acl localhost src 127.0.0.1/255.255.255.255
> http_access allow localnet
> http_access allow all
> http_access allow localhost
>
> Ist zwar doppelt gemoppelt, aber egal.
>
> > oder du hast die ACL namens "all" verbogen.
>
> Sieht folgendermaßen aus (habe ich unangetastet gelassen):
> acl all src 0.0.0.0/0.0.0.0
>
> > Oder du hast den Server nicht reloaded (squid -k
> > reconfig).
>
> /etc/init.d/squid reload tuts ja auch, oder?

Ja, sollte es.

Setz mal in deiner squid.conf:

debug_options ALL,1 33,2

Dann "squid -k reconfig". Dein /var/log/squid/cache.log zeigt dir dann
an, welche ACLs gegriffen hat. Vielleicht gibt dir das noch einen Hinweis.

Gruß,

Tobias Krais

unread,
Nov 2, 2005, 4:20:26 AM11/2/05
to
Hi Christoph,

>>Alles ausprobiert. Momentan sieht es so aus:
>>acl all src 0.0.0.0/0.0.0.0

>>http_access allow all

Momentane config.

> debug_options ALL,1 33,2

OK. Gibt folgendes Ergebnis beim Seitenaufruf:
-----%<-----
1130922617.573 0 127.0.0.1 TCP_NEGATIVE_HIT/403 1516 GET
http://www.google.de/ - NONE/- text/html
-----%<-----

?!?

Christoph Haas

unread,
Nov 2, 2005, 5:10:12 AM11/2/05
to
On Wednesday 02 November 2005 10:14, Tobias Krais wrote:
> >>Alles ausprobiert. Momentan sieht es so aus:
> >>acl all src 0.0.0.0/0.0.0.0
> >>http_access allow all
>
> Momentane config.
>
> > debug_options ALL,1 33,2
>
> OK. Gibt folgendes Ergebnis beim Seitenaufruf:
> -----%<-----
> 1130922617.573 0 127.0.0.1 TCP_NEGATIVE_HIT/403 1516 GET
> http://www.google.de/ - NONE/- text/html
> -----%<-----

cache.log! Nicht access.log

Christoph

--
~
~
~
".signature" [Modified] 3 lines --100%-- 3,41 All

Tobias Krais

unread,
Nov 2, 2005, 9:40:25 AM11/2/05
to
Hi Christoph,

>>>>Alles ausprobiert. Momentan sieht es so aus:
>>>>acl all src 0.0.0.0/0.0.0.0
>>>>http_access allow all

>>>debug_options ALL,1 33,2

Sorry, hier die cache.log
-----%<-----
2005/11/02 15:30:05| The request GET
http://groups.google.de:80/grphp?hl=de&tab=ig&ie=UTF-8&q= is ALLOWED,
because it matched 'all'
2005/11/02 15:30:05| The request GET
http://groups.google.de:80/grphp?hl=de&tab=ig&ie=UTF-8&q= is ALLOWED,
because it matched 'all'
2005/11/02 15:30:05| WARNING: Forwarding loop detected for:
GET /grphp?hl=de&tab=ig&ie=UTF-8&q= HTTP/1.0
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.2
(like Gecko) (Debian package 4:3.4.2-4)
Referer: http://www.google.de/imghp?hl=de&tab=wi&ie=UTF-8&q=
Accept: text/html, image/jpeg, image/png, text/*, image/*, */*
Accept-Encoding: identity,gzip,deflate
Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5
Accept-Language: de, en
Host: groups.google.de
Via: 1.1 localhost.localdomain:3128 (squid/2.5.STABLE10)
X-Forwarded-For: 127.0.0.1
Cache-Control: max-age=259200
Connection: Close

2005/11/02 15:30:05| The reply for GET
http://groups.google.de/grphp?hl=de&tab=ig&ie=UTF-8&q= is ALLOWED,
because it matched 'all'
2005/11/02 15:30:06| The request GET
http://groups.google.de:80/favicon.ico is ALLOWED, because it matched 'all'
2005/11/02 15:30:06| The request GET
http://groups.google.de:80/favicon.ico is ALLOWED, because it matched 'all'
2005/11/02 15:30:06| WARNING: Forwarding loop detected for:
GET /favicon.ico HTTP/1.0
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.2
(like Gecko) (Debian package 4:3.4.2-4)
Accept: text/html, image/jpeg, image/png, text/*, image/*, */*
Accept-Encoding: identity,gzip,deflate
Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5
Accept-Language: de, en
Host: groups.google.de
Via: 1.1 localhost.localdomain:3128 (squid/2.5.STABLE10)
X-Forwarded-For: 127.0.0.1
Cache-Control: max-age=259200
Connection: Close

2005/11/02 15:30:06| The reply for GET
http://groups.google.de/favicon.ico is ALLOWED, because it matched 'all'
-----%<-----

Zwei interessante Stellen sind da drin. Muss mal googeln.

Grüssle, Tobias

Marco Eisenhuth

unread,
Nov 2, 2005, 12:50:27 PM11/2/05
to
Am Wed, 02 Nov 2005 15:33:10 +0100 schrieb Tobias Krais:

> Via: 1.1 localhost.localdomain:3128 (squid/2.5.STABLE10)

^^^^^
und aus dem OP:
> iptables ..... REDIRECT --to-port 8080
^^^^

auf welchem Port läuft Dein Squid?

Grüße, Marco.

Tobias Krais

unread,
Nov 2, 2005, 3:30:16 PM11/2/05
to
Hi Marco,

>>Via: 1.1 localhost.localdomain:3128 (squid/2.5.STABLE10)
> ^^^^^
> und aus dem OP:
>
>>iptables ..... REDIRECT --to-port 8080
> ^^^^
>
> auf welchem Port läuft Dein Squid?

Squid auf 3128. Dansguardian auf 8080. Allerdings scheint mir das auch
irgendeine Portgeschichte zu sein. Wenn ich die iptables Regel nicht
verwende und den Proxy manuell eintrage funktioniert alles wunderbar.

Grüssle, Tobias

0 new messages