ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Alexandr R. Ogurtzoff" <aogurtsov@hostopia.com>
To: community@altlinux.ru
Subject: [Comm] iptables accounting
Date: Fri, 20 Aug 2004 14:53:56 +0000
Message-ID: <200408201453.56514.aogurtsov@hostopia.com> (raw)

Приветствую!
Взгляните свежим взглядом, может чего упустил.
Я пишу учёт входящего\исходящего трафика для внутренней сети
будет ли работать?
(кусочек)
 # Internal gateway IP = 192.168.1.1
 
INET_IP="X.X.X.X"
INET_IFACE="eth0"

LAN_IP="192.168.1.100"
LAN_IP_RANGE="192.168.1.0/24"
LAN_IFACE="eth1"

 LAN_OLDER_MASK="192.168.1"
 MAX_CHAIN=254

# Создаю цепочки по учёту трафика для внутренней сети
i=2
 while [ $i -le $MAX_CHAIN ]
        do
 $IPTABLES -A ACCOUNT_IN_$i -j RETURN
 $IPTABLES -A ACCOUNT_OUT_$i -j RETURN
         i=`expr $i + 1`
        done
# Наполняю их в таблице форварда 
i=2
 while [ $i -le $MAX_CHAIN ]
        do
         $IPTABLES -A FORWARD -i $INET_IFACE -d $LAN_OLDER_MASK.$i -j 
ACCOUNT_IN_$i
         $IPTABLES -A FORWARD -o $INET_IFACE -s $LAN_OLDER_MASK.$i -j 
ACCOUNT_OUT_$i	 
         i=`expr $i + 1`
        done
Про трафик на внутренние нужды знаю, логично ли я предположил что в цепочках
ACCOUNT_IN_101
ACCOUNT_OUT_101
счётчики будут хранить объём входящего и исходящего трафика для 192.168.1.101 
соответвенно.

 Прошу прощения за беспокойство, но что то уже туго соображаю... По идее всё 
верно.
Использование SNAT|DNAT тоже вроде как не должно мешаться....
-- 
Best regards
Alexandr R. Ogurtzoff


             reply	other threads:[~2004-08-20 14:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-20 14:53 Alexandr R. Ogurtzoff [this message]
2004-08-20 17:10 ` Andy Gorev
2004-08-20 17:02   ` Nick S. Grechukh
2004-08-20 17:20     ` Andy Gorev
2004-08-20 17:19       ` Nick S. Grechukh
2004-08-20 17:46         ` Andy Gorev
2004-08-30  8:12           ` Nick S. Grechukh
2004-08-20 17:48       ` Alexandr R. Ogurtzoff
2004-08-20 17:52         ` Andy Gorev
2004-08-20 17:55 ` Andy Gorev
2004-08-20 18:23   ` [Comm] iptables accounting[JT] Alexandr R. Ogurtzoff
2004-08-20 18:56     ` Andy Gorev
2004-08-21  0:06       ` [Comm] " Michael Shigorin
2004-08-23  5:04     ` [Comm] " Mike Lykov
2004-08-23  5:34       ` Alexandr R. Ogurtzoff
2004-08-30  8:13       ` Nick S. Grechukh

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=200408201453.56514.aogurtsov@hostopia.com \
    --to=aogurtsov@hostopia.com \
    --cc=community@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