2009년 5월 13일 수요일

ipaaccttable 설치 하기

#1235047265
cd ipaccttable/
#1235047266
ls

#1235047267
./configure --with-snmp-dlmod-dir=/usr/lib/snmp/dlmod --with-snmp-mib-dir=/usr/lib/snmp/mib
#1235047275
make
#1235047741
cd ..
#1235047741
ls
#1235047744
cd /usr/src/
#1235047745
ls
#1235047747
wget http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/i/ip/ipacct-snmp/ipAcctTable-0.1.tar.gz
#1235047754
ls
#1235047759
tar xvfz ipAcctTable-0.1.tar.gz
#1235047762
tar xvf ipAcctTable-0.1.tar.gz
#1235047765
cd ipAcctTable
#1235047766
ls
#1235047779
vim ipacct-snmp.c
#1235047794
iptab
#1235047800
vim ipacct-snmp.c
#1235047803
./configure --with-snmp-dlmod-dir=/usr/lib/snmp/dlmod --with-snmp-mib-dir=/usr/lib/snmp/mib



Installing
-----------------------------------------

1. Building

./configure --with-snmp-dlmod-dir=/path/to/snmp/dlmod/dir --with-snmp-mib-dir=/path/to/snmp/mib/dir
make
make install

2. Configuring Net-SNMP

add line to snmpd.conf:

dlmod ipAcctTable ipaccttable

3. Configuring Netfilter

iptables -t mangle -N Accounting

iptables -t mangle -A Accounting -s 10.1.1.1
iptables -t mangle -A Accounting -d 10.1.1.1
iptables -t mangle -A Accounting -s 10.1.1.2
iptables -t mangle -A Accounting -d 10.1.1.2
....

That's all !


dlmod ipAcctTable /usr/lib/snmp/dlmod/ipaccttable.so
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

댓글 없음:

댓글 쓰기