From: "Alexandre Redko" <Mandrake@zlkz.spnet.ru>
To: <mandrake-russian@altlinux.ru>
Subject: Re: [mdk-re] ipchains & accounting
Date: Tue Sep 4 09:17:01 2001
Message-ID: <00bc01c13501$35d78240$0500000a@sasha> (raw)
In-Reply-To: <002d01c1348a$459aab20$0200a8c0@rrrrr>
Добрый день!
> кто как считает трафик по выделенке.
У нас такая штука (подарок провайдера):
/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
prev parent reply other threads:[~2001-09-04 9:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-03 19:05 rrrrr
2001-09-04 9:17 ` Alexandre Redko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00bc01c13501$35d78240$0500000a@sasha' \
--to=mandrake@zlkz.spnet.ru \
--cc=mandrake-russian@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git