|
1 | 1 | Hello, |
2 | 2 |
|
3 | | -If you wish to account with netflow module traffic mirrored on switch you may follow this example: |
| 3 | +If you wish to account with ipt-netflow module traffic mirrored on switch you may follow |
| 4 | + one of these examples: |
4 | 5 |
|
5 | 6 |
|
6 | | - Solution 1: General kernel patch. |
7 | | - Solution 2: Alternative w/o kernel patch. |
| 7 | + Solution 1: Promisc-hack module option. [2014] |
| 8 | + Solution 2: General kernel patch. [2008] |
| 9 | + Solution 3: Alternative w/o kernel patch, using bridges. [2010] |
8 | 10 |
|
9 | 11 |
|
10 | 12 | ************** |
11 | 13 | * Solution 1 * |
12 | 14 | ************** |
13 | 15 |
|
| 16 | + No kernel patching is need anymore! (As in easy.) |
| 17 | + |
| 18 | + Compile module with `./configure --enable-promisc' option. This will enable |
| 19 | + `promisc=' module parameter and sysctl parameter `net.netflow.promisc'. |
| 20 | + Set any of these to `1' to enable promisc hack, you will see dmesg message |
| 21 | + that it's enabled, set to `0' to disable (default). |
| 22 | + |
| 23 | + This option turned on will pass promisc traffic into `PREROUTING' chain |
| 24 | + of `raw' table (same as with promisc patches). Briefly it's like this: |
| 25 | + |
| 26 | + # cd ipt-netflow/ |
| 27 | + # ./configure --enable-promisc |
| 28 | + # make all install |
| 29 | + # iptables -A PREROUTING -t raw -i eth2 -j NETFLOW |
| 30 | + # sysctl net.netflow.promisc=1 |
| 31 | + # ifconfig eth2 promisc |
| 32 | + # grep Promisc /proc/net/stat/ipt_netflow |
| 33 | + |
| 34 | + Now you should be able to see promisc observed packets count increasing. |
| 35 | + |
| 36 | + Note, that enabling module's parameter promisc=1 will not enable promiscuous |
| 37 | + mode on network cards, these are completely different things. This option will |
| 38 | + let iptables to see promisc traffic. That traffic will not be routed anywhere |
| 39 | + and discarded just after passing PREROUTING chain. |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + ************** |
| 44 | + * Solution 2 * |
| 45 | + ************** |
| 46 | + |
14 | 47 | 1. Patch your kernel with `raw_promisc.patch' to enable raw table to see promisc traffic. |
15 | 48 |
|
16 | 49 | # cd /usr/src/linux |
@@ -56,7 +89,7 @@ ps. For Debian Squeeze instructions look at raw_promisc_debian_squeeze6.patch |
56 | 89 |
|
57 | 90 |
|
58 | 91 | ************** |
59 | | - * Solution 2 * |
| 92 | + * Solution 3 * |
60 | 93 | ************** |
61 | 94 |
|
62 | 95 | By Anonymous. |
|
0 commit comments