From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <00bc01c13501$35d78240$0500000a@sasha> From: "Alexandre Redko" To: References: <002d01c1348a$459aab20$0200a8c0@rrrrr> Subject: Re: [mdk-re] ipchains & accounting MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: mandrake-russian-admin@altlinux.ru Errors-To: mandrake-russian-admin@altlinux.ru X-BeenThere: mandrake-russian@altlinux.ru X-Mailman-Version: 2.0 Precedence: bulk Reply-To: mandrake-russian@altlinux.ru List-Help: List-Post: List-Subscribe: , List-Id: Linux-Mandrake RE / ALT Linux discussion list List-Unsubscribe: , List-Archive: Date: Tue Sep 4 09:17:01 2001 X-Original-Date: Tue, 4 Sep 2001 09:19:45 +0400 Archived-At: List-Archive: List-Post: Добрый день! > кто как считает трафик по выделенке. У нас такая штука (подарок провайдера): /etc/rc.d/rc.account -------------------------- #!/bin/sh # Add new users under this line in address order!!! /sbin/ipchains -N acct_in /sbin/ipchains -N acct_out /sbin/ipchains -N acct_bth /sbin/ipchains -I input -j acct_in /sbin/ipchains -I output -j acct_out /sbin/ipchains -I input -j acct_bth /sbin/ipchains -I output -j acct_bth /sbin/ipchains -F acct_in /sbin/ipchains -F acct_out /sbin/ipchains -F acct_bth /sbin/ipchains -A acct_in -i eth1 /sbin/ipchains -A acct_out -i eth1 /sbin/ipchains -A acct_bth -i eth1 # user1 /sbin/ipchains -A acct_in -s 10.0.0.2/32 /sbin/ipchains -A acct_out -d 10.0.0.2/32 # user2 /sbin/ipchains -A acct_in -s 10.0.0.3/32 /sbin/ipchains -A acct_out -d 10.0.0.3/32 ...... ---------------------------- Потом то, что пишут эти правила каждые 5 минут обсчитывается скриптом на перле и пишется в файлы - общий трафик и поюзерно Regards to All Alexandr Redko LU # 178842 ICQ # 75828152