Skip to main content.

Configuring

The next step is creating a configuration file. xianc looks for '/etc/xianc.conf' by default on *NIX and for 'xianc.conf' on Windows. Here is the first part:

# iptablescmd is of course only needed when using iptables as datasource
iptablescmd=/sbin/iptables
rrdtoolcmd=/usr/local/rrdtool-1.2/bin/rrdtool
debug=0
verbose=0

Change iptablescmd and rrdtoolcmd to match your system and needs. Next there are the debug and verbose options. If you ever wonder why something isn't working try turning them on, it might output something useful to you though don't be surprised if it all looks like Chinese to you. If you ever report a bug or a support request please attach the full output with debug enabled.

Next you need to define some cachefiles. Most configurations will do with just one file. In configurations where you want to provide your users with the statistics you probably don't want them to see how much other users sent, so in such a case you may want to prefer seperate cachefiles.

Finally you need to setup the individual rules. The example provides you with something to get started with.

When using iptables as datasource you could use the following cache and rules definition as example. The values provided must exactly match those that come from 'iptables -L -v'.

# filename;type;datasource;
cache0=/var/log/xianc/inout.rrd;rrdtool;iptables;
cache1=/var/log/xianc/teamspeak.rrd;rrdtool;iptables;

# target;protocol;optional;inif;outif;source;dest;extra;cache;id;
rule0=;all;;eth0;any;anywhere;anywhere;;cache0;
rule1=;all;;any;eth0;anywhere;anywhere;;cache0;
rule2=;udp;;eth0;any;anywhere;anywhere;udp dpt:8767;cache1;
rule3=;udp;;any;eth0;anywhere;anywhere;udp spt:8767;cache1;

When using windows as datasource you could use the following definitions. Note that there is currently only support for inbound and outbound traffic on Windows. The numbers xianc gets are those you see on the General tab of your lan connection.

cache0=inout.rrd;rrdtool;windows;
rule0=;;;;;;in;;cache0;input;
rule1=;;;;;;out;;cache0;output;