~ubuntu-branches/ubuntu/precise/arno-iptables-firewall/precise

« back to all changes in this revision

Viewing changes to share/arno-iptables-firewall/plugins/90traffic-accounting.plugin

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2010-01-10 16:46:32 UTC
  • mfrom: (1.1.8 upstream) (4.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100110164632-d8e9r8svapi2qkec
Tags: 1.9.2.h-1
* New upstream release (Closes: #550222, #553036).
* Unify dependency-based boot-order and old-style update-rc.d, to be similar
  to shorewall's behavior.
* Add lintian override. The init script does handle 'stop', but it is
  shadowed by an if-clause. The 'else' branch handles 'stop' as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#            -= Arno's iptables firewall - Traffic Accounting plugin =-
3
3
#
4
4
PLUGIN_NAME="Traffic Accounting plugin"
5
 
PLUGIN_VERSION="0.32BETA (EXPERIMENTAL!)"
 
5
PLUGIN_VERSION="0.33BETA (EXPERIMENTAL!)"
6
6
PLUGIN_CONF_FILE="traffic-accounting.conf"
7
7
#
8
 
# Last changed          : July 15, 2009
 
8
# Last changed          : September 2, 2009
9
9
# Requirements          : AIF 1.9.0-rc4+
10
10
# Comments              : This implements support for traffic accounting. It is
11
11
#                         compatible with DynDNS.
35
35
# Plugin start function
36
36
plugin_start()
37
37
{
 
38
  # Enable Conntrack Accounting (kernel config CONFIG_NF_CT_ACCT)
 
39
  # CONFIG_NF_CT_ACCT is deprecated and will be removed sometime after kernel 2.6.27
 
40
  sysctl net.netfilter.nf_conntrack_acct=1 2>/dev/null
 
41
 
38
42
  iptables -N ACCOUNTING_INPUT_CHAIN 2>/dev/null
39
43
  iptables -F ACCOUNTING_INPUT_CHAIN
40
44
 
100
104
}
101
105
 
102
106
 
103
 
# Check sanity of ie. environment
 
107
# Check sanity of eg. environment
104
108
plugin_sanity_check()
105
109
{
106
110
  if [ -z "$TRAFFIC_ACCOUNTING_CRON" ]; then