Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: iptables accounting


  • Subject: Re: lug-bg: iptables accounting
  • From: Lyubomir Popov <zeal@xxxxxx>
  • Date: Tue, 06 Jan 2004 15:40:38 +0000

нека потребителите са на eth0, а i-net-a на eth1
за да отчиташ общия изходящ и входящ трафик за eth1:

iptables -N Accounting
iptables -A Accounting -o eth1 # upstream traffic
iptables -A Accounting -i eth1 # downstream traffic

iptables -A INPUT -i eth1 -j Accounting
iptables -A OUTPUT -o eth1 -j Accounting

iptables -A FORWARD -i eth1 -j Accounting
iptables -A FORWARD -o eth1 -j Accounting


за отчиташ за 1 ip (например 192.168.1.33) добавяш :

iptables -A Accounting -s 192.168.1.33 # upstream traffic
iptables -A Accounting -d 192.168.1.33 # downstream traffic

iptables -A INPUT -i eth0 -s 192.168.1.33 -j Accounting
iptables -A OUTPUT -o eth0 -d 192.168.1.33 -j Accounting

iptables -A FORWARD -i eth0 -s 192.168.1.33 -j Accounting
iptables -A FORWARD -o eth0 -d 192.168.1.33 -j Accounting


важно е тези правила да са първи, тъй като иначе ще има неотчетен трафик

поздрави,
Любо



Tosho Yankov wrote:
Zdravejite,
imam malyk problem v tochnostta na otchitane na accountinga si.
Eto q shemata
porxy i acconting na edna i systa mashina, real IP-ta za vsichki
usres. Do kato bqh vse oste s ipchains vischko beshe nared. Zakachah
broqchite na input i output verigata i vsichko si se broeshe ok. Sled
kato minah na iptables eto kakvo poluchih:

borqchite zakacheni na INPUT i OUTPUT verigite:
- broi se samo proxy trafika (bez vsichko ostanalo)

broqcha zakachen samo na FORWARD verigata
- broi se vsichko BEZ proxy trafika

broqcha zakachen kakto sledva
 - vhodqst - INPUT + FORWARD (tuk ne sym sigruen dali ne trqbva da mu
 kaja vyv forwarda -s moita_mreja/moita_maska
 - izhodqst - OUTPUT + FORWARD (otnovo dali trqbva da se okaje -d
 moita_mreja/moita_maska)

 ta taka tova v skobite poneje ne sym siguren i sa bes source i
 destination i imam otichtane na trafik v poveche ot kolkoto e
 deistvitelniq.

 Imam nujda ot pomost kak tochno trqbva da podredq verigite.
 Blagodarq Vi predvaritelno.

 P.S. Resheniq ot tipa na ipac-ng i kakvito i da e dopulnitelni
 softwares ne mi vyrshat rabota, prosto imam mnogo navyrzani scriptove
 koito vyrshat razni zadachi i iskam da imam vhodqst i izhodqt broqch,
 a az ot tam veche znam kakvo da si gi pravq :)



--
Best regards,
Lyubomir Popov aka zEAL

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.