[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Debian] Transferraten von ProFTP steuern?



Servus, Gemeinde!

Folgendes Problem:

ich will die Transferraten meines ProFTPD-Servers für diverse
Verbindungen steuern;
und so sollte das aussehen:

-  Transers im LAN(Klasse C,10 MBit) sollen mit max 1Mbit/s pro
Verbindung laufen;
-  Transfers ins/aus dem Internet(DSL-Anschluss) sollen mit max 10
KByte/s pro Vebindung laufen.

Die Frage nun lautet - wie stelle ich das an?

Die Variblen dafür habe ich bereits in der Proftpd-Manual gefunden, aber
wie soll ich die einfügen?

----------------
#zero means no limit
# transfer in bytes/s
RateReadBPS   0
RateWriteBPS   0
---------------

Eine Bedingung ala " RateReadBPS 10000 if IPMASK!=192.168.0.0" o.ä. ist
wonach isc suche,
sprich mit welcher ich die Geschwindigkeit in Abhängigkeit von
_IP-Adressen_ steuern kann.
Das ich dies auch mit der Direktive

<Directory /home/anon-ftp>
RateReadBPS 10000
RateWriteBPS 10000
</Directory>

möglich, blos dann eben nur nach Verzeichnissen;
ich will aber das die Unterscheidung nach IP's erfolgt, und nicht nach
Verzeichnissen und Usern.
Apropos, ist denn eine solche Unterscheidung nach _User_ möglich?


Danke.

P.S. ProFTP v1.2.0, Kernel 2.2.16.
        Hier meine proftpd.conf:

---------------------------------------------------------------------

# This is a basic ProFTPD configuration file. It establishes a single
# server and a single anonymous login. It assumes that you have a
# user/group "nobody"/"nogroup" for normal operation and anon.

ServerName   "Jeronimo"
ServerType   standalone
ServerAdmin   root@localhost
ServerIdent   on "Ready; authenticate yourself..."
DeferWelcome   on
DefaultServer   on
ShowSymlinks   on
MultilineRFC2228  on
AllowOverwrite   on
TimeoutNoTransfer  600
TimeoutStalled   300
TimeoutIdle   600
DisplayLogin                /etc/welcome.msg
IdentLookups    on
TimeoutLogin   600
Port    21
Umask    022 022
User    nobody
Group    nogroup
PathDenyFilter    "(\.ftpaccess)|(\.htaccess)$"
PathAllowFilter   "^[a-zA-Z0-9 _.-]+$"
DenyFilter     "%"
MaxInstances                    5
UseReverseDNS          off
IdentLookups           on
TransferLog            /var/log/proftpd.log
LogFormat              default "At local time %t from %a(remote user %l;
local user %u) got a command %m to get/send %f ;  %b bytes got/send"
ExtendedLog            /var/log/proftpd.paranoid_log  ALL default
DefaultRoot    ~ users,!trusted
MaxLoginAttempts                3
RequireValidShell               yes

#zero means no bandwidth limit; in bytes_per_second
# DA! WIE UND WO SOLLEN DIE WERTE EIGEFÜGT WERDEN ???
#RateReadBPS   0
#RateWriteBPS   0

# IP-Limitierung
# Hier - keine
<Limit LOGIN>
Order Allow,Deny
Allow from all
# oder eben
#
# Allow from
128.44.26.,128.44.26.,myhost.mydomain.edu,.trusted-domain.org
# Deny from all
</Limit>

AllowRetrieveRestart on
AllowStoreRestart off
RootLogin off
DefaultTransferMode binary
tcpNoDelay on
UseFtpUsers on

# Normally, we want files to be overwriteable.
<Directory /*>
  AllowOverwrite  on
</Directory>

#
# ANONYMOUS
<Anonymous /home/ftp>
 User    ftp
 Group    nogroup
 UserAlias   anonymous ftp
    AnonRequirePassword  off
    RequireValidShell  off
    DirFakeGroup   on
    DirFakeMode    0640
    DirFakeUser    On
    ShowDotFiles    Off
 MaxClients   3
 DisplayLogin   welcome.msg

    # Limit WRITE everywhere in the anonymous chroot
    <Directory *>
       <Limit WRITE>
  DenyAll
  </Limit>
 </Directory>

      # Deny all read/write operations in incoming. Because these are
command-group
      # limits, we can explicitly permit certain operations which will
take precedence
      # over our group limit.
       <Directory incoming>
       <Limit READ WRITE>
       DenyAll
       </Limit>

       # The only command allowed in incoming is STOR (transfer file
from client to server)

       <Limit STOR>
       AllowAll
       </Limit>
      </Directory>
</Anonymous>







Reply to: