This OPT aims at detecting and analyzing each client's traffic as accurately as possible:
'no'
.
'yes'
activates the package.
'/boot/data/accounting'
.
This specifies the data directory. It should not be in a RAM disk.
In case you want to collect the data in a RAM disk (maybe to save hard
disk accesses) take a closer look at OPT_SARFILE or OPT_CPMVRMLOG
to save and restore your precious data.
'/var/run/accounting'
may NOT be specified as a
data directory or used as a target for save and restore operations.
'pppoe'
.
Specify the interfaces fli4l uses to route to the internet. Multiple
interfaces can be separated with spaces.
Example:
ACCOUNTING_INT='pppoe' # DSL ACCOUNTING_INT='circuit-1 circuit-2' # ISDN ACCOUNTING_INT='IP_NET_x_DEV' # Ethernet
'55 * * * *'
.
This setting is optional and can be omitted completely.
With this setting accounting.sh will be executed at defined time
intervals. For further information on the syntax please
read the documentation for package easycron.
It should be ensured that the traffic between two updates
does not exceed 4GB. An update shortly before the end of day is useful in order
to assign the traffic to the correct day. The default should be sufficient
for a bandwidth up to 9Mbit/s. This option requires an installed package easycron.
'no'
.
This setting is optional and can be omitted completely. 'yes'
will copy
the script acclearnips.sh to the fli4l router and ececute it every
ACCOUNTING_LEARNIPS_INTERVAL
minutes. The ARP cache of the router will be monitored and accounting
rules for new IP addresses will be created. This option requires an
installed package easycron.
''
.
This setting is optional and can be omitted completely.
Specify VPN-interfaces (tun0, tun1, ...) to be monitored. Multiple
interfaces can be separated with spaces.
'5'
.
This setting is optional and can be omitted completely.
Specify the time interval for execution of acclearnips.sh (see
ACCOUNTING_LEARNIPS?).
If this setting is empty a default of 5 minutes will be used.
'new'
.
This setting is optional and can be omitted completely.
With the previous accounting method ('old'
) all traffic will be
checked by the accounting rules and additional rules will be applied to exclude
traffic between masked networks. Postrouting rules will be read in order
to achieve this. This will work as expected with
POSTROUTING_LIST_1='IP_NET_1 MASQUERADE'in base.txt but not with
POSTROUTING_LIST_1='if:any:pppoe MASQUERADE'.The new method (
'new'
) only directs traffic in interfaces defined in
ACCOUNTING_INT
into the accounting rules chain. By using this
POSTROUTING_LIST_1='if:any:pppoe MASQUERADE'is not a problem anymore.
'no'
.
This setting is optional and can be omitted completely.
Normally only routed traffic is counted by Accounting. If a proxy is
installed on the fli4l traffic won't be routed and Accounting's values will stay zero.
You can set ACCOUNTING_LOCALTRAF
to 'yes'
to avoid that. All traffic
from fli4l to the client and back will be routed through the accounting rules
chain then. The backdraw is that all traffic between router and client
will be counted as internet traffic. This encloses updates, SSH, SCP, FTP, httpd,
and so on. The difference can become negative very fast.
'4294967296'
.
This setting is optional and should only be specified in rare special cases.
The value gives the maximum amount of bytes an interface can have before
overflow is reached. This variable must be specified only if the
interface maximum is NOT 4294967296 bytes (4GB).
If you are not sure don't touch this parameter.
'no'
.
This setting is optional and can be omitted completely.
With setting this to 'yes'
a file named int.log will be
created to record the calculation of the interface data.
... HTTPD_USER_N='2' HTTPD_USER_1_USERNAME='admin' HTTPD_USER_1_PASSWORD='secret' HTTPD_USER_1_RIGHTS='all' HTTPD_USER_2_USERNAME='accounting' HTTPD_USER_2_PASSWORD='0815' HTTPD_USER_2_RIGHTS='accounting:view' ...User admin has all rights including accounting, user accounting has only rights to use Accounting.
Example:
ACCOUNTING_HOST_n='3' ACCOUNTING_HOST_1_IP='192.168.6.1' ACCOUNTING_HOST_1_NAME='client1' ACCOUNTING_HOST_2_IP='192.168.6.2' ACCOUNTING_HOST_2_NAME='client2' ACCOUNTING_HOST_3_IP='192.168.6.3' ACCOUNTING_HOST_3_NAME='client3' ACCOUNTING_INT_n='3' ACCOUNTING_INT_1_NAME='ppp0' ACCOUNTING_INT_2_NAME='eth0' ACCOUNTING_INT_3_NAME='lo'Variables
ACCOUNTING_HOST_x_NAME
are optional. This names
will be shown by the web-interface if name resolution is set to index.
The file index.acc can be edited directly on the router. As an editor
choose one you like from the tools-package.
DNS_BOGUS_PRIV
in base.txt to 'yes'.
(This is the default setting.)
DIALMODE='auto'
in
base.txt and PPPOE_HUP_TIMEOUT='0'
in dsl.txt at the same time.
To be online 24/7 set PPPOE_HUP_TIMEOUT
to a high value
(for example 86400) and regularly provide queries.
As of fli4l-2.1.12 you can set PPPOE_HUP_TIMEOUT='never'
to
prevent fli4l from closing a connection. I would rather avoid this setting and use
the method mentioned before.