Fli4L mit proxy-Paket und opt-squid

ploieel

Aktives Mitglied
Mitglied seit
13 Mrz 2005
Beiträge
1,877
Punkte für Reaktionen
24
Punkte
38
Hallo,
vielleicht kann ja mir hier jemand mitlesender bei der Konfiguration ein wenig "in die Seite treten".

Ich poste mal einfach meine config-Dateien hier rein, eventuell gibt es den einen oder anderen Hinweis dazu.


proxy.txt

Code:
# Optional package: PRIVOXY (Privacy Enhancing Proxy)
#------------------------------------------------------------------------------
 OPT_PRIVOXY='yes'                  # privoxy: yes or no

PRIVOXY_LISTEN_N='1'              # number off interfaces to listen on
PRIVOXY_LISTEN_1='192.168.115.122:8118'
				  # use an ip adress or a symblic name like
				  # IP_NET_1_IPADDR followed by a port number
PRIVOXY_ALLOW_N='2'
PRIVOXY_ALLOW_1='IP_NET_1'        # open firewall for the hosts and networks
PRIVOXY_ALLOW_2='192.168.115.0/24'  # listed in the allow list

PRIVOXY_FORWARD=''                # optional forward-host:forward-port
PRIVOXY_TOGGLE='yes'              # may user switch privoxy off?
PRIVOXY_EDIT_CONFIG='yes'         # may users edit the config online?

PRIVOXY_LOGDIR=''                 # do you want a log file?
PRIVOXY_LOGLEVEL='1 4096 8192'    # what to log? (see manual)
PRIVOXY_USETOR='yes'               # forward all request to the tor anon proxy

OPT_TOR='yes'                      # install tor sock4/5 anon proxy
TOR_LISTEN_N='1'                  # number off interfaces to listen on
TOR_LISTEN_1='192.168.115.5:9050'
				  # use an ip adress or a symblic name like
				  # IP_NET_1_IPADDR followed by a port number

TOR_ALLOW_N='2'
TOR_ALLOW_1='IP_NET_1'            # open firewall for the hosts and networks
TOR_ALLOW_2='192.168.115.0/24'      # listed in the allow list


squid.txt

Code:
# Optional package: PROXY (squid)
#------------------------------------------------------------------------------
OPT_SQUID='yes'
SQUID_TRANSPARENT_CACHING='no'                  # squid redirects port 80 to
                                                # cache clients who do not
                                                # enter proxy in configuration
SQUID_HTTP_PORT='3128'                          # Squid listens on this port
                                                # default: 3128
SQUID_MEM_CACHE_SIZE='8'                        # in MB
                                                # default: 8
SQUID_DISK_CACHE_SIZE='128'                     # in MB
                                                # first Squid cache directory
SQUID_MAX_OBJECT_SIZE='65536'                   # maximum size of objects in
                                                # cache in kB
SQUID_WORK_DIR='/data/squid'                    # dir where cache and logs are
                                                # stored. Must have rw access
                                                # and should not be deleted on
                                                # reboot

#----------------------------------
# log file settings:
#----------------------------------
SQUID_CYCLE_LOG_N='10'                          # number of logfile rotations
                                                # (0=disable the rotation)
SQUID_CYCLE_LOG_TIME='172800'                   # if empty default of 48 hours
                                                # will be used. You have to set
                                                # it in seconds(48h=172800sec.)
                                                # could be 1h (3600) if you
                                                # have not enough space
                                                # after X sec. log files will
                                                # be deleted to free up space
SQUID_ACCESS_LOG='yes'                          # create access.log or not
SQUID_HTTPD_LIKE_LOG='yes'                      # emulate httpd like log entries
                                                # to make them more readable
                                                # e.g. if you don't want to have
                                                # a unix like timestamp in your
                                                # log's
                                                # prevents some loganalyzers

#----------------------------------
# squid network settings:
#----------------------------------
SQUID_AUTO_CONFIG='yes'                         # configure allowed networks
                                                # with networks in base.txt
SQUID_ACCESS_NET_N='1'                          # number of IP ethernet networks
SQUID_ACCESS_NET_1='192.168.115.0/24'                 # network wich is allowed to
                                                # access squid
SQUID_ACCESS_NET_2='172.16.0.0/12'              # network wich is allowed to
                                                # access squid
SQUID_ACCESS_NET_3='192.168.0.0/16'             # network wich is allowed to
                                                # access squid

#----------------------------------
# squid advanced settings:
#----------------------------------
SQUID_CACHE_DIR_N='0'                           # define more than cache dirs
                                                # if you want to spread cache
                                                # over multiple disks
SQUID_CACHE_1_DIR='/disk2/squid-cache'          # where the cache is located
SQUID_CACHE_1_SIZE='1000'                       # in MB

SQUID_NEXT_PROXY='no'                           # Parent Proxy
SQUID_NEXT_PROXY_URL='www-proxy.t-online.de'    # URL or IP of Parent Proxy
SQUID_NEXT_PROXY_PORT='80'                      # Port Parent Proxy

Zur Erklärung:

- mein Router hat die IP 192.168.115.5
- alle Clients sind im gleichen Netzwerksegment
- ich möchte beide Proxies kaskadieren, also soll der Weg vom Browser zum privoxy und weiter zum squid gehen. Und natürlich soll Tor auch noch benutzt werden...

Für die Profis hier unter uns sicherlich ein kleines Problem, für mich schon fast eine unüberwindliche Barriere.
Danke für die Hilfe.
 
Nunja, habe schon was gefunden:
auf der Web-Oberfläche im access-log gibt squid ein paar Fehlermeldungen aus, wo am Ende der Zeile immer steht: TCP_MISS doppelpunktDIRECT (doppelpunkt als : , sonst kommt ein smylie)

Wo liegt der Fehler?
 
ploieel schrieb:
- ich möchte beide Proxies kaskadieren, also soll der Weg vom Browser zum privoxy und weiter zum squid gehen.
Mein letzter Fli liegt lange zurück, aber wenn ich das richtig verstehe sollen die browser privoxy als proxy nutzen (um werbung zu filtern) und privoxy soll wiederum squid als Proxy benutzen (zum cachen). Demnach musst zu bei der privoxy-config den squid angeben:

PRIVOXY_FORWARD='' # optional forward-host:forward-port
--> PRIVOXY_FORWARD='localhost:3128'

Beim squid wiederum kannst du TOR als Proxy angeben:
SQUID_NEXT_PROXY
SQUID_NEXT_PROXY_URL
SQUID_NEXT_PROXY_PORT

Ansonsten empfehle ich die weltklasse fli4l-Dokumentation. Insbesodnere diese Zeile hier erscheint mir auch komisch:

PRIVOXY_LISTEN_1='192.168.115.122:8118'

Warum gibts du hier nicht "IP_NET_1_IPADDR:8118" an? Und wenn du mit Router, der die 192.168.115.5 hat, deinen Fli4L meinst, dann kann obige Zeile ja gar nicht stimmen. Da gibt man die Interfaces an, auf denen der Proxy lauscht.

Bei privoxy gibst du an:
PRIVOXY_LISTEN_1='192.168.115.122:8118'

Bei Tor
TOR_LISTEN_1='192.168.115.5:9050'

obwohl die auf der gleichen Maschine laufen, demnach müsstest du außer der NIC für DSL noch mindestens 2 weitere NICs im Fli4L haben, die im gleichen Subnetz hängen, was keinen Sinn macht. Ich denke, du hast schon privoxy falsch konfiguriert. Ich würde da jeweils "IP_NET_x_IPADDR:port" nehmen.

Also ich würde FLi4L Doku lesen. Mir scheint, das ist nicht wirklich geschehen. Mit der Doku und meinem Posting wirst du es schaffen.
 
Hallo kleinc,
ja genauso will ich es machen.

Zitat:
sollen die browser privoxy als proxy nutzen (um werbung zu filtern) und privoxy soll wiederum squid als Proxy benutzen (zum cachen). Demnach musst zu bei der privoxy-config den squid angeben:
Zitat Ende.

Ich habe nochmals Doku hin- und hergelesen, und auch Dein Posting versucht einzuarbeiten, trotzdem: wenn ich im Browser einen port 8118 oder 9050 eingebe, kommt beim Firefox eine Fehlermeldung: der Proxy hat die Verbindung zurückgewiesen. Es Funktioniert nur beim port 3128. Also der squid geht. Aber ich komme nicht weiter durch.

Ich poste nochmals die überarbeiteten Files und bitte Dich, nochmals kurz darüberwegzusehen:

squid:

Code:
# Optional package: PROXY (squid)
#------------------------------------------------------------------------------
OPT_SQUID='yes'
SQUID_TRANSPARENT_CACHING='no'                  # squid redirects port 80 to
                                                # cache clients who do not
                                                # enter proxy in configuration
SQUID_HTTP_PORT='3128'                          # Squid listens on this port
                                                # default: 3128
SQUID_MEM_CACHE_SIZE='8'                        # in MB
                                                # default: 8
SQUID_DISK_CACHE_SIZE='128'                     # in MB
                                                # first Squid cache directory
SQUID_MAX_OBJECT_SIZE='65536'                   # maximum size of objects in
                                                # cache in kB
SQUID_WORK_DIR='/data/squid'                    # dir where cache and logs are
                                                # stored. Must have rw access
                                                # and should not be deleted on
                                                # reboot

#----------------------------------
# log file settings:
#----------------------------------
SQUID_CYCLE_LOG_N='10'                          # number of logfile rotations
                                                # (0=disable the rotation)
SQUID_CYCLE_LOG_TIME='172800'                   # if empty default of 48 hours
                                                # will be used. You have to set
                                                # it in seconds(48h=172800sec.)
                                                # could be 1h (3600) if you
                                                # have not enough space
                                                # after X sec. log files will
                                                # be deleted to free up space
SQUID_ACCESS_LOG='yes'                          # create access.log or not
SQUID_HTTPD_LIKE_LOG='yes'                      # emulate httpd like log entries
                                                # to make them more readable
                                                # e.g. if you don't want to have
                                                # a unix like timestamp in your
                                                # log's
                                                # prevents some loganalyzers

#----------------------------------
# squid network settings:
#----------------------------------
SQUID_AUTO_CONFIG='no'                         # configure allowed networks
                                                # with networks in base.txt
SQUID_ACCESS_NET_N='1'                          # number of IP ethernet networks
SQUID_ACCESS_NET_1='192.168.115.0/24'                 # network wich is allowed to
                                                # access squid
SQUID_ACCESS_NET_2='172.16.0.0/12'              # network wich is allowed to
                                                # access squid
SQUID_ACCESS_NET_3='192.168.0.0/16'             # network wich is allowed to
                                                # access squid

#----------------------------------
# squid advanced settings:
#----------------------------------
SQUID_CACHE_DIR_N='0'                           # define more than cache dirs
                                                # if you want to spread cache
                                                # over multiple disks
SQUID_CACHE_1_DIR='/disk2/squid-cache'          # where the cache is located
SQUID_CACHE_1_SIZE='1000'                       # in MB

SQUID_NEXT_PROXY='yes'                           # Parent Proxy
SQUID_NEXT_PROXY_URL='192.168.115.5'    # URL or IP of Parent Proxy
SQUID_NEXT_PROXY_PORT='9050'                      # Port Parent Proxy

privoxy

Code:
# Optional package: PRIVOXY (Privacy Enhancing Proxy)
#------------------------------------------------------------------------------
OPT_PRIVOXY='yes'                  # privoxy: yes or no

PRIVOXY_LISTEN_N='1'              # number off interfaces to listen on
PRIVOXY_LISTEN_1='IP_NET_1_IPADDR:8118'
				  # use an ip adress or a symblic name like
				  # IP_NET_1_IPADDR followed by a port number
PRIVOXY_ALLOW_N='2'
PRIVOXY_ALLOW_1='IP_NET_1'        # open firewall for the hosts and networks
PRIVOXY_ALLOW_2='192.168.115.0/24'  # listed in the allow list

PRIVOXY_FORWARD='localhost:3128'                # optional forward-host:forward-port
PRIVOXY_TOGGLE='yes'              # may user switch privoxy off?
PRIVOXY_EDIT_CONFIG='yes'         # may users edit the config online?

PRIVOXY_LOGDIR=''                 # do you want a log file?
PRIVOXY_LOGLEVEL='1 4096 8192'    # what to log? (see manual)
PRIVOXY_USETOR='yes'               # forward all request to the tor anon proxy

OPT_TOR='yes'                      # install tor sock4/5 anon proxy
TOR_LISTEN_N='1'                  # number off interfaces to listen on
TOR_LISTEN_1='IP_NET_1_IPADDR:9050'
				  # use an ip adress or a symblic name like
				  # IP_NET_1_IPADDR followed by a port number

TOR_ALLOW_N='2'
TOR_ALLOW_1='IP_NET_1'            # open firewall for the hosts and networks
TOR_ALLOW_2='192.168.115.0/24'      # listed in the allow list

Muss ich in der base.txt noch irgendwelche ports forwarden? Oder vielleicht Firewall-Regeln ändern?

Danke für Deine Hinweise.
 
Muss ich in der base.txt noch irgendwelche ports forwarden? Oder vielleicht Firewall-Regeln ändern?
Nein, du kommst ja von intern, da darfst du auf alle Ports des Fli4L zugreifen (außer du hast da was gedreht).

Die Configs sehen ganz gut aus jetzt. Wenn du auf tor und privoxy keinen Zugriff hast, dann ist vielleicht "IP_NET_1" nicht dein LAN? Sondern "IP_NET_0" (in Ausnahmefällen denkbar). Also das kannst du in der base nachsehen, ganz sicher erscheint mir bei dir

PRIVOXY_LISTEN_1='192.168.115.5:8118'
TOR_LISTEN_1='192.168.115.5:9050'

aber du solltest schon wissen, ob "IP_NET_1_IPADDR" oder "IP_NET_0_IPADDR" die 192.168.115.5 ist!

An zwei Stellen hast du immer noch nicht richtig nachgelesen:

PRIVOXY_ALLOW_N='2'
PRIVOXY_ALLOW_1='IP_NET_1'
PRIVOXY_ALLOW_2='192.168.115.0/24'

TOR_ALLOW_N='2'
TOR_ALLOW_1='IP_NET_1'
TOR_ALLOW_2='192.168.115.0/24'

Du hast ja sicher nur 2 Netzwerkkarten in deinem FLi4L: Eine für DSL, eine fürs LAN. Demnach ist dort nur dein LAN anzugeben, entweder in der Form

PRIVOXY_ALLOW_N='1'
PRIVOXY_ALLOW_1='IP_NET_1'

oder in der Form

PRIVOXY_ALLOW_N='1'
PRIVOXY_ALLOW_1='192.168.115.0/24'

Beides zusammen macht bei dir keinen Sinn (sollte aber auch nicht schädlich sein).

Warum du jetzt auf die anderen Proxys nicht erreichst, weiß ich nicht. Du könntest ja auch einfach squid-privoxy-tor versuchen.

Ansonsten: Doku Doku Doku, und dann gibts immer noch dei Archive der FLi4L Newsgroups! Sehr empfehlenswert. :)
 
Na ja, es muss ja auch so gehen, dafür braucht man nur wirklich kein extra opt.
Mich würde hier schnell der Ehrgeiz packen. :)
 
Hallo kleinc,
Du machst mir Mut, es weiter zu versuchen, das privoxy zum laufen zu bekommen. :)

Es will einfach nicht. Ich habe jetzt den squid und den tor nicht weitergeleitet, und will erstmal privoxy solo zum laufen bekommen. Im Browser habe ich eingetragen: proxy 192.168.115.5, port 8118, und Firefox meldet:

Fehler: Proxy-Server verweigert die Verbindung

Firefox wurde konfiguriert, einen Proxy-Server zu nutzen, der die Verbindung zurückweist.

* Überprüfen Sie bitte, ob die Proxy-Einstellungen korrekt sind

* Kontaktieren Sie bitte Ihren Netzwerk-Administrator, um sicherzustellen, dass der Proxy-Server funktioniert


Ich poste hier nochmals meine config, um sicher zu sein, hier nichts falsches mehr eingetragen zu haben:

Code:
# Optional package: PRIVOXY (Privacy Enhancing Proxy)
#------------------------------------------------------------------------------
OPT_PRIVOXY='yes'                  # privoxy: yes or no

PRIVOXY_LISTEN_N='1'              # number off interfaces to listen on
PRIVOXY_LISTEN_1='IP_NET_1_IPADDR:8118'
				  # use an ip adress or a symblic name like
				  # IP_NET_1_IPADDR followed by a port number
PRIVOXY_ALLOW_N='1'
PRIVOXY_ALLOW_1='IP_NET_1'        # open firewall for the hosts and networks
                                  # listed in the allow list

PRIVOXY_FORWARD=''                # optional forward-host:forward-port
PRIVOXY_TOGGLE='yes'              # may user switch privoxy off?
PRIVOXY_EDIT_CONFIG='yes'         # may users edit the config online?

PRIVOXY_LOGDIR=''                 # do you want a log file?
PRIVOXY_LOGLEVEL='1 4096 8192'    # what to log? (see manual)
PRIVOXY_USETOR='no'               # forward all request to the tor anon proxy

OPT_TOR='no'                      # install tor sock4/5 anon proxy
TOR_LISTEN_N='1'                  # number off interfaces to listen on
TOR_LISTEN_1='IP_NET_1_IPADDR:9050'
				  # use an ip adress or a symblic name like
				  # IP_NET_1_IPADDR followed by a port number

TOR_ALLOW_N='1'
TOR_ALLOW_1='IP_NET_1'            # open firewall for the hosts and networks
                                  # listed in the allow list

und in der base.txt steht (Auszug):

Code:
# Ether networks used with IP protocol:
#------------------------------------------------------------------------------
IP_NET_N='1'                   # number of IP ethernet networks, usually 1
IP_NET_1='192.168.115.5/24'      # IP address of your n'th ethernet card and
                               # netmask in CIDR (no. of set bits)
IP_NET_1_DEV='eth0'            # required: device name like ethX

Es MUSS doch so gehen, aber es geht einfach nicht. :-(
 
Zuletzt bearbeitet:
Guck doch mal in die privoxy Logdateien.
 
Wo liegen die, bzw. wo kann ich das einrichten, dass welche geschrieben werden? In welchen Pfad gehören die Logfiles?

Mein Firefox meldet nach wie vor:

FEHLER
Der angeforderte URL konnte nicht geholt werden

Während des Versuches, den URL
http://p.p/
zu laden, trat der folgende Fehler auf:

* Es war unmöglich, eine IP-Adresse für p.p zu bestimmen.

Der DNS-Server gab:

Name Error: The domain name does not exist.

zurück.

Der Cache war nicht in der Lage, den in der URL enthaltenen Hostnamen aufzulösen. Überprüfen Sie, ob die Adresse korrekt ist.

Ihr Cache Administrator ist [email protected]4l.
Generated Sat, 04 Mar 2006 21:28:57 GMT by fli4l.lan.fli4l (squid/2.5.STABLE12)

Es ist doch so, das der squid funktioniert, nur leitet er die Anfragen nicht korrekt an den privoxy weiter. Und ich weiß auch nicht mehr weiter. :-(
 
ploieel schrieb:
Wo liegen die, bzw. wo kann ich das einrichten, dass welche geschrieben werden? In welchen Pfad gehören die Logfiles?
Lesen tust du weder Doku noch die Kommentare in den Konfig-Dateien...

PRIVOXY_LOGDIR='' # do you want a log file?
PRIVOXY_LOGLEVEL='1 4096 8192' # what to log? (see manual)

Das kann man doch nicht übersehen, setzt man sich ernsthaft mit dem Problem auseinander. Dann kann ich dir leider auch nicht weiter helfen.

Die Fehlermeldungen beim Aufruf einer fiktiven Domain (p.p) sind ja wohl auch selbsterklärend.

Viel Glück noch.
 
Jetzt sieht es so aus:

PRIVOXY_LOGDIR='/opt/etc/privoxy/'
PRIVOXY_LOGLEVEL='512'

in dem angegebenen Verzeichnis entsteht trotzdem kein logfile, mit WinSCP kann ich keines finden. Es gibt dort ein Verzeichnis templates und 4 files (default.action, standard.action, user.action, default.filter).

Noch eine Idee?
 
Weil man in /opt/etc nicht schreiben kann... Du brauchst natürlich eine Datenpartion, um Logfiles anzulegen und abzuspeichern.
 

Neueste Beiträge

Statistik des Forums

Themen
244,691
Beiträge
2,216,614
Mitglieder
371,308
Neuestes Mitglied
Chrischan 79
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.