ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] iptables accounting
@ 2004-08-20 14:53 Alexandr R. Ogurtzoff
  2004-08-20 17:10 ` Andy Gorev
  2004-08-20 17:55 ` Andy Gorev
  0 siblings, 2 replies; 16+ messages in thread
From: Alexandr R. Ogurtzoff @ 2004-08-20 14:53 UTC (permalink / raw)
  To: community

Приветствую!
Взгляните свежим взглядом, может чего упустил.
Я пишу учёт входящего\исходящего трафика для внутренней сети
будет ли работать?
(кусочек)
 # 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-08-30  8:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-20 14:53 [Comm] iptables accounting Alexandr R. Ogurtzoff
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

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