Squid Proxy auf der FBF 7050 ?

quicksilver

Neuer User
Mitglied seit
23 Feb 2005
Beiträge
105
Punkte für Reaktionen
0
Punkte
16
Hallo kennt jemand eine Möglichkeit auf der FBF 7050 einen Transparenten Proxy einzurichten? Ich möchte z.b. Squid und da bestimmte homepages verbieten und nur user per username und passwort den zugriff auf das Internet ermöglichen. Ich hatte sowas mal auf meiner Linux Kiste mit Squid realisiert aber an die FBF traue ich mich nicht ran :(

Wäre cool wenn da jemand was für mich hätte.
 
Und wo soll der cache von squid liegen - auf dem flash? :mrgreen:

Edit: es ist vielleicht möglich die /etc/host so abzuändern, dass die Seite auf eine ungültige IP verweist!
 
Netview schrieb:
Und wo soll der cache von squid liegen - auf dem flash? :mrgreen:
Squid muss nicht unbedingt mit Cache betrieben werden, allerdings braucht er vor allem Arbeitsspeicher, der auf der Fritzbox zu wenig ist.

Schau dich also nach einem kleineren Proxy um, der das kann was du willst. Btw. wie willst du die Benutzer daran hindern, dass sie ohne Proxy surfen? Dazu mußt du ja auf jeden Fall die Firmware modden, um iptables zu bekommen.

Mfg,
danisahne
 
Hi.
Ich hab mal tinyproxy compiliert. Der ist auch im Openwrt.

MfG Oliver
 

Anhänge

  • tinyproxy.tar.gz
    32.8 KB · Aufrufe: 490
Zuletzt bearbeitet:
ui cool danke! aber eine Frage wie binde ich den dann in der box ein ?!
 
Hi.
Du musst dir das Binary auf einen Webserver legen und bei jedem Neustart wieder holen:
Code:
serverurl="www.meinserver.de"
while !(ping -c 1 $serverurl); do
sleep 5
done
cd /var/tmp
wget [U]http://www.meinserver.de/tinyproxy[/U]
chmod +x tinyproxy
/var/tmp/tinyproxy
So ähnlich muss das in deine debug.cfg.

MfG Oliver
 
ok eine Andere möglichkeit gibt es nicht? das irgendwo auf der box selber zu speichern? Und wo packe ich die config hin?

ok und dani .. wegen iptables.. würde es dann reichen wenn ich "deine" firmware nehme? und dann den Proxy von oli einbinde? Wäre das dann die richtige kombination? bzw dani wäre es möglich das du den proxy in deine Firmware einbindest das er dort drauf ist und nicht wie oli beschreibt jedes mal heruntergeladen werden muss.

*edit 2*
Also ich haben nun das so gemacht wie du gesagt hast.. aber er sucht die config in etc/tinyproxy/ .. und dort kann ich aber kein verzeichnis erstellen da es dort readonly ist :(
 
Zuletzt bearbeitet:
Wenn du den dsmod nimmst, dann brauchst du das oben natürlich nicht machen. Du kannst das Binary dann einfach nach ds-0.2/root/usr/bin kopieren.
Mit dem Konfig-File wird das etwas komplizierter, das kann ich dir aus dem Kopf grad nicht sagen. Müsste ich erst probieren...
Versuch: Link von /etc/tinyproxy nach /var/tmp/flash/tinyproxy. Dort das Verzeichnis und die Dateien erstellen. Mit "modsave" speichern und hoffen, dass es nach einem reboot noch da ist. ;-)

Ruf mal "tinyproxy --help" auf, dann siehst du wie du das Konfigfile angeben kannst.

MfG Oliver
 
hmm also mit linken weiss ich nicht genau ob ich das kann.

also meinst du wäre es besser wenn ich den ds mod draufspiele?
 
Die Beschreibung bezieht sich auf den dsmod. :mrgreen:
Ohne mod wird das ja auch mit iptables nix.

MfG Oliver
 
ja aber mal davon abgesehen ich würde den dsmod nicht nutzen. wie müsste ich das dann machen das ich das verlinke?
 
Dann brauchst du nix verlinken. Ohne dsmod musst du das Binary samt Konfig vom Webserver abholen. Und dem tinyproxy dann per Parameter sagen wo die Konfig ist.

MfG Oliver

edit:
Code:
/var/mod/root # ./tinyproxy -h
Usage: tinyproxy [options]
Options:
  -d            Operate in DEBUG mode.
  -c FILE       Use an alternate configuration file.
  -h            Display this usage information.
  -l            Display the license.
  -v            Display the version number.

Features Compiled In:
    XTinyproxy Header
    Filtering
/var/mod/root # ./tinyproxy
./tinyproxy: Could not open configuration file "/etc/tinyproxy/tinyproxy.conf".
/var/mod/root # ./tinyproxy -c ./tinyproxy.conf
/var/mod/root #
Alles klar?
 
Zuletzt bearbeitet:
hm ne also bekomme es irgendwie nicht hin :( kann nicht surfen :(

Müsste der Prozess dann nicht laufen? weil wenn ich ps mache ist dort kein Prozess mit tiny.
ich starte den proxy mit
./tinyproxy -c tinyproxy.conf
dann kommt aber keine Meldung das er gestartet wird oder so.. kommt einfach nur wieder der prompt. Wenn ich die config weglasse kommt ein fehler.
 
Zuletzt bearbeitet:
hmm keine Idee?
 
Es wäre sehr hilfreich, wenn du
1. den Fehler
2. deine tinyproxy.conf
posten könntest.
Code:
/var/mod/root # ./tinyproxy
./tinyproxy: Could not open configuration file "/etc/tinyproxy/tinyproxy.conf".
/var/mod/root #
Ist das der Fehler? Dann wüsste ich schon mal, dass das Binary funktioniert!

MfG Oliver
 
Versuch doch mal den Debug Mode. Der Prozess tinyproxy sollte danach schon laufen und mit ps angezeigt werden können, sonst kann es nicht funktionieren.

Mfg,
danisahne
 
Ja das problem ist es kommt keine Fehlermeldung.. wenn ich das mit ps Liste ist tiny nirgends gelistet.
 
Hallo,

gibt es schon Lösungen zu diesem Problem?
Bei mir stellt es sich ähnlich da, wie bei quicksilver, ich versuche zu Starten und es passiert nichts.

# ./tinyproxy -c ./tinyproxy.conf
#

Ich habe keinen mod auf meiner FritzBox 5010, ist das eventuell das Problem?

Hier meine Tinyproxy.conf
Code:
##
## tinyproxy.conf -- tinyproxy daemon configuration file
##

#
# Name of the user the tinyproxy daemon should switch to after the port
# has been bound.
#
User root
Group root

#
# Port to listen on.
#
Port 8888

#
# If you have multiple interfaces this allows you to bind to only one. If
# this is commented out, tinyproxy will bind to all interfaces present.
#
#Listen 192.168.0.1

#
# The Bind directive allows you to bind the outgoing connections to a
# particular IP address.
#
#Bind 192.168.0.1

#
# Timeout: The number of seconds of inactivity a connection is allowed to
# have before it closed by tinyproxy.
#
Timeout 600

#
# ErrorFile: Defines the HTML file to send when a given HTTP error
# occurs.  You will probably need to customize the location to your
# particular install.  The usual locations to check are:
#   /usr/local/share/tinyproxy
#   /usr/share/tinyproxy
#   /etc/tinyproxy
#
# ErrorFile 404 "/usr/share/tinyproxy/404.html"
# ErrorFile 400 "/usr/share/tinyproxy/400.html"
# ErrorFile 503 "/usr/share/tinyproxy/503.html"
# ErrorFile 403 "/usr/share/tinyproxy/403.html"
# ErrorFile 408 "/usr/share/tinyproxy/408.html"

# 
# DefaultErrorFile: The HTML file that gets sent if there is no
# HTML file defined with an ErrorFile keyword for the HTTP error
# that has occured.
#
DefaultErrorFile "/usr/share/tinyproxy/default.html"

#
# StatFile: The HTML file that gets sent when a request is made
# for the stathost.  If this file doesn't exist a basic page is
# hardcoded in tinyproxy.
#
StatFile "/var/tmp/stats.html"

#
# Where to log the information. Either LogFile or Syslog should be set,
# but not both.
#
#Logfile "/var/log/tinyproxy.log"
Syslog On

#
# Set the logging level. Allowed settings are:
#	Critical	(least verbose)
#	Error
#	Warning
#	Notice
#	Connect		(to log connections without Info's noise)
#	Info		(most verbose)
# The LogLevel logs from the set level and above. For example, if the LogLevel
# was set to Warning, than all log messages from Warning to Critical would be
# output, but Notice and below would be suppressed.
#
LogLevel Info

#
# PidFile: Write the PID of the main tinyproxy thread to this file so it
# can be used for signalling purposes.
#
PidFile "/var/run/tinyproxy.pid"

#
# Include the X-Tinyproxy header, which has the client's IP address when
# connecting to the sites listed.
#
#XTinyproxy mydomain.com

#
# Turns on upstream proxy support.
#
# The upstream rules allow you to selectively route upstream connections
# based on the host/domain of the site being accessed.
#
# For example:
#  # connection to test domain goes through testproxy
#  upstream testproxy:8008 ".test.domain.invalid"
#  upstream testproxy:8008 ".our_testbed.example.com"
#  upstream testproxy:8008 "192.168.128.0/255.255.254.0"
#
#  # no upstream proxy for internal websites and unqualified hosts
#  no upstream ".internal.example.com"
#  no upstream "www.example.com"
#  no upstream "10.0.0.0/8"
#  no upstream "192.168.0.0/255.255.254.0"
#  no upstream "."
#
#  # connection to these boxes go through their DMZ firewalls
#  upstream cust1_firewall:8008 "testbed_for_cust1"
#  upstream cust2_firewall:8008 "testbed_for_cust2"
#
#  # default upstream is internet firewall
#  upstream firewall.internal.example.com:80
#
# The LAST matching rule wins the route decision.  As you can see, you
# can use a host, or a domain:
#  name     matches host exactly
#  .name    matches any host in domain "name"
#  .        matches any host with no domain (in 'empty' domain)
#  IP/bits  matches network/mask
#  IP/mask  matches network/mask
#
#Upstream some.remote.proxy:port

#
# This is the absolute highest number of threads which will be created. In
# other words, only MaxClients number of clients can be connected at the
# same time.
#
MaxClients 10

#
# These settings set the upper and lower limit for the number of
# spare servers which should be available. If the number of spare servers
# falls below MinSpareServers then new ones will be created. If the number
# of servers exceeds MaxSpareServers then the extras will be killed off.
#
MinSpareServers 5
MaxSpareServers 20

#
# Number of servers to start initially.
#
StartServers 10

#
# MaxRequestsPerChild is the number of connections a thread will handle
# before it is killed. In practise this should be set to 0, which disables
# thread reaping. If you do notice problems with memory leakage, then set
# this to something like 10000
#
MaxRequestsPerChild 0

#
# The following is the authorization controls. If there are any access
# control keywords then the default action is to DENY. Otherwise, the
# default action is ALLOW.
#
# Also the order of the controls are important. The incoming connections
# are tested against the controls based on order.
#
Allow 127.0.0.1
#Deny 192.168.1.20/24
Allow 192.168.1.0/24
Allow 192.168.178.0/24


#
# The "Via" header is required by the HTTP RFC, but using the real host name
# is a security concern.  If the following directive is enabled, the string
# supplied will be used as the host name in the Via header; otherwise, the
# server's host name will be used.
#
ViaProxyName "tinyproxy"

#
# The location of the filter file.
#
#Filter "/etc/tinyproxy/filter"

#
# Filter based on URLs rather than domains.
#
#FilterURLs On

#
# Use POSIX Extended regular expressions rather than basic.
#
#FilterExtended On

#
# Use case sensitive regular expressions.
#                                                                         
#FilterCaseSensitive On     

#
# Change the default policy of the filtering system.  If this directive is
# commented out, or is set to "No" then the default policy is to allow
# everything which is not specifically denied by the filter file.
#
# However, by setting this directive to "Yes" the default policy becomes to
# deny everything which is _not_ specifically allowed by the filter file.
#
#FilterDefaultDeny Yes

#
# If an Anonymous keyword is present, then anonymous proxying is enabled.
# The headers listed are allowed through, while all others are denied. If
# no Anonymous keyword is present, then all header are allowed through.
# You must include quotes around the headers.
#
#Anonymous "Host"
#Anonymous "Authorization"

#
# This is a list of ports allowed by tinyproxy when the CONNECT method
# is used.  To disable the CONNECT method altogether, set the value to 0.
# If no ConnectPort line is found, all ports are allowed (which is not
# very secure.)
#
# The following two ports are used by SSL.
#
#ConnectPort 443
#ConnectPort 563
 
Hi.
Du kannst in der tinyproxy.conf mal das File-Logging aktivieren:
Code:
Logfile "/var/log/tinyproxy.log"
#Syslog On
Dann kannst du dir mit "cat /var/log/tinyproxy.log" den Inhalt anschauen...

MfG Oliver
 
Moin, ich habe jetzt mal ein Logfile vom Start erzeugt.

Dabei erhalte ich folgende Ausgaben:

Code:
INFO      Apr 13 21:43:38 [1801]: Initializing tinyproxy ...
INFO      Apr 13 21:43:38 [1801]: Setting "Via" proxy name to: tinyproxy
INFO      Apr 13 21:43:38 [1801]: Setting stathost to "tinyproxy.stats".
INFO      Apr 13 21:43:38 [1803]: Now running as group "root".
INFO      Apr 13 21:43:38 [1803]: Now running as user "root".
ERROR     Apr 13 21:43:38 [1803]: Could not allocate memory for child counting.

Bedeutet es, meine Box hat zu wenig Speicher? Gibs eigentlich irgendwo eine Übersicht, wieviel Speicher welche Box hat?

Grüße
Hammerdown
 

Neueste Beiträge

Statistik des Forums

Themen
244,691
Beiträge
2,216,608
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.