On Wed, Nov 30, 2005 at 08:52:53AM +0700, [EMAIL PROTECTED] wrote:
> Rekan2 saya punya masalah dengan squid, distro saya pake Fedora Core 2.
> Internet sharing jalan dengan baik ... yang say perlukan sekarang adalah
> script untuk membatasi download user, misalkan user dengan address ip nya
> 172.16.20.1 s.d. 172.16.20.10 hanya boleh download dibawah 1 MB, kalo ada
> rekan2 yang tahu acl atau delay_pool nya boleh dong bagi bagi ilmunya ....
> sebelumnya saya ucapkan terima kasih ....

Bukannya di squid sudah ada batasan besar file yg didownload ?
Berikut ini cuplikan squid.conf:

#  TAG: reply_body_max_size     bytes allow|deny acl acl...
#        This option specifies the maximum size of a reply body in bytes.
#       It can be used to prevent users from downloading very large files,
#       such as MP3's and movies. When the reply headers are recieved,
#       the reply_body_max_size lines are processed, and the first line with
#       a result of "allow" is used as the maximum body size for this reply.
#       This size is checked twice. First when we get the reply headers,
#       we check the content-length value.  If the content length value exists
#       and is larger than the allowed size, the request is denied and the
#       user receives an error message that says "the request or reply
#       is too large." If there is no content-length, and the reply
#       size exceeds this limit, the client's connection is just closed
#       and they will receive a partial reply.
#
#       WARNING: downstream caches probably can not detect a partial reply
#       if there is no content-length header, so they will cache
#       partial responses and give them out as hits.  You should NOT
#       use this option if you have downstream caches.
#
#       If you set this parameter to zero (the default), there will be
#       no limit imposed.
#
#Default:
# reply_body_max_size 0 allow all

Jadi kalau ingin membatasi 1MB atau 1048576 Bytes kurang lebih scriptnya
seperti ini:

acl all src 0.0.0.0/0.0.0.0
acl localnet src 172.16.20.0/255.255.255.0
acl user1mb  src 172.16.20.1-172.16.20.10/255.255.255.0

reply_body_max_size 1048576 allow user1mb
reply_body_max_size 0 allow all


Silahkan dicoba dulu, semoga berhasil.

Salam,

~yudi




-- 
FAQ milis di http://wiki.linux.or.id/FAQ_milis_tanya-jawab
Unsubscribe: kirim email ke [EMAIL PROTECTED]
Arsip dan info milis selengkapnya di http://linux.or.id/milis

Kirim email ke