Portál AbcLinuxu, 12. května 2025 02:14

Dotaz: Nedari se z kompilovat ipac-ng

26.9.2007 11:49 Mirekh
Nedari se z kompilovat ipac-ng
Přečteno: 1111×
Odpovědět | Admin
Zdravim

Mam problem z kompilaci ipac-ng

Pouzivam Debian Sarge (gcc 4.1) a mam nainstaloveny iptables 1.3.6

Kompilace ipac-ng-1.31 probiha takto

checking for gcc... gcc

checking for C compiler default output... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking for an ANSI C-conforming const... yes

checking how to run the C preprocessor... gcc -E

checking for egrep... grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for size_t... yes

checking for gcc... (cached) gcc

checking whether we are using the GNU C compiler... (cached) yes

checking whether gcc accepts -g... (cached) yes

checking for gcc option to accept ANSI C... (cached) none needed

checking for gawk... no

checking for mawk... mawk

checking for bison... bison -y

checking for flex... flex

checking for yywrap in -lfl... yes

checking lex output file root... lex.yy

checking whether yytext is a pointer... yes

checking for ipchains... /sbin/ipchains

checking for iptables... /usr/local/sbin/iptables

checking for mktemp... /bin/mktemp

checking for perl5... no

checking for perl... /usr/bin/perl

checking for PQexec in -lpq... no

configure: WARNING: postgres library not found! support for optional storage "postgre" will be disabled hint: use the configure option '--with-postgresql-lib'

checking for gdbm_open in -lgdbm... yes

checking for mysql_query in -lmysqlclient... no

configure: WARNING: mysql library not found! support for optional storage "mysql" will be disabled

checking for sqlite_get_table in -lsqlite... no

configure: WARNING: sqlite library not found! support for optional storage "sqlite" will be disabled

checking for dlopen in -ldl... yes

checking gdbm.h usability... yes

checking gdbm.h presence... yes

checking for gdbm.h... yes

checking for default data directory... /var/lib/ipac

checking for default run file name... /var/run/ipac.rules

checking for default pid file name... /var/run/ipac.pid

checking for default flag file name... /var/lib/ipac/flag

checking for default status file name... /var/run/ipac.status

checking for default fetchipac lock file name... /var/lock/ipac.lck

checking for tmp directory... /tmp

checking for maximum rule name length... 32

checking for available storage methods... gdbm plain-file

checking for default storage method... gdbm (default)

checking for available access agents... files

checking for default access agent... files (default)

checking for default config directory... /etc/ipac-ng (default)

checking for default config file...

/etc/ipac-ng/ipac.conf (default)

checking for available accounting agents... ipchains iptables

checking for default accounting agent... iptables (default)

checking if ipacsum debugging is desired... no (default)

checking if database debugging is desired... no (default)

checking for default database name... ipac (default)

checking for default database port... (default)

configure: creating ./config.status

config.status: creating Makefile

config.status: creating storage/Makefile

config.status: creating agents/Makefile

config.status: creating access/Makefile

config.status: creating subst-config

config.status: creating access/files/Makefile

config.status: creating agents/ipchains/Makefile

config.status: creating agents/iptables/Makefile

config.status: creating storage/gdbm/Makefile

config.status: creating storage/plain-file/Makefile

config.status: creating ipactest

config.status: creating config.h

config.status: config.h is unchanged

make pak skonci chybou:

running subst on files: ipacsum fetchipac.8 ipacsum.8

ipac-convert.8...

ipacsum: unchanged

fetchipac.8: unchanged

ipacsum.8: unchanged

ipac-convert.8: unchanged

chmod +x ipacsum ipac-convert ipactest

touch dosubst

Making all in storage

make[1]: Entering directory `/usr/src/ipac-ng-1.31/storage'

Making all in gdbm

make[2]: Entering directory `/usr/src/ipac-ng-1.31/storage/gdbm'

make[2]: Nothing to be done for `all'.

make[2]: Leaving directory `/usr/src/ipac-ng-1.31/storage/gdbm'

Making all in plain-file

make[2]: Entering directory `/usr/src/ipac-ng-1.31/storage/plain-file'

make[2]: Nothing to be done for `all'.

make[2]: Leaving directory `/usr/src/ipac-ng-1.31/storage/plain-file'

make[1]: Leaving directory `/usr/src/ipac-ng-1.31/storage'

Making all in agents

make[1]: Entering directory `/usr/src/ipac-ng-1.31/agents'

Making all in ipchains

make[2]: Entering directory `/usr/src/ipac-ng-1.31/agents/ipchains'

gcc -c -I. -I../.. -DHAVE_CONFIG_H -g -O2 -Wall libipfwc.c -o libipfwc.o

libipfwc.c: In function 'ipfwc_strerror':

libipfwc.c:504: error: label at end of compound statement

make[2]: *** [libipfwc.o] Error 1

make[2]: Leaving directory `/usr/src/ipac-ng-1.31/agents/ipchains'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/usr/src/ipac-ng-1.31/agents'

make: *** [all-recursive] Error 1

Zde http://bugs.gentoo.org/show_bug.cgi?id=168067 to take nekdo resil ale ani po aplikovani obou patchu se nic nezmenilo.

Potrebuji na serveru rozjed IP uctovani a s ipac-ng se mi zda dost dobry (z mych predchozich zkusennosti). Bohuzel to vypada, ze ipac nepodporuje novejsi iptables (asi vyvoj skoncil). Ja mam opatchnute IPtables 1.3.6 pro podporu ip2p, imq apod. takze si nemohu dovolit nizsi verzi IPtables.

Ma nekdo rozchozeny ipac-ng.

Eventualne existuje novejsi nahrada za ipac-ng
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

michich avatar 26.9.2007 17:11 michich | skóre: 51 | blog: ohrivane_parky
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
Odpovědět | | Sbalit | Link | Blokovat | Admin
ani po aplikovani obou patchu se nic nezmenilo
Jakých dvou patchů? Já tam žádný nevidím.
make[2]: Entering directory `/usr/src/ipac-ng-1.31/agents/ipchains'
Základní problém je v tom, že se vůbec překládá cokoliv z adresáře ipchains :-)
libipfwc.c:504: error: label at end of compound statement
Smaž ten nadbytečný "default:" ve zdrojáku.
the.max avatar 26.9.2007 23:56 the.max | skóre: 46 | blog: Smetiště
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
Odpovědět | | Sbalit | Link | Blokovat | Admin
Ja uz par let pouzivam IPaccounting ktery drive rostl na http://ipaccounting.standus.com, nicmene ted uz tam (bohuzel) neni. zdrojaky se porad ale daji najit. treba u me: http://download.vseborice.net/ipaccounting. Na mail ti kdyztak muzu poslat odkaz na muj ipaccounting abys videl jak to vypada.
KERNEL ULTRAS Fan Team || Sabaton - nejlepší učitel dějepisu || Gentoo - dokud nás systemd nerozdělí.
27.9.2007 08:21 Mirekh
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
OK. Dekuji za tip.

Jestli muzes, tak mi posli odkaz na mirek79@centrum.cz

Jeste bych mel dotaz. Dival jsem se, ze vystupni data jsou generovana pres .cgi do tabulky. To mi nevadi.

Akorat by me zajimalo, zda se da udelat aby se generoval vystup v textove podobe (typu IPadresa - upload - download za dany casovy usek) ?

Pak uz bych si tyto udaje nasypal do Mysql DB a dal bych je zpracovaval pres php.
27.9.2007 13:30 Mirekh
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
Nedari se mi rozbehnout ten ipaccount.

Zobrazi se mi jenom tabulka s hlavickami ale zadne grafy. Snazil jsem se postupovat dle navodu a nic. Kdyz kliknu na nejaky odkaz upload ci dwnload tak mi apache2 hlasi ze ipaccounting.cgi neexistuje.

Prosim o radu
27.9.2007 16:20 Mirekh
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
....mozna budu mit problem se spatne nastavenym apachem.
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
        Directory "/var/www/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        Directory>

    Alias /accounting "/var/www/html/ipaccounting/"
    Directory "/var/www/html/ipaccounting">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    /Directory>

Konfigurace ipaccount.xml vypada takto:
xml version="1.0" encoding="utf-8" standalone="no" ?>
config>
        iptables location="/usr/local/sbin/iptables" />
        rrdtool location="/usr/bin/rrdtool" />
        datadir location="/var/www/html/ipaccounting" />
        input type="list" name="/usr/local/etc/iplist" />
        options remove_unlisted_addresses="yes" delete_rrd="yes" />
        datafile format="text" name="data" />
        olddatafile format="xml" name="data.xml"/>
        arp-device add="eth1" />
        htmltemplate location="/var/www/html/ipaccounting/index.htmx" />
        wwwrefresh time="300" />
        graphscript url="/ipaccounting/rrd.php" />
/config>
..zejmena si nejsem jisty s parametrem graphscript Chova se to tak ze se mi

po zadani http://localhost/cgi-bin/ipaccounting.cgi zobrazi tabulka ale po kliknuti na IP adresu vyhodi chybu

The requested URL /ipaccounting/rrd.php was not found on this server.

Muze nekdo poradit ?

Dekuji
the.max avatar 27.9.2007 21:15 the.max | skóre: 46 | blog: Smetiště
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
Kdyztak se mi ozvi na jabber david@vseborice.net, nejak to vymyslime

pokud bude vule problem oresit, tak snad pak bude i vule zverejnit opravu chyby.
KERNEL ULTRAS Fan Team || Sabaton - nejlepší učitel dějepisu || Gentoo - dokud nás systemd nerozdělí.
the.max avatar 27.9.2007 21:13 the.max | skóre: 46 | blog: Smetiště
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
ipaccounting sbira data z iptables. ty pak uklada do rrd, ze ktereho se kresli grafy. ma tam i nekolik txt souboru ve kterych se prave (aspon tedy myslim) pocitaji prijata/odeslana data. nicmene to co chces se da vycitat i z rrd.
KERNEL ULTRAS Fan Team || Sabaton - nejlepší učitel dějepisu || Gentoo - dokud nás systemd nerozdělí.
1.10.2007 19:28 Mirekh
Rozbalit Rozbalit vše Re: Nedari se z kompilovat ipac-ng
Tak uz mi IPaccounting funguje (ipac-ng vsak stale ne)

Problem byl, ze v apache byl Alias /accounting zatimco v konfiguraku IPaccountingu posledni parametr na /ipaccounting/rrd.php

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.