The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  вход/выход  слежка  RSS
"Настройка netacct"
Вариант для распечатки  
Пред. тема | След. тема 
Форумы OpenNET: Виртуальная конференция (Public)
Изначальное сообщение [Проследить за развитием треда]

"Настройка netacct"  
Сообщение от s0lar (ok) on 12-Сен-07, 19:14 
Здрасте. Помогите, плз. На сервере был настроен учет траффика на основе netacct и роботал он хорошо. Но после перенастройки сети netacct стал счтитать траффик только на шлюзе. Раншье была статистика по ip пользователей. Нужно восстановить как было.
На серваке 2 сет. карты.
eth0 - внешний адрес (т.е. в интернет смотрит)
eth1 - внутренная сеть с адресами 192.168.202.0-254

Я так же поставил squid и настроил его прозрачно + в iptables добавил редирект 80 порта на 3128. Если вырубить сквид и удалить редирект, то ситуация не меняется. Я так же пробовал в конфиге netacct менят интерфейс который он должен слушать, но все равно не помогает.
Подсажите как настроить?

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

 Оглавление

Сообщения по теме [Сортировка по времени | RSS]


1. "Настройка netacct"  
Сообщение от Virtual email(??) on 13-Сен-07, 15:43 
>[оверквотинг удален]
>На серваке 2 сет. карты.
>eth0 - внешний адрес (т.е. в интернет смотрит)
>eth1 - внутренная сеть с адресами 192.168.202.0-254
>
>Я так же поставил squid и настроил его прозрачно + в iptables
>добавил редирект 80 порта на 3128. Если вырубить сквид и удалить
>редирект, то ситуация не меняется. Я так же пробовал в конфиге
>netacct менят интерфейс который он должен слушать, но все равно не
>помогает.
>Подсажите как настроить?

/usr/local/etc/naccttab в студию! или где оно у вас лежит?

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

2. "Настройка netacct"  
Сообщение от s0lar (ok) on 13-Сен-07, 16:50 
>/usr/local/etc/naccttab в студию! или где оно у вас лежит?

database mysql                  # "mysql" or "file"
                                # choose to write in mysql or in
                                # /var/log/net-acct
                                # now it works :)

mysql_user acct                 # usually you don't need to change this

mysql_password heenrootheen1364 # change this to your password

mysql_host localhost            # sometimes you need to change this to
                                # 127.0.0.1 instead of localhost

mysql_database netacct          # usually you don't need to change this

mysql_table traffic             # table name

pidfile  /var/run/nacctd.pid    # set pid file
                                # tis will help if you want to
                                # two (or more) nacctd on same machine

compactnet 192.168.202.0        255.255.255.0
compactnet 81.26.140.174        255.255.255.248

                                # log only summary day trafic for this network
                                # patch by Boril

flush 300                       # flush every 5 minutes
                                # this gives the interval in seconds
                                # when the accumulated data is flushed
                                # to the output file

fdelay 60                       # this defines after how many seconds
                                # of inactivity a certain record of
                                # traffic information may be written out
                                # this helps making the logfiles smaller
                                # since only one output record will be
                                # generated for related traffic

file /var/log/net-acct          # defines output file
                                # this is the regular output file of
                                # the daemon

dumpfile /var/log/net-acct-dump # defines dump file
                                # this is used to dump the not yet
                                # written information so this is not
                                # lost should the machine crash
                                # on startup an eventuelly existing
                                # file of this name will be moved
                                # to *.o

notdev eth0                     # Dont log entries for this device
                                # Use this on routers that you dont
                                # log forwarded packets twice.

device eth1                     # device to put into promiscous mode
                                # you can specify as many as you want
                                # and you don't have to specify one
                                # (e.g. if this runs on your router)
                                #
                                # if you plan to use it on some *BSD
                                # system put here apropriate device
                                # i.e. - device ep0

# iflimit eth0                  # on machines with multiple interfaces,
                                # log only packets on this interface
                                # mutually exclusive with hostlimit

ignoremask 255.255.255.0        # Ignore traffic on same class C net
                                # This means traffic that is on
                                # your local LAN is not counted.
                                # This is useful for NFS etc.
                                # Not giving this option causes everything
                                # to be counted.
                                # This can degrade performance seriously!

ignorenet 127.0.0.0 255.0.0.0   # ignore loopback net
                                # You can define as many ignorenets as
                                # you want. Ignoring a net with
                                # ignorenet is not as efficient as
                                # ignoremask. Thus you should exclude
                                # your local network with ignoremask,
                                # not with ignorenet (although this is
                                # is possible).

# masqif  192.168.72.141 # if compiled with -DREMAP_MASQUERADE:
# ipnumber you are masquerading as,
# this remaps ip/port for incoming
# connections (e.g. ftp-data) to ip/port
# of the masqueraded destination

debug 2                         # set debugging level
debugfile /tmp/nacctd.debug     # where to put debugging info

# Device configuration
# Defines where the real data starts for each type of interface
# First give the name prefix, then the offset in bytes to the start
# of the real data, then the offset of the type field in bytes. If
# there is no type field, just give a 0.
# Don't specify SLIP or PPP devices here, otherwise association of
# dynamic ip-addresses with usernames won't work
# Put device types with more traffic last.

headers tr      40      38
headers lo      14      12
headers isdn    4       0
# headers isdn  14      0       # for hdlc/trans/cisco and hdlc/trans/raw
headers eth     14      12
headers plip    14      12

# For dynamic slip/ppp

dynamicip /var/run              # where files for dynamic ip are stored
dynamicnet 202.36.94.0 255.255.255.0    # on which network are all the
                                        # dynamically assigned adresses

exclude-name-lookup     202.36.94.1     255.255.255.255
exclude-name-lookup     202.36.94.253   255.255.255.255

# hostlimit 12.34.56.78         # log only packets to/from this host
# hostlimit 34.56.78.12         # and this one too
                                # this option is mutually exclusive with iflimit

# For disabling certain fields
# This is commented out by default
# Field 7 is disabled by default so we match the old (pre 0.5) output format
# Now everything is disableb by default and it works ... if you disable
# src_ip address it will write empty cell in mysql or data_size it will
# write 0 in mysql
#
# disable 2                     # disable output of protocol
# disable 3                     # disable output of source address
# disable 4                     # disable output of source port
# disable 5                     # disable output of destination address
# disable 6                     # disable output of destination port
# disable 7                     # disable output of packets count
# disable 8                     # disable output of byte count
# disable 9                     # disable output of device name
# disable 10                    # disable output of user name
# disable 11                    # disable output of duration
# disable 12                    # disable output of peering flag

# For excluding certain hosts from ignoring
# This can be useful for a kludgy way to account for proxy traffic, you'd then
# add your proxy server here.
# I guess I should consider using some filter language...
# This is commented out by default
# This does not affect addresses excluded by ignoremask,
# as this would impose too much of a performance penalty
# dontignore 127.3.4.5 255.255.255.255  # Don't ignore host 127.3.4.5,
                                        # although it would be excluded by
                                        # above ignorenet statement

# line sl0 ttyS0                # One way to
                                # assign traffic to a user is if both
                                # of the following conditions meet:
                                # a) nacctd runs on the ppp/slip server
                                # b) the relation between network interface
                                # (e.g. sl0, ppp1) and serial line (e.g.
                                # ttyS1) is fixed.
                                # You can give as many line statements
                                # as you want
                                # There is a better way now, so this is
                                # commented out

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

3. "Настройка netacct"  
Сообщение от Virtual email(??) on 14-Сен-07, 06:53 
во первых: может пора его обновить(netacct)?
во вторых сразу с ходу ошибка

ignoremask 255.255.255.0

этим самым вы игнорируете сети класса С коей является ваша локалка вывод закоментировать сию строку

так же подозреваю что

compactnet 81.26.140.174        255.255.255.248

тоже не нужна, зачем считать трафик на внешнем интерфейсе?

если ресурс сервака позволяет то
flush 300
поменять на
flush 10


ну и позволю себе напомнить что на http://netacct-mysql.gabrovo.com/
уже давно лежит версия поновее а так же там можно найти описалово на русском языке
удачи.

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

4. "Настройка netacct"  
Сообщение от s0lar (ok) on 18-Сен-07, 09:43 
>[оверквотинг удален]
>так же подозреваю что
>
>compactnet 81.26.140.174        255.255.255.248
>
>тоже не нужна, зачем считать трафик на внешнем интерфейсе?
>
>если ресурс сервака позволяет то
>flush 300
>поменять на
>flush 10

Слушай.. Что-то все по прежнему. Я сдела так как ты написал, рестартнул, но всеравно по старому - считает только на шлюзе

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

5. "Настройка netacct"  
Сообщение от Virtual email(??) on 08-Окт-07, 02:47 
>[оверквотинг удален]
>>
>>тоже не нужна, зачем считать трафик на внешнем интерфейсе?
>>
>>если ресурс сервака позволяет то
>>flush 300
>>поменять на
>>flush 10
>
>Слушай.. Что-то все по прежнему. Я сдела так как ты написал, рестартнул,
>но всеравно по старому - считает только на шлюзе

попробуй пере собрать netacct-mysql ну еще как вариант где то недокрутил настройки сети
у меня после перенастройки сети все окей завелось
и еще вопрос а чего именно перенастроили то ?

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

Архив | Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Оцените тред (1=ужас, 5=супер)? [ 1 | 2 | 3 | 4 | 5 ] [Рекомендовать для помещения в FAQ]




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру