diff options
author | Sergey Skvortsov <skv@FreeBSD.org> | 2008-06-03 10:40:16 +0000 |
---|---|---|
committer | Sergey Skvortsov <skv@FreeBSD.org> | 2008-06-03 10:40:16 +0000 |
commit | e49535ea7af1d33c376befd0726481d2e256434d (patch) | |
tree | cf54a8ebb6563bd224bf143b648f41752ab11805 /net-mgmt/ng_ipacct | |
parent | dccb33775f56e9e7be3af0111be67c6cca9cd9cd (diff) | |
download | ports-e49535ea7af1d33c376befd0726481d2e256434d.tar.gz ports-e49535ea7af1d33c376befd0726481d2e256434d.zip |
Notes
Diffstat (limited to 'net-mgmt/ng_ipacct')
-rw-r--r-- | net-mgmt/ng_ipacct/files/ng_ipacct.conf | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/net-mgmt/ng_ipacct/files/ng_ipacct.conf b/net-mgmt/ng_ipacct/files/ng_ipacct.conf index d1e5d9741e1f..47ff26ab962d 100644 --- a/net-mgmt/ng_ipacct/files/ng_ipacct.conf +++ b/net-mgmt/ng_ipacct/files/ng_ipacct.conf @@ -201,71 +201,71 @@ ng_ipacct_xl0_checkpoint_script="path/to/your/script --checkpoint-and-save xl0" ng_ipacct_xl0_afterstart_script="path/to/your/script --load-bpf-filters xl0" # this script is called just after initialization # of nodes to load filters into xl0_bpf -
-# EXAMPLE 5. Really _divert_ traffic to ng_ksocket
-
-# ipfw add divert 4001 ip from any to any via em0 in
-# ipfw add divert 4002 ip from any to any via em0 out
-
-# USER-LEVEL | KERNEL-LEVEL
-# |
-# div4 *.4001 ->|-> ipfw_ks_in in-(ipfw_echo_in)
-# | | |
-# | (inet/raw/divert)---(left)-(ipfw_tee_in)-right
-# | |
-# | left2right---(ipfw_in)
-# | |
-# | ipfw_ip_acct
-# | |
-# | left2right---(ipfw_out)
-# | |
-# | (inet/raw/divert)---(left)-(ipfw_tee_out)-right
-# | | |
-# div4 *.4002 ->|-> ipfw_ks_out out-(ipfw_echo_out)
-#
-# ipfw_ks_in - ng_ksocket
-# ipfw_ks_out - ng_ksocket
-# ipfw_tee_in - ng_tee
-# ipfw_tee_out - ng_tee
-# ipfw_ip_acct - ng_ipacct
-# ipfw_echo_in - ng_echo
-# ipfw_echo_out - ng_echo
-
-ng_ipacct_ks_start='
- mkpeer ipacct dummy dummy
- name .:dummy %%iface%%_ip_acct
-
- mkpeer %%iface%%_ip_acct: tee %%iface%%_in left2right
- name %%iface%%_ip_acct:%%iface%%_in %%iface%%_tee_in
- mkpeer %%iface%%_ip_acct: tee %%iface%%_out left2right
- name %%iface%%_ip_acct:%%iface%%_out %%iface%%_tee_out
-
- mkpeer %%iface%%_tee_in: echo right in
- name %%iface%%_tee_in:right %%iface%%_echo_in
- mkpeer %%iface%%_tee_out: echo right out
- name %%iface%%_tee_out:right %%iface%%_echo_out
-
- mkpeer %%iface%%_tee_in: ksocket left inet/raw/divert
- name %%iface%%_tee_in:left %%iface%%_ks_in
- msg %%iface%%_ks_in: bind inet/0.0.0.0:4001
-
- mkpeer %%iface%%_tee_out: ksocket left inet/raw/divert
- name %%iface%%_tee_out:left %%iface%%_ks_out
- msg %%iface%%_ks_out: bind inet/0.0.0.0:4002
-
- rmhook .:dummy
-'
-ng_ipacct_ks_stop='
- shutdown %%iface%%_ks_in:
- shutdown %%iface%%_ks_out:
- shutdown %%iface%%_tee_in:
- shutdown %%iface%%_tee_out:
-'
-ng_ipacct_ks_dlt="RAW" # required line; see ipacctctl(8)
-ng_ipacct_ks_threshold="15000" # '5000' by default
-ng_ipacct_ks_verbose="yes" # 'yes' by default
-ng_ipacct_ks_saveuid="yes" # 'no' by default
-ng_ipacct_ks_savetime="no" # 'no' by default
-ng_ipacct_ks_checkpoint_script="path/to/your/script --checkpoint-and-save ks"
- # this script is called on stop (to save accumulated
- # data) or via "rc.d/ng_ipacct.sh checkpoint"
+ +# EXAMPLE 5. Really _divert_ traffic to ng_ksocket + +# ipfw add divert 4001 ip from any to any via em0 in +# ipfw add divert 4002 ip from any to any via em0 out + +# USER-LEVEL | KERNEL-LEVEL +# | +# div4 *.4001 ->|-> ipfw_ks_in in-(ipfw_echo_in) +# | | | +# | (inet/raw/divert)---(left)-(ipfw_tee_in)-right +# | | +# | left2right---(ipfw_in) +# | | +# | ipfw_ip_acct +# | | +# | left2right---(ipfw_out) +# | | +# | (inet/raw/divert)---(left)-(ipfw_tee_out)-right +# | | | +# div4 *.4002 ->|-> ipfw_ks_out out-(ipfw_echo_out) +# +# ipfw_ks_in - ng_ksocket +# ipfw_ks_out - ng_ksocket +# ipfw_tee_in - ng_tee +# ipfw_tee_out - ng_tee +# ipfw_ip_acct - ng_ipacct +# ipfw_echo_in - ng_echo +# ipfw_echo_out - ng_echo + +ng_ipacct_ks_start=' + mkpeer ipacct dummy dummy + name .:dummy %%iface%%_ip_acct + + mkpeer %%iface%%_ip_acct: tee %%iface%%_in left2right + name %%iface%%_ip_acct:%%iface%%_in %%iface%%_tee_in + mkpeer %%iface%%_ip_acct: tee %%iface%%_out left2right + name %%iface%%_ip_acct:%%iface%%_out %%iface%%_tee_out + + mkpeer %%iface%%_tee_in: echo right in + name %%iface%%_tee_in:right %%iface%%_echo_in + mkpeer %%iface%%_tee_out: echo right out + name %%iface%%_tee_out:right %%iface%%_echo_out + + mkpeer %%iface%%_tee_in: ksocket left inet/raw/divert + name %%iface%%_tee_in:left %%iface%%_ks_in + msg %%iface%%_ks_in: bind inet/0.0.0.0:4001 + + mkpeer %%iface%%_tee_out: ksocket left inet/raw/divert + name %%iface%%_tee_out:left %%iface%%_ks_out + msg %%iface%%_ks_out: bind inet/0.0.0.0:4002 + + rmhook .:dummy +' +ng_ipacct_ks_stop=' + shutdown %%iface%%_ks_in: + shutdown %%iface%%_ks_out: + shutdown %%iface%%_tee_in: + shutdown %%iface%%_tee_out: +' +ng_ipacct_ks_dlt="RAW" # required line; see ipacctctl(8) +ng_ipacct_ks_threshold="15000" # '5000' by default +ng_ipacct_ks_verbose="yes" # 'yes' by default +ng_ipacct_ks_saveuid="yes" # 'no' by default +ng_ipacct_ks_savetime="no" # 'no' by default +ng_ipacct_ks_checkpoint_script="path/to/your/script --checkpoint-and-save ks" + # this script is called on "stop" (to save accumulated + # data) or via "rc.d/ng_ipacct.sh checkpoint" |