filtering all the TCP packets
"Gisela Giusti" <[email protected]> Fri, 31 Aug 2007 12:31:25 -0300
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
I am very new in with ebtables and I am trying to use it to filter all the
TCP packets for a personal project in which I will need to analyze the TCP
data segment of ALL the packages getting out of the system. I want to use
ebtables and add new target module to do it. For now, I were doing some
tests with the mark target but I am not sure that all the TCP traffic is
matching my rule,
Here is the steps I have followed to do the tests:
Configuring the bridge:
$ brctl addbr br0
$ brctl stp br0 off
$ brctl addif br0 eth1
$ ifconfig eth1 down
$ ifconfig eth1 0.0.0.0 up
$ dhcient br0
The ifconfig command outputs:
br0 Link encap:Ethernet HWaddr 00:0C:29:F3:CA:61
inet addr:192.168.186.128 Bcast:192.168.186.255 Mask:
255.255.255.0
inet6 addr: fe80::20c:29ff:fef3:ca61/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4103 (4.0 KiB) TX bytes:4470 (4.3 KiB)
eth1 Link encap:Ethernet HWaddr 00:0C:29:F3:CA:61
inet6 addr: fe80::20c:29ff:fef3:ca61/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:164 errors:0 dropped:0 overruns:0 frame:0
TX packets:186 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24518 (23.9 KiB) TX bytes:23635 (23.0 KiB)
Interrupt:18 Base address:0x1400
Next, I added the rule
$ ebtables -t broute -A BROUTING -p IPV4 --ip-proto TCP -j mark --mark-set 2
--mark-target ACCEPT
(The ebtables is already mounted in the kernel) the lsmod | grep ebt command
outputs:
ebt_vlan 4612 0
ebt_ulog 8964 0
ebt_stp 4096 0
ebt_snat 3712 0
ebt_redirect 3456 0
ebt_pkttype 2816 0
ebt_mark_m 2816 0
ebt_mark 3200 0
ebt_log 5376 0
ebt_limit 3584 0
ebt_ip 3456 0
ebt_dnat 3328 0
ebt_arpreply 3456 0
ebt_arp 3712 0
ebt_among 4480 0
ebt_802_3 2944 0
ebtable_broute 3328 0
bridge 55832 1 ebtable_broute
ebtable_nat 3584 0
ebtable_filter 3584 0
ebtables 21504 19
ebt_vlan,ebt_ulog,ebt_stp,ebt_snat,ebt_redirect,ebt_pkttype,ebt_mark_m,ebt_mark,ebt_log,ebt_limit,ebt_ip,ebt_dnat,ebt_arpreply,ebt_arp,ebt_among,ebt_802_3,ebtable_broute,ebtable_nat,ebtable_filr
I am running kernel 2.6.20.15.
The question is, with this configuration, Can I be sure that all the TCP
traffic will be filtered and marked by ebtables?
Thanks in advance,
Gisela
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Ebtables-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ebtables-user